binutils 캐나다 크로스 컴파일 설치 중 오류가 발생했습니다.

binutils 캐나다 크로스 컴파일 설치 중 오류가 발생했습니다.

Android NDK를 사용하여 Android용 binutils를 컴파일하려고 하므로 찾은 가이드를 사용하여 NDK를 설치했습니다.여기(특히 "고수준 방법") Lua를 성공적으로 컴파일하여 작동함을 증명했습니다.

내가 따라온 단계는 다음과 같습니다.

export NDK=/path/to/ndk
export SYSROOT=$NDK/platforms/android-23/arch-arm
$NDK/build/tools/make_standalone_toolchain.py --arch=arm --api=23 --install-dir /tmp/android-toolchain
export PATH=/tmp/android-toolchain/bin:$PATH

mkdir build-binutils
cd binutils
export TARGET=arm-linux-androideabi
export HOST=$TARGET
export BUILD=x86_64-linux
../binutils-2.27/configure --host=$HOST --target=$TARGET --build=$BUILD --with-sysroot=$SYSROOT --disable-nls --disable-werror
make
make install

make install다음 출력으로 실패합니다.

This is not dpkg install-info anymore, but GNU install-info
See the man page for ginstall-info for command line arguments
./libtool: line 1118: arm-linux-androideabi-ranlib: command not found
make[5]: *** [install-bfdlibLTLIBRARIES] Error 127
make[4]: *** [install-am] Error 2
make[3]: *** [install-recursive] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-bfd] Error 2
make: *** [install] Error 2

이것은 arm-linux-androideabi-ranlib잘 실행됩니다.

$ arm-linux-androideabi-ranlib
Usage: arm-linux-androideabi-ranlib [options] archive
 Generate an index to speed access to archives
 The options are:
  @<file>                      Read options from <file>
  --plugin <name>              Load the specified plugin
  -D                           Use zero for symbol map timestamp
  -U                           Use actual symbol map timestamp (default)
  -t                           Update the archive's symbol map timestamp
  -h --help                    Print this help message
  -v --version                 Print version information
arm-linux-androideabi-ranlib: supported targets: elf32-littlearm elf32-    bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex

크로스 컴파일 툴체인을 설치하는 올바른 방법은 무엇입니까?

답변1

범인을 찾았습니다. 실제로 sudo make installrunning 이 아닌 running 중이 어서 make install사용자 전환으로 인해 임시 경로가 무시되고 있었습니다. 해결책은 실행 sudo su한 다음 PATH를 업데이트하고 다시 실행하는 것 입니다.make install

관련 정보