Debian 32비트 호스트 PC에는 /opt 디렉토리에 ARM 대상용 도구 체인이 사전 구축되어 있습니다. 소스에서 프로젝트를 크로스 컴파일하려고 하는데 시스템이 openssl 패키지를 빌드하려고 할 때 많은 오류가 발생합니다.
<.....>
Considering target file 'link_app.'.
File 'link_app.' does not exist.
Finished prerequisites of target file 'link_app.'.
Must remake target 'link_app.'.
make[6]: Entering directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-/opt/emlix/pnx8181/bin/arm-linux-gnueabi-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
Putting child 0x829ab18 (link_app.) PID 16845 on the chain.
Live child 0x829ab18 (link_app.) PID 16845
genrsa.o: In function `genrsa_main':
genrsa.c:(.text+0x50c): undefined reference to `EVP_seed_cbc'
genrsa.c:(.text+0x52c): undefined reference to `EVP_idea_cbc'
genrsa.c:(.text+0x6c8): undefined reference to `EVP_camellia_128_cbc'
genrsa.c:(.text+0x6e8): undefined reference to `EVP_camellia_192_cbc'
genrsa.c:(.text+0x708): undefined reference to `EVP_camellia_256_cbc'
gendsa.o: In function `gendsa_main':
gendsa.c:(.text+0x3d0): undefined reference to `EVP_seed_cbc'
gendsa.c:(.text+0x4dc): undefined reference to `EVP_idea_cbc'
gendsa.c:(.text+0x5b4): undefined reference to `EVP_camellia_128_cbc'
gendsa.c:(.text+0x5d4): undefined reference to `EVP_camellia_192_cbc'
gendsa.c:(.text+0x61c): undefined reference to `EVP_camellia_256_cbc'
speed.o: In function `speed_main':
speed.c:(.text+0x880): undefined reference to `Camellia_set_key'
speed.c:(.text+0x890): undefined reference to `Camellia_set_key'
speed.c:(.text+0x8a0): undefined reference to `Camellia_set_key'
speed.c:(.text+0x8b0): undefined reference to `idea_set_encrypt_key'
speed.c:(.text+0x8bc): undefined reference to `SEED_set_key'
speed.c:(.text+0x900): undefined reference to `CAST_set_key'
speed.c:(.text+0x13b8): undefined reference to `EVP_ripemd160'
speed.c:(.text+0x2320): undefined reference to `Camellia_cbc_encrypt'
speed.c:(.text+0x24a8): undefined reference to `Camellia_cbc_encrypt'
speed.c:(.text+0x2630): undefined reference to `Camellia_cbc_encrypt'
speed.c:(.text+0x27bc): undefined reference to `idea_cbc_encrypt'
speed.c:(.text+0x2944): undefined reference to `SEED_cbc_encrypt'
speed.c:(.text+0x2ddc): undefined reference to `CAST_cbc_encrypt'
speed.c:(.text+0x4bdc): undefined reference to `EVP_mdc2'
speed.c:(.text+0x5d88): undefined reference to `idea_options'
version.o: In function `version_main':
version.c:(.text+0x2d0): undefined reference to `idea_options'
pkcs12.o: In function `pkcs12_main':
pkcs12.c:(.text+0x1bcc): undefined reference to `EVP_idea_cbc'
pkcs12.c:(.text+0x1bf0): undefined reference to `EVP_seed_cbc'
pkcs12.c:(.text+0x1c80): undefined reference to `EVP_camellia_128_cbc'
pkcs12.c:(.text+0x1ca4): undefined reference to `EVP_camellia_192_cbc'
pkcs12.c:(.text+0x1cc8): undefined reference to `EVP_camellia_256_cbc'
smime.o: In function `smime_main':
smime.c:(.text+0xac8): undefined reference to `EVP_seed_cbc'
smime.c:(.text+0x1544): undefined reference to `EVP_camellia_128_cbc'
smime.c:(.text+0x156c): undefined reference to `EVP_camellia_192_cbc'
smime.c:(.text+0x1594): undefined reference to `EVP_camellia_256_cbc'
cms.o: In function `cms_main':
cms.c:(.text+0x149c): undefined reference to `EVP_seed_cbc'
cms.c:(.text+0x20b0): undefined reference to `EVP_camellia_128_cbc'
cms.c:(.text+0x2398): undefined reference to `EVP_camellia_192_cbc'
cms.c:(.text+0x23dc): undefined reference to `EVP_camellia_256_cbc'
collect2: ld returned 1 exit status
Reaping losing child 0x829ab18 PID 16845
../Makefile.shared:164: recipe for target 'link_app.' failed
make[6]: *** [link_app.] Error 1
Removing child 0x829ab18 PID 16845 from chain.
make[6]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l/apps'
Reaping losing child 0x8267a10 PID 16843
Makefile:156: recipe for target 'openssl' failed
make[5]: *** [openssl] Error 2
Removing child 0x8267a10 PID 16843 from chain.
make[5]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l/apps'
Reaping losing child 0x96dbf30 PID 16839
Makefile:293: recipe for target 'build_apps' failed
make[4]: *** [build_apps] Error 1
Removing child 0x96dbf30 PID 16839 from chain.
make[4]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l'
Reaping losing child 0x89d16c8 PID 16760
Makefile.cyt:5: recipe for target 'all' failed
make[3]: *** [all] Error 2
Removing child 0x89d16c8 PID 16760 from chain.
make[3]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l'
Reaping losing child 0x9e980a8 PID 16758
/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_openssl' failed
make[2]: *** [_subdir_openssl] Error 2
Removing child 0x9e980a8 PID 16758 from chain.
make[2]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source'
Reaping losing child 0x8dd38d8 PID 14258
/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_open_source' failed
make[1]: *** [_subdir_open_source] Error 2
Removing child 0x8dd38d8 PID 14258 from chain.
make[1]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router'
Reaping losing child 0x887eb58 PID 12281
Rules.mk:74: recipe for target '_subdir_router' failed
make: *** [_subdir_router] Error 2
Removing child 0x887eb58 PID 12281 from chain.
Considering target file 'link_app.'.
File 'link_app.' does not exist.
Finished prerequisites of target file 'link_app.'.
Must remake target 'link_app.'.
make[6]: Entering directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-/opt/emlix/pnx8181/bin/arm-linux-gnueabi-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
Putting child 0x829ab18 (link_app.) PID 16845 on the chain.
Live child 0x829ab18 (link_app.) PID 16845
genrsa.o: In function `genrsa_main':
genrsa.c:(.text+0x50c): undefined reference to `EVP_seed_cbc'
genrsa.c:(.text+0x52c): undefined reference to `EVP_idea_cbc'
genrsa.c:(.text+0x6c8): undefined reference to `EVP_camellia_128_cbc'
genrsa.c:(.text+0x6e8): undefined reference to `EVP_camellia_192_cbc'
genrsa.c:(.text+0x708): undefined reference to `EVP_camellia_256_cbc'
gendsa.o: In function `gendsa_main':
gendsa.c:(.text+0x3d0): undefined reference to `EVP_seed_cbc'
gendsa.c:(.text+0x4dc): undefined reference to `EVP_idea_cbc'
gendsa.c:(.text+0x5b4): undefined reference to `EVP_camellia_128_cbc'
gendsa.c:(.text+0x5d4): undefined reference to `EVP_camellia_192_cbc'
gendsa.c:(.text+0x61c): undefined reference to `EVP_camellia_256_cbc'
speed.o: In function `speed_main':
speed.c:(.text+0x880): undefined reference to `Camellia_set_key'
speed.c:(.text+0x890): undefined reference to `Camellia_set_key'
speed.c:(.text+0x8a0): undefined reference to `Camellia_set_key'
speed.c:(.text+0x8b0): undefined reference to `idea_set_encrypt_key'
speed.c:(.text+0x8bc): undefined reference to `SEED_set_key'
speed.c:(.text+0x900): undefined reference to `CAST_set_key'
speed.c:(.text+0x13b8): undefined reference to `EVP_ripemd160'
speed.c:(.text+0x2320): undefined reference to `Camellia_cbc_encrypt'
speed.c:(.text+0x24a8): undefined reference to `Camellia_cbc_encrypt'
speed.c:(.text+0x2630): undefined reference to `Camellia_cbc_encrypt'
speed.c:(.text+0x27bc): undefined reference to `idea_cbc_encrypt'
speed.c:(.text+0x2944): undefined reference to `SEED_cbc_encrypt'
speed.c:(.text+0x2ddc): undefined reference to `CAST_cbc_encrypt'
speed.c:(.text+0x4bdc): undefined reference to `EVP_mdc2'
speed.c:(.text+0x5d88): undefined reference to `idea_options'
version.o: In function `version_main':
version.c:(.text+0x2d0): undefined reference to `idea_options'
pkcs12.o: In function `pkcs12_main':
pkcs12.c:(.text+0x1bcc): undefined reference to `EVP_idea_cbc'
pkcs12.c:(.text+0x1bf0): undefined reference to `EVP_seed_cbc'
pkcs12.c:(.text+0x1c80): undefined reference to `EVP_camellia_128_cbc'
pkcs12.c:(.text+0x1ca4): undefined reference to `EVP_camellia_192_cbc'
pkcs12.c:(.text+0x1cc8): undefined reference to `EVP_camellia_256_cbc'
smime.o: In function `smime_main':
smime.c:(.text+0xac8): undefined reference to `EVP_seed_cbc'
smime.c:(.text+0x1544): undefined reference to `EVP_camellia_128_cbc'
smime.c:(.text+0x156c): undefined reference to `EVP_camellia_192_cbc'
smime.c:(.text+0x1594): undefined reference to `EVP_camellia_256_cbc'
cms.o: In function `cms_main':
cms.c:(.text+0x149c): undefined reference to `EVP_seed_cbc'
cms.c:(.text+0x20b0): undefined reference to `EVP_camellia_128_cbc'
cms.c:(.text+0x2398): undefined reference to `EVP_camellia_192_cbc'
cms.c:(.text+0x23dc): undefined reference to `EVP_camellia_256_cbc'
collect2: ld returned 1 exit status
Reaping losing child 0x829ab18 PID 16845
../Makefile.shared:164: recipe for target 'link_app.' failed
make[6]: *** [link_app.] Error 1
Removing child 0x829ab18 PID 16845 from chain.
make[6]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l/apps'
Reaping losing child 0x8267a10 PID 16843
Makefile:156: recipe for target 'openssl' failed
make[5]: *** [openssl] Error 2
Removing child 0x8267a10 PID 16843 from chain.
make[5]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l/apps'
Reaping losing child 0x96dbf30 PID 16839
Makefile:293: recipe for target 'build_apps' failed
make[4]: *** [build_apps] Error 1
Removing child 0x96dbf30 PID 16839 from chain.
make[4]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l'
Reaping losing child 0x89d16c8 PID 16760
Makefile.cyt:5: recipe for target 'all' failed
make[3]: *** [all] Error 2
Removing child 0x89d16c8 PID 16760 from chain.
make[3]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/openssl-1.0.2l'
Reaping losing child 0x9e980a8 PID 16758
/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_openssl' failed
make[2]: *** [_subdir_openssl] Error 2
Removing child 0x9e980a8 PID 16758 from chain.
make[2]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source'
Reaping losing child 0x8dd38d8 PID 14258
/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_open_source' failed
make[1]: *** [_subdir_open_source] Error 2
Removing child 0x8dd38d8 PID 14258 from chain.
make[1]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router'
Reaping losing child 0x887eb58 PID 12281
Rules.mk:74: recipe for target '_subdir_router' failed
make: *** [_subdir_router] Error 2
Removing child 0x887eb58 PID 12281 from chain.
이 문제를 해결하는 방법을 제안해 주세요.
답변1
이 특별한 경우에는 openssl 패키지를 다시 컴파일하고 다음 명령을 실행하여 문제를 해결했습니다.
$ ./configure
$ make
# make install
(마지막 두 명령은 루트로 실행해야 합니다.)