Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 10-27-2016, 03:01 AM
bat999 bat999 is offline
Senior Member
 
Join Date: Apr 2011
Location: UK
Posts: 131
bat999 is on a distinguished road
Question

Problem compiling 64-bit version with Linux.


Hi
The 32-bit version of RTMPDump always compiled for me OK.
But now I have a problem compiling RTMPDump 64-bit.
Code:
$ cat /etc/issue
Linux Mint 18 Sarah \n \l
I download the git...
Code:
git clone --depth 1 git://repo.or.cz/rtmpdump.git
And apply the patch...
Code:
$ cp Patch.diff ~/rtmpdump/Patch.diff; cd rtmpdump; patch -p0 -i Patch.diff
Code:
....
Hunk #54 succeeded at 5266 (offset 2 lines).
Hunk #55 succeeded at 5675 (offset 2 lines).
Hunk #56 succeeded at 5878 (offset 2 lines).
patching file librtmp/rtmp.h
patching file librtmp/rtmp_sys.h
patching file rtmpdump.c
patching file rtmpgw.c
patching file rtmpsrv.c
patching file rtmpsuck.c
patching file thread.c
Then make...
Code:
$ make SHARED= VERSION="v2.4\ KSV-2015-12-14"

But when I try to install it there are errors...

Code:
$ make install
make[1]: Entering directory '/home/user/rtmpdump/librtmp'
gcc -shared -Wl,-soname,librtmp.so.1  -o librtmp.so.1 rtmp.o log.o amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz -lm
/usr/bin/ld: rtmp.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
rtmp.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:92: recipe for target 'librtmp.so.1' failed
make[1]: *** [librtmp.so.1] Error 1
make[1]: Leaving directory '/home/user/rtmpdump/librtmp'
Makefile:76: recipe for target 'librtmp/librtmp.a' failed
make: *** [librtmp/librtmp.a] Error 2
It seems that I have to pass some information about "fPIC" to the compiler.
How do I do this?
Reply With Quote
  #2  
Old 10-29-2016, 02:05 AM
bat999 bat999 is offline
Senior Member
 
Join Date: Apr 2011
Location: UK
Posts: 131
bat999 is on a distinguished road
Default

Re: Problem compiling 64-bit version with Linux.


Hi
It compiles OK if I don't use "SHARED=" in the make command.

Code:
$ make VERSION="v2.4\ KSV-2015-12-14"
Code:
Installing with make install...

========================= Installation results ===========================
make[1]: Entering directory '/home/user/rtmpdump/librtmp'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/rtmpdump/librtmp'
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
make[1]: Entering directory '/home/user/rtmpdump/librtmp'
sed -e "s;@prefix@;/usr/local;" -e "s;@libdir@;/usr/local/lib;" \
	-e "s;@VERSION@;v2.4;" \
	-e "s;@CRYPTO_REQ@;libssl,libcrypto;" \
	-e "s;@PUBLIC_LIBS@;;" \
	-e "s;@PRIVATE_LIBS@;-lm;" librtmp.pc.in > librtmp.pc
mkdir -p /usr/local/include/librtmp /usr/local/lib/pkgconfig /usr/local/man/man3 /usr/local/lib
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.1 /usr/local/lib
cd /usr/local/lib; ln -sf librtmp.so.1 librtmp.so
make[1]: Leaving directory '/home/user/rtmpdump/librtmp'

======================== Installation successful ==========================
Code:
$ rtmpdump
RTMPDump v2.4 KSV-2015-12-14
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 12:12 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons