JoakimSoderberg / catcierge

Image recognition (to keep cat prey out) and RFID chip reader system for automated DIY cat door.
GNU General Public License v2.0
65 stars 13 forks source link

build fail #17

Open Neo110 opened 8 years ago

Neo110 commented 8 years ago

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- broken CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/usr/bin/arm-linux-gnueabihf-gcc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_7d64d/fast"

/usr/bin/make -f CMakeFiles/cmTC_7d64d.dir/build.make CMakeFiles/cmTC_7d64d.dir/build

make[1]: Entering directory '/home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_7d64d.dir/testCCompiler.c.o

/usr/bin/arm-linux-gnueabihf-gcc -U_FORTIFY_SOURCE -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -o CMakeFiles/cmTC_7d64d.dir/testCCompiler.c.o -c /home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeTmp/testCCompiler.c

/home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeTmp/testCCompiler.c: In function ‘main’:

/home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeTmp/testCCompiler.c:11:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI

{ (void)argv; return argc-1;} ^

CMakeFiles/cmTC_7d64d.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_7d64d.dir/testCCompiler.c.o' failed

make[1]: *** [CMakeFiles/cmTC_7d64d.dir/testCCompiler.c.o] Error 1

make[1]: Leaving directory '/home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeTmp'

Makefile:126: recipe for target 'cmTC_7d64d/fast' failed

make: *** [cmTC_7d64d/fast] Error 2

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

-- Configuring incomplete, errors occurred! See also "/home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeOutput.log". See also "/home/chusen/下载/catcierge/rpi_userland/build/arm-linux/release/CMakeFiles/CMakeError.log". make: *** 没有指明目标并且找不到 makefile。 停止。 ~/下载/catcierge/rpi_userland ~/下载/catcierge ~/下载/catcierge

JoakimSoderberg commented 8 years ago

Hello,

I need some more information on:

Neo110 commented 8 years ago

R: Linux chusen-ThinkPad-SL410 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

yes git submodule update --init

** cmake version 3.5.1

opencv-3.1.0

Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)**

JoakimSoderberg commented 8 years ago

Ok... So I see what the issue is.

You are using a Thinkpad (x86) and then trying to run ./build_userland.sh (meant only for Raspberry Pi, which is ARM not x86)

You are following the wrong instructions. You should NOT follow the ones for Raspberry Pi if not building on a Raspberry Pi. It is an ARM platform and your Thinkpad is X86 This is raspberry pi: https://www.raspberrypi.org/

./build_userland.sh tries to compile things that are Raspberry Pi specific, only meant for ARM. So that is why you are getting this error referring to an ARM version of gcc:

...
The C compiler "/usr/bin/arm-linux-gnueabihf-gcc" is not able to compile a
simple test program.
...

Instead follow the instructions for compiling on normal Linux.