Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4345 closed Bug (invalid)

cross complier with mips

Reported by: yukoj2004 Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.32
Severity: Normal Keywords:
Cc:

Description

HI all i want porting to embbeded mips board how to fix link error ============================================

CCLD blocklist-test

./libtransmission.a(utils.o): In function `tr_base64_encode': ..utils.c:1098: undefined reference to `BIO_s_mem' ..utils.c:1098: undefined reference to `BIO_new' ..utils.c:1099: undefined reference to `BIO_f_base64' ..utils.c:1099: undefined reference to `BIO_new' ..utils.c:1100: undefined reference to `BIO_set_flags' ..utils.c:1101: undefined reference to `BIO_push' ..utils.c:1102: undefined reference to `BIO_write' ..utils.c:1103: undefined reference to `BIO_ctrl' ..utils.c:1104: undefined reference to `BIO_ctrl' ..utils.c:1107: undefined reference to `BIO_free_all' ./libtransmission.a(utils.o): In function `tr_base64_decode': ..utils.c:1130: undefined reference to `BIO_f_base64' ..utils.c:1130: undefined reference to `BIO_new' ..utils.c:1131: undefined reference to `BIO_new_mem_buf' ..utils.c:1132: undefined reference to `BIO_push' ..utils.c:1133: undefined reference to `BIO_read' ..utils.c:1137: undefined reference to `BIO_free_all' ..utils.c:1138: undefined reference to `BIO_f_base64' ..utils.c:1138: undefined reference to `BIO_new' ..utils.c:1139: undefined reference to `BIO_set_flags' ..utils.c:1140: undefined reference to `BIO_new_mem_buf' ..utils.c:1141: undefined reference to `BIO_push' ..utils.c:1142: undefined reference to `BIO_read' ..utils.c:1148: undefined reference to `BIO_free_all' ./libtransmission.a(verify.o): In function `verifyTorrent': ..verify.c:59: undefined reference to `SHA1_Init' ..verify.c:94: undefined reference to `SHA1_Update' ..verify.c:114: undefined reference to `SHA1_Final' ..verify.c:132: undefined reference to `SHA1_Init' ./libtransmission.a(crypto.o): In function `tr_sha1': ..crypto.c:44: undefined reference to `SHA1_Init' ..crypto.c:45: undefined reference to `SHA1_Update' ..crypto.c:49: undefined reference to `SHA1_Update' ..crypto.c:52: undefined reference to `SHA1_Final' ./libtransmission.a(crypto.o): In function `ensureKeyExists': ..crypto.c:99: undefined reference to `DH_new' ..crypto.c:101: undefined reference to `BN_bin2bn' ..crypto.c:103: undefined reference to `ERR_get_error' ..crypto.c:103: undefined reference to `ERR_error_string_n' ..crypto.c:105: undefined reference to `BN_bin2bn' ..crypto.c:107: undefined reference to `ERR_get_error' ..crypto.c:107: undefined reference to `ERR_error_string_n' ..crypto.c:110: undefined reference to `BN_new' ..crypto.c:112: undefined reference to `BN_rand' ..crypto.c:113: undefined reference to `ERR_get_error' ..crypto.c:113: undefined reference to `ERR_error_string_n' ..crypto.c:114: undefined reference to `BN_num_bits' ..crypto.c:116: undefined reference to `DH_generate_key' ..crypto.c:117: undefined reference to `ERR_get_error' ..crypto.c:117: undefined reference to `ERR_error_string_n' ..crypto.c:122: undefined reference to `BN_num_bits' ..crypto.c:126: undefined reference to `BN_bn2bin' ./libtransmission.a(crypto.o): In function `tr_cryptoDestruct': ..crypto.c:146: undefined reference to `DH_free' ./libtransmission.a(crypto.o): In function `tr_cryptoComputeSecret': ..crypto.c:159: undefined reference to `BN_bin2bn' ..crypto.c:167: undefined reference to `DH_compute_key' ..crypto.c:169: undefined reference to `ERR_get_error' ..crypto.c:169: undefined reference to `ERR_error_string_n' ..crypto.c:179: undefined reference to `BN_free' ./libtransmission.a(crypto.o): In function `initRC4': ..crypto.c:207: undefined reference to `SHA1_Init' ..crypto.c:207: undefined reference to `SHA1_Update' ..crypto.c:207: undefined reference to `SHA1_Update' ..crypto.c:207: undefined reference to `SHA1_Update' ..crypto.c:207: undefined reference to `SHA1_Final' ..crypto.c:213: undefined reference to `RC4_set_key' ..crypto.c:217: undefined reference to `ERR_get_error' ..crypto.c:217: undefined reference to `ERR_error_string_n' ./libtransmission.a(crypto.o): In function `tr_cryptoDecryptInit': ..crypto.c:228: undefined reference to `RC4' ./libtransmission.a(crypto.o): In function `tr_cryptoDecrypt': ..crypto.c:237: undefined reference to `RC4' ./libtransmission.a(crypto.o): In function `tr_cryptoEncryptInit': ..crypto.c:249: undefined reference to `RC4' ./libtransmission.a(crypto.o): In function `tr_cryptoEncrypt': ..crypto.c:258: undefined reference to `RC4' ./libtransmission.a(crypto.o): In function `tr_cryptoRandInt': ..crypto.c:304: undefined reference to `RAND_pseudo_bytes' ./libtransmission.a(crypto.o): In function `tr_cryptoRandBuf': ..crypto.c:335: undefined reference to `RAND_pseudo_bytes' ..crypto.c:336: undefined reference to `ERR_get_error' ..crypto.c:336: undefined reference to `ERR_error_string_n' ./libtransmission.a(inout.o): In function `recalculateHash': ..inout.c:276: undefined reference to `SHA1_Init' ..inout.c:287: undefined reference to `SHA1_Update' ..inout.c:293: undefined reference to `SHA1_Final' collect2: ld returned 1 exit status make[1]: * [blocklist-test] Error 1 make[1]: Leaving directory `' make: * [all-recursive] Error 1 ==================================================

Change History (2)

comment:1 Changed 10 years ago by jordan

  • Resolution set to invalid
  • Status changed from new to closed

Hi yukoj2004, it looks like you're not linking against openssl. All those functions listed as undefined references in that log come from openssl.

Hope this helps!

comment:2 Changed 10 years ago by yukoj2004

hi jordan how to set env =================================================================== Making all in extras make[1]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/extras' make[1]: Nothing to be done for all'. make[1]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/extras' Making all in third-party make[1]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party' Making all in dht make[2]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/dht' make[2]: Nothing to be done for all'. make[2]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/dht' Making all in libnatpmp make[2]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/libnatpmp' make[2]: Nothing to be done for all'. make[2]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/libnatpmp' Making all in miniupnp make[2]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/miniupnp' make all-am make[3]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/miniupnp' make[3]: Nothing to be done for all-am'. make[3]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/miniupnp' make[2]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/miniupnp' Making all in libutp make[2]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/libutp' make[2]: Nothing to be done for all'. make[2]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party/libutp' make[2]: Entering directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party' make[2]: Nothing to be done for all-am'. make[2]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party' make[1]: Leaving directory /home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/third-party' Making all in libtransmission make[1]: Entering directory `/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/libtransmission'

CCLD blocklist-test

/home/KKK/MIPS_1.7_SDK/tools-gcc-4.1/bin/../lib/gcc/mips64-linux-gnu/4.1.2/../../../../mips64-linux-gnu/bin/ld: cannot find -lopenssl collect2: ld returned 1 exit status make[1]: * [blocklist-test] Error 1 make[1]: Leaving directory `/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/libtransmission'

my script ======================================= OPENSSL_CFLAGS="-I/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/openssl-1.0.0d/include" export LIBCURL_CFLAGS="-I/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/curl-7.21.7/include" export CC="mips64-linux-gnu-gcc" export CXX="mips64-linux-gnu-g++" export LIBCURL_LIBS="-L/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/curl-7.21.7/lib/.libs -lcurl" export OPENSSL_LIBS="-L/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/openssl-1.0.0d/build/usr/local/ssl/lib -lopenssl" export LIBEVENT_CFLAGS="-I/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/libevent-2.0.12-stable/include" export LIBEVENT_LIBS="-L/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/ibevent-2.0.12-stable/build/lib -levent" export ZLIB_LIBS="-L/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/zlib-1.2.5/build/lib/" export ZLIB_CFLAGS="-I/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/zlib-1.2.5/build/include" export LIBS="-L/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/zlib-1.2.5/build/lib/" export CFLAGS="-I/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/zlib-1.2.5/build/include" ./configure --build=mips64-linux-gnu --target=mips64 \ --program-prefix=/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/transmission-2.32/build/ \ export LD_LIBRARY_PATH="/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/libevent-2.0.12-stable/build/lib -levent":"/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/curl-7.21.7/lib/.libs -lcurl":"/home/KKK/MIPS_1.7_SDK/linux/embedded_rootfs/bt/openssl-1.0.0d/build/usr/local/ssl/lib -lopenssl" =================================================================================

Note: See TracTickets for help on using tickets.