[rtmpdump] Compiling RTMPdump on Max OS X

Nickolaus Padgett nick.padgett at gmail.com
Wed Jul 21 17:54:06 CEST 2010


On Wed, Jul 21, 2010 at 1:53 AM, Scott D. Davilla <davilla at xbmc.org> wrote:
> in librtmp/Makefile, change
>
> SO_darwin=so.0
>
> and
>
> SO_LDFLAGS_darwin=-bundle -flat_namespace -undefined suppress -fno-common \
>  -headerpad_max_install_names $(XLDFLAGS)
>
> to
>
> SO_darwin=dylib
>
> and
>
> SO_LDFLAGS_darwin=-dynamiclib -twolevel_namespace $(XLDFLAGS)
>
>
> This will build a dylib. The Makefile will also have to be fixed as it
> assume .so.0 naming and dylibs also don't need the symlink.

I made the suggested changes to librtmp/Makefile, but I do not
understand what changes I need to make to ./Makefile.  I was able to
successfully compile with just the changes to librtmp/Makefile.
However, when I try to execute rtmpdump, I received the error
"Referenced from: ./rtmpdump Reason:image not found".  I presume this
is because I didn't make the appropriate changes to ./Makefile.  Could
you be more descriptive?  Once I am able to successfully compile,
should I submit a patch of the working changes?

$ 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 -dynamiclib -twolevel_namespace   -o librtmp.dylib rtmp.o log.o
amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz
ln -sf librtmp.dylib 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
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpgw.o rtmpgw.c
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o thread.o thread.c
gcc -Wall  -o rtmpgw rtmpgw.o thread.o -lpthread -Llibrtmp -lrtmp
-lssl -lcrypto -lz
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpsrv.o rtmpsrv.c
gcc -Wall  -o rtmpsrv rtmpsrv.o thread.o -lpthread -Llibrtmp -lrtmp
-lssl -lcrypto -lz
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpsuck.o rtmpsuck.c
gcc -Wall  -o rtmpsuck rtmpsuck.o thread.o -lpthread -Llibrtmp -lrtmp
-lssl -lcrypto -lz
$ ./rtmpdump
dyld: Library not loaded: librtmp.dylib
  Referenced from: ./rtmpdump
  Reason: image not found
Trace/BPT trap


More information about the rtmpdump mailing list