PDA

View Full Version : rtmpdump-2.2e and ffmpeg-0.6


taurnil
06-18-2010, 06:03 AM
I have compiled rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) from source (Linux) and when setting --enable-librtmp to compile ffmpeg, the make will barf on;

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
I have compiled rtmpdump from source (Linux) and when setting --enable-librtmp to compile ffmpeg, the make will barf on;

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
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.