[rtmpdump] RTMPDump - Segmentation Fault

Ulrik Dickow udickow at gmail.com
Wed Dec 12 11:07:34 CET 2012


On 12-12-2012 06:34, Matt Hughes wrote:
> I spoke too soon, 
> On my ubuntu 10.10 machine, running rtmpdump from the build dir produced
> a seg fault, and then running checkinstall fixed it, but I just tried
> doing checkinstall on my 12.04 machine and it still produces a seg fault
> afterwards
> 
>     htpc at myth-htpc:~$ rtmpdump

As others have noted in this thread, watch out for shared libraries.

I like to test in the build dir too, but then use

	$ env LD_LIBRARY_PATH=`pwd`/librtmp ldd ./rtmpdump

first to make sure that the right libs are used.  Then remove 'ldd' and
add more arguments to test a bit more.  If you didn't set
LD_LIBRARY_PATH, you'd see that it used a system librtmp instead of your
new one.

To have several versions installed and easily testable in parallel, you
can generalize the LD_LIBRARY_PATH usage a bit, e.g. like I did by

	$ make prefix=/opt/rtmpdump-2.4-git1 install

and then move things around and create symlinks and a small script:

[ukd at quadtux ~]$ ll -d /opt/rtmpdump*|perl -pe 's/(\S+\s+){3}//'
root   17 25 jul 14:26 /opt/rtmpdump -> rtmpdump-2.4-git1
root 4096 25 jul 14:12 /opt/rtmpdump-2.4-git1
root 4096 13 aug 14:16 /opt/rtmpdump-2.4-git2

[ukd at quadtux ~]$ ll /opt/rtmpdump/bin|perl -pe 's/(\S+\s+){3}//'
totalt 0
ukd 23 25 jul 14:23 rtmpdump -> ../libexec/rtmp-exec.sh
ukd 23 25 jul 14:24 rtmpgw -> ../libexec/rtmp-exec.sh
ukd 23 25 jul 14:24 rtmpsrv -> ../libexec/rtmp-exec.sh
ukd 23 25 jul 14:24 rtmpsuck -> ../libexec/rtmp-exec.sh

[ukd at quadtux ~]$ ll /opt/rtmpdump/libexec|perl -pe 's/(\S+\s+){3}//'
totalt 124
ukd 32724 24 jul 17:35 rtmpdump
ukd   152 25 jul 14:21 rtmp-exec.sh
ukd 28906 24 jul 17:35 rtmpgw
ukd 27294 24 jul 17:35 rtmpsrv
ukd 26304 24 jul 17:35 rtmpsuck

[ukd at quadtux ~]$ cat /opt/rtmpdump/libexec/rtmp-exec.sh
#! /bin/sh
topdir=/opt/rtmpdump-2.4-git1
cmdname=`basename $0`
export LD_LIBRARY_PATH="$topdir/lib"
exec "$topdir/libexec/$cmdname" ${1+"$@"}

To use the script with other apps, just change the topdir (and maybe
'libexec').

-- 
Ulrik Dickow
OpenPGP fingerprint: F502 8C16 8E2C 3028 A404  8CB5 59F8 3B61 6399 F550



More information about the rtmpdump mailing list