0
votes

I use ./configure command to generate a makefile. My compiler is arm-fsl-linux-gnueabi toochain. When I ran ./configure, I got the following problem:

tl@tl-virtual-machine:~/Desktop/mvux_camera/demo/sampli_save_demo$ ./configure --host=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ configure: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-strip... no checking for strip... strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-g++... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-c++... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-gpp... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-aCC... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-CC... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cxx... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cc++... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cl.exe... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-FCC... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-KCC... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-RCC... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-xlC_r... no checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-xlC... no checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether the C++ compiler works... no configure: error: in '/home/tl/Desktop/mvux_camera/demo/sampli_save_demo': configure: error: C++ compiler cannot create executables See 'config.log' for more details

My toolchain was sourced, when typing arm-fsl-linux-gnueabi-gcc -v, the command line shows it works.

tl@tl-virtual-machine:~/Desktop/mvux_camera/demo/sampli_save_demo$ arm-fsl-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-fsl-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper Target: arm-fsl-linux-gnueabi Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib Thread model: posix gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)

1

1 Answers

1
votes

Look at the output of ./configure --help, especially:

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

HOST should be the identity of the system on which you want your cross-compiled program to run. But you have set it to the absolute filename of your C++ compiler:

./configure --host=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++

which results in your ./configure script attempting and failing to locate a cross-compiler with such nonsense names as:

/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-g++
/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-c++

Look at the output of arm-fsl-linux-gnueabi-gcc -v, specifically:

Target: arm-fsl-linux-gnueabi 

This tells you that your cross-compiler was built to cross-compile programs for arm-fsl-linux-gnueabi systems. Therefore, when you want to ./configure a project to use that cross-compiler, HOST = arm-fsl-linux-gnueabi