[rtmpdump] Build error cross compiling on Mac OS X 10.8

Sebastian Holmqvist sebastian.holmqvist at gmail.com
Tue Mar 19 18:44:52 CET 2013


Greetings!

I'm attempting to cross-compile for ARM on my OS X machine and keep running into problems. I've included the cross-compiler i PATH, set the prefix and disabled shared libs. I downloaded a tarball directly from Git.

It seems as if it finds all the files, but there's a linkage error somewhere. Neither OPENSSL, POLARSSL nor GNUTLS makes it past the initial compile-stage. I've even tried cross-compiling both ZLIB, POLARSSL and OPENSSL prior to including them but with the same results.

Any ideas? I'm all out...

export PATH=/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/bin:$PATH
export PREFIX=/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi
export LDFLAGS="-L/usr/local/lib"
export CPPFLAGS="-I/usr/local/include"

export XLDFLAGS="$LDFLAGS -L$PREFIX/lib"
export XCFLAGS="$CPPFLAGS -I$PREFIX/include"

$ make prefix=$PREFIX CROSS_COMPILE=arm-unknown-linux-gnueabi- SHARED=
arm-unknown-linux-gnueabi-gcc -Wall -I/usr/local/include -I/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/include  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2  -I/usr/local/include  -c -o rtmp.o rtmp.c
rtmp.c: In function 'RTMP_ReadPacket':
rtmp.c:3563:7: warning: variable 'didAlloc' set but not used [-Wunused-but-set-variable]
arm-unknown-linux-gnueabi-gcc -Wall -I/usr/local/include -I/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/include  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2  -I/usr/local/include  -c -o log.o log.c
arm-unknown-linux-gnueabi-gcc -Wall -I/usr/local/include -I/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/include  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2  -I/usr/local/include  -c -o amf.o amf.c
arm-unknown-linux-gnueabi-gcc -Wall -I/usr/local/include -I/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/include  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2  -I/usr/local/include  -c -o hashswf.o hashswf.c
arm-unknown-linux-gnueabi-gcc -Wall -I/usr/local/include -I/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/include  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2  -I/usr/local/include  -c -o parseurl.o parseurl.c
arm-unknown-linux-gnueabi-ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
arm-unknown-linux-gnueabi-ar: creating librtmp.a
arm-unknown-linux-gnueabi-gcc -Wall -I/usr/local/include -I/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/include  -DRTMPDUMP_VERSION=\"v2.4\"   -O2 -I/usr/local/include  -c -o rtmpdump.o rtmpdump.c
arm-unknown-linux-gnueabi-gcc -Wall -L/usr/local/lib -L/Volumes/CrosstoolCompile/x-tools/arm-unknown-linux-gnueabi/lib -o rtmpdump rtmpdump.o -Llibrtmp -lrtmp -lssl -lcrypto -lz  
librtmp/librtmp.a(rtmp.o): In function `isValidPublicKey':
rtmp.c:(.text+0x47c): undefined reference to `BN_new'
rtmp.c:(.text+0x48c): undefined reference to `BN_set_word'
rtmp.c:(.text+0x498): undefined reference to `BN_cmp'
rtmp.c:(.text+0x4ac): undefined reference to `BN_copy'
rtmp.c:(.text+0x4b8): undefined reference to `BN_sub_word'
rtmp.c:(.text+0x4c4): undefined reference to `BN_cmp'
rtmp.c:(.text+0x4d8): undefined reference to `BN_CTX_new'
rtmp.c:(.text+0x4f4): undefined reference to `BN_mod_exp'
rtmp.c:(.text+0x4fc): undefined reference to `BN_CTX_free'
rtmp.c:(.text+0x500): undefined reference to `BN_value_one'
rtmp.c:(.text+0x50c): undefined reference to `BN_cmp'
rtmp.c:(.text+0x52c): undefined reference to `BN_free'
librtmp/librtmp.a(rtmp.o): In function `DHGenerateKey':
rtmp.c:(.text+0x5c4): undefined reference to `DH_generate_key'
rtmp.c:(.text+0x5d8): undefined reference to `BN_hex2bn'
rtmp.c:(.text+0x600): undefined reference to `BN_free'
rtmp.c:(.text+0x614): undefined reference to `BN_free'
rtmp.c:(.text+0x61c): undefined reference to `BN_free'
rtmp.c:(.text+0x62c): undefined reference to `BN_free'
librtmp/librtmp.a(rtmp.o): In function `InitRC4Encryption':
rtmp.c:(.text+0x6a4): undefined reference to `HMAC_CTX_init'
rtmp.c:(.text+0x6a8): undefined reference to `EVP_sha256'
rtmp.c:(.text+0x6c0): undefined reference to `HMAC_Init_ex'
rtmp.c:(.text+0x6d0): undefined reference to `HMAC_Update'
rtmp.c:(.text+0x6e0): undefined reference to `HMAC_Final'
rtmp.c:(.text+0x6e8): undefined reference to `HMAC_CTX_cleanup'
rtmp.c:(.text+0x714): undefined reference to `RC4_set_key'
rtmp.c:(.text+0x71c): undefined reference to `HMAC_CTX_init'
rtmp.c:(.text+0x720): undefined reference to `EVP_sha256'
rtmp.c:(.text+0x738): undefined reference to `HMAC_Init_ex'
rtmp.c:(.text+0x748): undefined reference to `HMAC_Update'
rtmp.c:(.text+0x758): undefined reference to `HMAC_Final'
rtmp.c:(.text+0x760): undefined reference to `HMAC_CTX_cleanup'
rtmp.c:(.text+0x78c): undefined reference to `RC4_set_key'
librtmp/librtmp.a(rtmp.o): In function `HMACsha256':
rtmp.c:(.text+0x9e4): undefined reference to `HMAC_CTX_init'
rtmp.c:(.text+0x9e8): undefined reference to `EVP_sha256'
rtmp.c:(.text+0xa04): undefined reference to `HMAC_Init_ex'
rtmp.c:(.text+0xa14): undefined reference to `HMAC_Update'
rtmp.c:(.text+0xa24): undefined reference to `HMAC_Final'
rtmp.c:(.text+0xa2c): undefined reference to `HMAC_CTX_cleanup'
librtmp/librtmp.a(rtmp.o): In function `b64enc.isra.7':
rtmp.c:(.text+0xbe0): undefined reference to `BIO_f_base64'
rtmp.c:(.text+0xbe4): undefined reference to `BIO_new'
rtmp.c:(.text+0xbec): undefined reference to `BIO_s_mem'
rtmp.c:(.text+0xbf0): undefined reference to `BIO_new'
rtmp.c:(.text+0xbfc): undefined reference to `BIO_push'
rtmp.c:(.text+0xc0c): undefined reference to `BIO_write'
rtmp.c:(.text+0xc20): undefined reference to `BIO_ctrl'
rtmp.c:(.text+0xc5c): undefined reference to `BIO_ctrl'
rtmp.c:(.text+0xc8c): undefined reference to `BIO_free_all'
librtmp/librtmp.a(rtmp.o): In function `DHComputeSharedSecretKey.constprop.13':
rtmp.c:(.text+0xef0): undefined reference to `BN_bin2bn'
rtmp.c:(.text+0xf04): undefined reference to `BN_hex2bn'
rtmp.c:(.text+0xf30): undefined reference to `BN_free'
rtmp.c:(.text+0xf38): undefined reference to `BN_free'
rtmp.c:(.text+0xf54): undefined reference to `DH_compute_key'
librtmp/librtmp.a(rtmp.o): In function `DHGetPublicKey.constprop.14':
rtmp.c:(.text+0xfac): undefined reference to `BN_num_bits'
rtmp.c:(.text+0xff0): undefined reference to `BN_bn2bin'
librtmp/librtmp.a(rtmp.o): In function `DHInit.constprop.15':
rtmp.c:(.text+0x1000): undefined reference to `DH_new'
rtmp.c:(.text+0x100c): undefined reference to `BN_new'
rtmp.c:(.text+0x1024): undefined reference to `BN_hex2bn'
rtmp.c:(.text+0x1034): undefined reference to `DH_free'
rtmp.c:(.text+0x104c): undefined reference to `BN_set_word'
librtmp/librtmp.a(rtmp.o): In function `RTMP_TLS_Init':
rtmp.c:(.text+0x11a4): undefined reference to `SSL_load_error_strings'
rtmp.c:(.text+0x11a8): undefined reference to `SSL_library_init'
rtmp.c:(.text+0x11ac): undefined reference to `OpenSSL_add_all_digests'
rtmp.c:(.text+0x11b0): undefined reference to `SSLv23_method'
rtmp.c:(.text+0x11b4): undefined reference to `SSL_CTX_new'
rtmp.c:(.text+0x11cc): undefined reference to `SSL_CTX_ctrl'
rtmp.c:(.text+0x11d8): undefined reference to `SSL_CTX_set_default_verify_paths'
librtmp/librtmp.a(rtmp.o): In function `RTMP_TLS_AllocServerContext':
rtmp.c:(.text+0x1200): undefined reference to `SSLv23_server_method'
rtmp.c:(.text+0x1204): undefined reference to `SSL_CTX_new'
rtmp.c:(.text+0x1210): undefined reference to `SSL_CTX_use_certificate_chain_file'
rtmp.c:(.text+0x1228): undefined reference to `SSL_CTX_use_PrivateKey_file'
rtmp.c:(.text+0x1244): undefined reference to `SSL_CTX_free'
librtmp/librtmp.a(rtmp.o): In function `RTMP_TLS_FreeServerContext':
rtmp.c:(.text+0x125c): undefined reference to `SSL_CTX_free'
librtmp/librtmp.a(rtmp.o): In function `RTMP_TLS_Accept':
rtmp.c:(.text+0x20ac): undefined reference to `SSL_new'
rtmp.c:(.text+0x20bc): undefined reference to `SSL_set_fd'
rtmp.c:(.text+0x20c4): undefined reference to `SSL_accept'
librtmp/librtmp.a(rtmp.o): In function `RTMPSockBuf_Fill':
rtmp.c:(.text+0x2410): undefined reference to `SSL_read'
librtmp/librtmp.a(rtmp.o): In function `RTMPSockBuf_Send':
rtmp.c:(.text+0x2684): undefined reference to `SSL_write'
librtmp/librtmp.a(rtmp.o): In function `RTMPSockBuf_Close':
rtmp.c:(.text+0x2774): undefined reference to `SSL_shutdown'
rtmp.c:(.text+0x277c): undefined reference to `SSL_free'
librtmp/librtmp.a(rtmp.o): In function `RTMP_Close':
rtmp.c:(.text+0x2a00): undefined reference to `DH_free'
librtmp/librtmp.a(rtmp.o): In function `WriteN':
rtmp.c:(.text+0x2b2c): undefined reference to `RC4'
librtmp/librtmp.a(rtmp.o): In function `ReadN':
rtmp.c:(.text+0x4144): undefined reference to `RC4'
librtmp/librtmp.a(rtmp.o): In function `SHandShake':
rtmp.c:(.text+0x4a88): undefined reference to `RC4'
rtmp.c:(.text+0x4aac): undefined reference to `RC4'
librtmp/librtmp.a(rtmp.o): In function `HandShake.isra.9':
rtmp.c:(.text+0x57b0): undefined reference to `RC4'
librtmp/librtmp.a(rtmp.o):rtmp.c:(.text+0x57d4): more undefined references to `RC4' follow
librtmp/librtmp.a(rtmp.o): In function `RTMP_Connect1':
rtmp.c:(.text+0x5cbc): undefined reference to `SSL_new'
rtmp.c:(.text+0x5cc8): undefined reference to `SSL_set_fd'
rtmp.c:(.text+0x5cd0): undefined reference to `SSL_connect'
librtmp/librtmp.a(rtmp.o): In function `HandleInvoke.part.10':
rtmp.c:(.text+0x79b8): undefined reference to `MD5_Init'
rtmp.c:(.text+0x79cc): undefined reference to `MD5_Update'
rtmp.c:(.text+0x79e0): undefined reference to `MD5_Update'
rtmp.c:(.text+0x79fc): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7a08): undefined reference to `MD5_Final'
rtmp.c:(.text+0x7a94): undefined reference to `MD5_Init'
rtmp.c:(.text+0x7aa4): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7ad0): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7adc): undefined reference to `MD5_Final'
rtmp.c:(.text+0x7da0): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7db8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7dc8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7dd4): undefined reference to `MD5_Final'
rtmp.c:(.text+0x7f88): undefined reference to `MD5_Init'
rtmp.c:(.text+0x7fa8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7fb8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7fc8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7fd8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x7ff8): undefined reference to `MD5_Update'
rtmp.c:(.text+0x8004): undefined reference to `MD5_Final'
rtmp.c:(.text+0x807c): undefined reference to `MD5_Init'
rtmp.c:(.text+0x808c): undefined reference to `MD5_Update'
rtmp.c:(.text+0x809c): undefined reference to `MD5_Update'
rtmp.c:(.text+0x80b4): undefined reference to `MD5_Update'
rtmp.c:(.text+0x80c0): undefined reference to `MD5_Final'
rtmp.c:(.text+0x8108): undefined reference to `MD5_Init'
rtmp.c:(.text+0x8118): undefined reference to `MD5_Update'
rtmp.c:(.text+0x8128): undefined reference to `MD5_Update'
rtmp.c:(.text+0x8144): undefined reference to `MD5_Update'
rtmp.c:(.text+0x8154): undefined reference to `MD5_Update'
rtmp.c:(.text+0x8164): undefined reference to `MD5_Update'
librtmp/librtmp.a(rtmp.o):rtmp.c:(.text+0x8174): more undefined references to `MD5_Update' follow
librtmp/librtmp.a(rtmp.o): In function `HandleInvoke.part.10':
rtmp.c:(.text+0x81d0): undefined reference to `MD5_Final'
librtmp/librtmp.a(hashswf.o): In function `swfcrunch':
hashswf.c:(.text+0x5c): undefined reference to `HMAC_Update'
hashswf.c:(.text+0x98): undefined reference to `inflate'
hashswf.c:(.text+0xbc): undefined reference to `HMAC_Update'
hashswf.c:(.text+0x108): undefined reference to `HMAC_Update'
librtmp/librtmp.a(hashswf.o): In function `HTTP_get':
hashswf.c:(.text+0x340): undefined reference to `SSL_new'
hashswf.c:(.text+0x358): undefined reference to `SSL_set_fd'
hashswf.c:(.text+0x364): undefined reference to `SSL_connect'
librtmp/librtmp.a(hashswf.o): In function `RTMP_HashSWF':
hashswf.c:(.text+0xa7c): undefined reference to `HMAC_CTX_init'
hashswf.c:(.text+0xa80): undefined reference to `EVP_sha256'
hashswf.c:(.text+0xa9c): undefined reference to `HMAC_Init_ex'
hashswf.c:(.text+0xaac): undefined reference to `inflateInit_'
hashswf.c:(.text+0xafc): undefined reference to `inflateEnd'
hashswf.c:(.text+0xb3c): undefined reference to `HMAC_CTX_cleanup'
hashswf.c:(.text+0xea4): undefined reference to `HMAC_Final'
collect2: error: ld returned 1 exit status
make: *** [rtmpdump] Error 1

--
Sebastian Holmqvist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20130319/d22ba617/attachment-0001.html>


More information about the rtmpdump mailing list