[rtmpdump] Compiling RTMPdump on Max OS X

Nickolaus Padgett nick.padgett at gmail.com
Fri Jul 23 04:50:50 CEST 2010


On Thu, Jul 22, 2010 at 6:29 PM, Howard Chu <hyc at highlandsun.com> wrote:
>> Attached is a patch that I needed in order to compile on Mac OS X.
>
> This is all fine with me; the XBMC guys were the ones who wanted it built as
> a bundle.
>
> The Debian guys were the ones who wanted the programs to use the dynamic
> library. IMO they don't know what they're talking about but it was easier to
> agree and shut them up than explain to them why they're wrong.
>
> Ultimately I don't care how anyone else builds this stuff. Installation is a
> packaging issue and not my concern. I run it out of my build directory; it
> never gets installed on any of my boxes.

I've run into more issues with compiling on a Mac.  When running a
"sudo make SYS=darwin install", I receive the error "No rule to make
target `install_dylib', needed by `install'.  Stop.".  In order to
successfully install I have to apply the patch, run "sudo make
SYS=darwin install", revert the changes to ./librtmp/Makefile, and the
rerun "sudo make SYS=darwin install".

Most recent error:

$ sudo make SYS=darwin install
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpdump.o rtmpdump.c
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  -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
mkdir -p /usr/local/bin /usr/local/sbin /usr/local/man/man1 /usr/local/man/man8
cp rtmpdump /usr/local/bin
cp rtmpgw rtmpsrv rtmpsuck /usr/local/sbin
cp rtmpdump.1 /usr/local/man/man1
cp rtmpgw.8 /usr/local/man/man8
sed -e "s;@prefix@;/usr/local;" -e "s;@VERSION@;v2.3;" \
		-e "s;@CRYPTO_REQ@;libssl,libcrypto;" librtmp.pc.in > librtmp.pc
mkdir -p /usr/local/include/librtmp /usr/local/lib/pkgconfig /usr/local/man/man3
cp amf.h http.h log.h rtmp.h /usr/local/include/librtmp
cp librtmp.a /usr/local/lib
cp librtmp.pc /usr/local/lib/pkgconfig
cp librtmp.3 /usr/local/man/man3
make[1]: *** No rule to make target `install_dylib', needed by `install'.  Stop.
make: *** [install] Error 2

To successfully install:

$ make clean
rm -f *.o rtmpdump rtmpgw rtmpsrv rtmpsuck
rm -f *.o *.a *.so *.so.0
$ sudo make SYS=darwin install
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpdump.o rtmpdump.c
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  -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
mkdir -p /usr/local/bin /usr/local/sbin /usr/local/man/man1 /usr/local/man/man8
cp rtmpdump /usr/local/bin
cp rtmpgw rtmpsrv rtmpsuck /usr/local/sbin
cp rtmpdump.1 /usr/local/man/man1
cp rtmpgw.8 /usr/local/man/man8
sed -e "s;@prefix@;/usr/local;" -e "s;@VERSION@;v2.3;" \
		-e "s;@CRYPTO_REQ@;libssl,libcrypto;" librtmp.pc.in > librtmp.pc
mkdir -p /usr/local/include/librtmp /usr/local/lib/pkgconfig /usr/local/man/man3
cp amf.h http.h log.h rtmp.h /usr/local/include/librtmp
cp librtmp.a /usr/local/lib
cp librtmp.pc /usr/local/lib/pkgconfig
cp librtmp.3 /usr/local/man/man3
make[1]: *** No rule to make target `install_dylib', needed by `install'.  Stop.
make: *** [install] Error 2
$ sudo make SYS=darwin install
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
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  -o rtmpdump rtmpdump.o -Llibrtmp -lrtmp -lssl -lcrypto -lz
gcc -Wall  -o rtmpgw rtmpgw.o thread.o -lpthread -Llibrtmp -lrtmp
-lssl -lcrypto -lz
gcc -Wall  -o rtmpsrv rtmpsrv.o thread.o -lpthread -Llibrtmp -lrtmp
-lssl -lcrypto -lz
gcc -Wall  -o rtmpsuck rtmpsuck.o thread.o -lpthread -Llibrtmp -lrtmp
-lssl -lcrypto -lz
mkdir -p /usr/local/bin /usr/local/sbin /usr/local/man/man1 /usr/local/man/man8
cp rtmpdump /usr/local/bin
cp rtmpgw rtmpsrv rtmpsuck /usr/local/sbin
cp rtmpdump.1 /usr/local/man/man1
cp rtmpgw.8 /usr/local/man/man8
sed -e "s;@prefix@;/usr/local;" -e "s;@VERSION@;v2.3;" \
		-e "s;@CRYPTO_REQ@;libssl,libcrypto;" librtmp.pc.in > librtmp.pc
mkdir -p /usr/local/include/librtmp /usr/local/lib/pkgconfig /usr/local/man/man3
cp amf.h http.h log.h rtmp.h /usr/local/include/librtmp
cp librtmp.a /usr/local/lib
cp librtmp.pc /usr/local/lib/pkgconfig
cp librtmp.3 /usr/local/man/man3
cp librtmp.so.0 /usr/local/lib
cd /usr/local/lib; ln -sf librtmp.so.0 librtmp.so


More information about the rtmpdump mailing list