gpt4 book ai didi

c++ - 使用configure文件生成makefile

转载 作者:太空宇宙 更新时间:2023-11-04 10:16:27 29 4
gpt4 key购买 nike

我使用 ./configure 命令生成一个 makefile。我的编译器是 arm-fsl-linux-gnueabi toochain。当我运行 ./configure 时,我遇到了以下问题:

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

我的工具链是 sourced,当键入 arm-fsl-linux-gnueabi-gcc -v 时,命令行显示它有效。

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)

最佳答案

查看 ./configure --help 的输出,尤其是:

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

HOST 应该是您要在其上进行交叉编译的系统的标识要运行的程序。但是您已将其设置为 C++ 编译器的绝对文件名:

./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 脚本尝试定位交叉编译器但失败有这样无意义的名字:

/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++

查看arm-fsl-linux-gnueabi-gcc -v的输出,具体为:

Target: arm-fsl-linux-gnueabi 

这告诉您,您的交叉编译器是为交叉编译程序而构建的适用于 arm-fsl-linux-gnueabi 系统。因此,当你想 ./configure使用该交叉编译器的项目,HOST = arm-fsl-linux-gnueabi

关于c++ - 使用configure文件生成makefile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46011989/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com