1
나는 autoconf로 컴파일하려고 시도하고 있었다.autoconf로 크로스 컴파일
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html
- https://github.com/jedisct1/libsodium/issues/274
- Cross Compiling For ARM With Autoconf
그리고 한 -
: 나는이에서 시도했다하는 데 도움이./configure --build=x86_64-linux-gnu --host=/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf --target=/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf --disable-shared --disable-documentation
그러나 gcc 및 컴파일에 필요한 기타 사항을 자동으로 확인한 후에는 찾을 수 없습니다. 디렉토리에 이미 있습니다.
그래서 로그는 다음과 같습니다
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar... no
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-lib... no
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf': machine `/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm' not recognized
configure: error: /bin/bash ./config.sub /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf failed
이 모든 팔 툴체인 빈
[email protected]:/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin$ ls
arm-linux-gnueabihf-addr2line arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gfortran arm-linux-gnueabihf-readelf
arm-linux-gnueabihf-ar arm-linux-gnueabihf-gcc-5.4.1 arm-linux-gnueabihf-gprof arm-linux-gnueabihf-size
arm-linux-gnueabihf-as arm-linux-gnueabihf-gcc-ar arm-linux-gnueabihf-ld arm-linux-gnueabihf-strings
arm-linux-gnueabihf-c++ arm-linux-gnueabihf-gcc-nm arm-linux-gnueabihf-ld.bfd arm-linux-gnueabihf-strip
arm-linux-gnueabihf-c++filt arm-linux-gnueabihf-gcc-ranlib arm-linux-gnueabihf-nm gdbserver
arm-linux-gnueabihf-cpp arm-linux-gnueabihf-gcov arm-linux-gnueabihf-objcopy runtest
arm-linux-gnueabihf-elfedit arm-linux-gnueabihf-gcov-tool arm-linux-gnueabihf-objdump
arm-linux-gnueabihf-g++ arm-linux-gnueabihf-gdb arm-linux-gnueabihf-ranlib
어떤 제안에 대한 디렉토리입니다?
편집 나는 Chrono가 제안한 해결책을 시도했다. 팔 도구 체인을 찾을 수있었습니다. 그러나 또 다른 문제는 arised :
오류 추가 문자 :
./ext/tinydtls/libtinydtls.a: error adding symbols: File format not recognized
편집 2 :
파일 형식은 오류가 컴파일이 라인을 위해
libtool: link: arm-linux-gnueabihf-gcc -shared -fPIC -DPIC src/.libs/libcoap_1_la-address.o src/.libs/libcoap_1_la-async.o src/.libs/libcoap_1_la-block.o src/.libs/libcoap_1_la-coap_dtls.o src/.libs/libcoap_1_la-coap_event.o src/.libs/libcoap_1_la-coap_keystore.o src/.libs/libcoap_1_la-coap_time.o src/.libs/libcoap_1_la-debug.o src/.libs/libcoap_1_la-encode.o src/.libs/libcoap_1_la-hashkey.o src/.libs/libcoap_1_la-mem.o src/.libs/libcoap_1_la-net.o src/.libs/libcoap_1_la-option.o src/.libs/libcoap_1_la-pdu.o src/.libs/libcoap_1_la-resource.o src/.libs/libcoap_1_la-str.o src/.libs/libcoap_1_la-subscribe.o src/.libs/libcoap_1_la-uri.o src/platform/posix/.libs/libcoap_1_la-coap_io.o src/platform/posix/.libs/libcoap_1_la-prng.o src/platform/posix/.libs/libcoap_1_la-run.o -L./ext/tinydtls -ltinydtls -g -O2 -Wl,--version-script=./libcoap-1.map -Wl,-soname -Wl,libcoap-1.so.0 -o .libs/libcoap-1.so.0.0.0
을 인식하지 문제는 라이브러리에서 교차 컴파일러 매개 변수를 autoconf에 제대로 전달하지 않아 문제가 발생했습니다.
IT는 crosscompile 툴체인을 찾을 수 있었지만 다른 오류가 와서 : 오류 추가 문자 : 파일 형식을 인식 할 수 없습니다. –
편집을 참조하십시오. 컴파일중인 라이브러리에 다른 라이브러리가 있습니다. 상위 라이브러리 autoconf를 통해 하위 라이브러리 autoconf도 수행됩니다. 그러나이 경우에는 오토 크로스 (autocong)에서 암 크로스 크로스 (crosstool)를 취하지 않습니다. gcc를 사용하는 것이 아니라 cc를 사용하여 컴파일하는 것입니다. –
@ ninja.stop 추가 세부 사항이 필요하기 때문에 다른 질문에서 더 잘 살펴볼 수 있습니다 (컴파일하는 라이브러리의 알려진 문제점 일 수 있습니다). [이 메일 링리스트 스레드] (https : // dev .eclipse.org/mhonarc/lists/tinydtls-dev/msg00061.html)이 좋은 시작일 수 있습니다. –