h342366439 发表于 2020-1-3 17:30:52

Linux3.4.39系统下交叉编译openssl提示Command not Found

已经成功安装arm-cortex_a9-eabi-4.7-eglibc-2.18编译器并且配置了PATH

在终端下输入:echo $PATH
输出:/home/heeee/bin:/home/heeee/.local/bin:/usr/local/arm-cortex_a9-eabi-4.7-eglibc-2.18/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

在终端下输入:arm-cortex_a9-linux-gnueabi-gcc -v
输出:Using built-in specs.
COLLECT_GCC=arm-cortex_a9-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/arm-cortex_a9-eabi-4.7-eglibc-2.18/bin/../libexec/gcc/arm-cortex_a9-linux-gnueabi/4.7.4/lto-wrapper
Target: arm-cortex_a9-linux-gnueabi
Configured with: /home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/src/gcc-linaro-4.7-2013.11/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=arm-cortex_a9-linux-gnueabi --prefix=/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18 --with-sysroot=/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot --enable-languages=c,c++,fortran --enable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=softfp --with-pkgversion='crosstool-NG linaro-1.13.1-4.8-2013.11 - nexell' --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static --with-mpfr=/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static --with-mpc=/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static --with-ppl=/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static --with-cloog=/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static --with-libelf=/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/home/pjsin/devel/tools/crosstools/ct/linaro-1.13.1-4.8-2013.11/.build/arm-cortex_a9-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-plugin --enable-gold --with-local-prefix=/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot --enable-c99 --enable-long-long --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}' --enable-poison-system-directories
Thread model: posix
gcc version 4.7.4 20131111 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.11 - nexell)

目测可以保证编译器已经安装成功且PATH路径配置成功
进入openssl目录下输入:sudo make
输出:** all in crypto...
make: Entering directory '/home/heeee/openssl-OpenSSL_1_0_2u/crypto'
/usr/bin/perl ../util/mkbuildinf.pl "arm-cortex_a9-linux-gnueabi-gcc -I. -I.. -I../include-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall" "linux-x86_64" >buildinf.h
arm-cortex_a9-linux-gnueabi-gcc -I. -I.. -I../include-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall   -c -o cryptlib.o cryptlib.c
make: arm-cortex_a9-linux-gnueabi-gcc: Command not found
<builtin>: recipe for target 'cryptlib.o' failed
make: *** Error 127
make: Leaving directory '/home/heeee/openssl-OpenSSL_1_0_2u/crypto'
Makefile:287: recipe for target 'build_crypto' failed
make: *** Error 1

请问为什么会提示arm-cortex_a9-linux-gnueabi-gcc: Command not found

h342366439 发表于 2020-1-3 20:53:32

使用绝对路径解决了问题
页: [1]
查看完整版本: Linux3.4.39系统下交叉编译openssl提示Command not Found