Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

rtmpdump-2.2e and ffmpeg-0.6

(http://stream-recorder.com/forum/showthread.php?t=6870)

taurnil 06-18-2010 06:03 AM

rtmpdump-2.2e and ffmpeg-0.6


 
I have compiled rtmpdump from source (Linux) and when setting --enable-librtmp to compile ffmpeg, the make will barf on;

Code:

LD libavformat/libavformat.so.52
/usr/bin/ld: /usr/lib64/librtmp.a(rtmp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/librtmp.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libavformat/libavformat.so.52] Error 1

So normally in this type of case I would add -fPIC to the CFLAGS. Then recompile the app, in this case rtmpdump, then recompile in this case ffmpeg and be on my merry way. However, adding -fPIC to the rtmpdump make process still causes the ffmpeg make to barf.

Any thoughts or pointers to resolve this?

taurnil 06-18-2010 09:05 AM

Re: rtmpdump-2.2e and ffmpeg-0.6 [SOLVED]


 
Quote:

Originally Posted by taurnil (Post 19666)
I have compiled rtmpdump from source (Linux) and when setting --enable-librtmp to compile ffmpeg, the make will barf on;

Code:

LD      libavformat/libavformat.so.52
/usr/bin/ld: /usr/lib64/librtmp.a(rtmp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/librtmp.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libavformat/libavformat.so.52] Error 1

So normally in this type of case I would add -fPIC to the CFLAGS. Then recompile the app, in this case rtmpdump, then recompile in this case ffmpeg and be on my merry way. However, adding -fPIC to the rtmpdump make process still causes the ffmpeg make to barf.

Any thoughts or pointers to resolve this?

Ah ha. It seems the CFLAG variable I was using to inject -fPIC was not being picked up by the Makefile. Manually inserting -fPIC in the CFLAG line fixed it.

hyc 06-18-2010 02:15 PM

Re: rtmpdump-2.2e and ffmpeg-0.6


 
Manually inserting anything into the Makefile should never be necessary.

Use "make XCFLAGS=..." to add to the CFLAGS.

All of the available variables are clearly defined in the Makefile.


All times are GMT -6. The time now is 06:38 PM.