[rtmpdump] Compiling RTMPdump on Max OS X

Scott D. Davilla davilla at xbmc.org
Tue Jul 20 23:54:11 CEST 2010


>When I first tried to compile RTMPdump on Mac OS X, I received the
>error "-L must be immediately followed by a directory path (no
>space)".  Please apply this fix to the Makefile.
>
>I removed the space between "-L librtmp" and now I receive the error
>"in librtmp/librtmp.so, can't link with bundle (MH_BUNDLE) only dylibs
>(MH_DYLIB)".  Can you provide some insight into what this error means?
>
>$ make SYS=darwin
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o rtmp.o rtmp.c
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o log.o log.c
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o amf.o amf.c
>In file included from amf.c:33:
>bytes.h:74:2: warning: #warning "Float word order not defined,
>assuming the same as byte order!"
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o hashswf.o hashswf.c
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o parseurl.o parseurl.c
>ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
>ar: creating archive librtmp.a
>gcc -bundle -flat_namespace -undefined suppress -fno-common
>-headerpad_max_install_names  -o librtmp.so.0 rtmp.o log.o amf.o
>hashswf.o parseurl.o  -lssl -lcrypto -lz
>ln -sf librtmp.so.0 librtmp.so
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpdump.o rtmpdump.c
>gcc -Wall  -o rtmpdump rtmpdump.o -L librtmp -lrtmp -lssl -lcrypto -lz
>ld: -L must be immediately followed by a directory path (no space)
>collect2: ld returned 1 exit status
>make: *** [rtmpdump] Error 1
>
>
>$ make SYS=darwin
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o rtmp.o rtmp.c
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o log.o log.c
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o amf.o amf.c
>In file included from amf.c:33:
>bytes.h:74:2: warning: #warning "Float word order not defined,
>assuming the same as byte order!"
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o hashswf.o hashswf.c
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c
>-o parseurl.o parseurl.c
>ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
>ar: creating archive librtmp.a
>gcc -bundle -flat_namespace -undefined suppress -fno-common
>-headerpad_max_install_names  -o librtmp.so.0 rtmp.o log.o amf.o
>hashswf.o parseurl.o  -lssl -lcrypto -lz
>ln -sf librtmp.so.0 librtmp.so
>gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpdump.o rtmpdump.c
>gcc -Wall  -o rtmpdump rtmpdump.o -Llibrtmp -lrtmp -lssl -lcrypto -lz
>ld: in librtmp/librtmp.so, can't link with bundle (MH_BUNDLE) only
>dylibs (MH_DYLIB)
>collect2: ld returned 1 exit status
>make: *** [rtmpdump] Error 1

RTMPdump should really be linking to the static lib version of 
librtmp. librtmp.so is one form for dynamic lib on OSX, the other 
form is a dylib, both forms have embedded paths that make build/run 
without install difficult.

You could try changing the RTMPdump make to explicitly link to 
librtmp/librtmp.a

When I get a chance, I'll look into this.





More information about the rtmpdump mailing list