Specify "NO multilib" for cross compilation ???

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Specify "NO multilib" for cross compilation ???

Pei Jia

Hi, all:

I'm trying to cross compile a package with CMake. I strictly followed the documentation here: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html

But, still obtained the following ERROR messages:

CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
   The C compiler


   is not able to compile a simple test program.

   It fails with the following output:

     Change Dir: ....../flann/build/CMakeFiles/CMakeTmp

     Run Build Command:"/usr/bin/make" "cmTC_78471/fast"
     /usr/bin/make -f CMakeFiles/cmTC_78471.dir/build.make CMakeFiles/cmTC_78471.dir/build
     make[1]: Entering directory '....../flann/build/CMakeFiles/CMakeTmp'
     Building C object CMakeFiles/cmTC_78471.dir/testCCompiler.c.o
     ....../RPi/bin/arm-rpi-linux-gnueabihf-gcc --sysroot=....../rootfs    -o
 CMakeFiles/cmTC_78471.dir/testCCompiler.c.o   -c ....../flann/build/CMakeFiles/CMakeTmp/testCCompiler.c
     Linking C executable cmTC_78471
     /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_78471.dir/link.txt --verbose=1
     ....../RPi/bin/arm-rpi-linux-gnueabihf-gcc --sysroot=....../rootfs      -rdynamic
 CMakeFiles/cmTC_78471.dir/testCCompiler.c.o  -o cmTC_78471
     ....../RPi/lib/gcc/arm-rpi-linux-gnueabihf/8.3.0/../../../../arm-rpi-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
     ....../RPi/lib/gcc/arm-rpi-linux-gnueabihf/8.3.0/../../../../arm-rpi-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
     collect2: error: ld returned 1 exit status
     make[1]: *** [CMakeFiles/cmTC_78471.dir/build.make:87: cmTC_78471] Error 1
     make[1]: Leaving directory '....../flann/build/CMakeFiles/CMakeTmp'
     make: *** [Makefile:121: cmTC_78471/fast] Error 2

   CMake will not be able to correctly generate this project.
 Call Stack (most recent call first):
   CMakeLists.txt:24 (project)

To be more specific, I'm trying to cross compile flann (https://github.com/mariusmuja/flann) for raspberry pi 3B (https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) .

Can anybody please give me a hand?


Dr. Pei Jia CEO of Longer Vision Technology (Canada) Ltd.
Website: https://www.longervision.ca
Email: [hidden email]
cell phone in Canada: <a href="tel:+17788635816">778-863-5816


Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe: