[FFmpeg-user] relocation R_X86_64_PC32 against symbol `ff_w1111' can not be used when making a shared object; recompile with -fPIC
gabriel.pettier at gmail.com
Tue Aug 25 14:18:14 CEST 2015
So if i reduce it to
x86_64-linux-gnu-gcc -shared build/temp.linux-x86_64-2.7/ffpyplayer/player.o /home/tangible/Dev/ffpyplayer/ffmpeg/lib/libswscale.a -o /home/tangible/Dev/ffpyplayer/ffpyplayer/player.so
i get the same error, but if i remove the reference to player.o, it
builds, but player.o was also built with -fPIC.
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/tangible/Dev/ffpyplayer/sdl/include/SDL2 -I/home/tangible/Dev/ffpyplayer/ffmpeg/include -I/usr/include/python2.7 -c ffpyplayer/player.c -o build/temp.linux-x86_64-2.7/ffpyplayer/player.o -O2 -fno-strict-aliasing -Wno-error=format-security -fPIC
and no matter how i simplify this, i still get the same error.
x86_64-linux-gnu-gcc -I/home/tangible/Dev/ffpyplayer/ffmpeg/include -I/home/tangible/Dev/ffpyplayer/sdl/include/SDL2 -I/usr/include/python2.7 -c ffpyplayer/player.c -o build/temp.linux-x86_64-2.7/ffpyplayer/player.o -fPIC
ffpyplayer/player.c: In function ‘__pyx_f_10ffpyplayer_6player_11MediaPlayer_close_player’:
ffpyplayer/player.c:5155:5: warning: format not a string literal and no format arguments [-Wformat-security]
x86_64-linux-gnu-gcc -pthread -shared -fPIC build/temp.linux-x86_64-2.7/ffpyplayer/player.o /home/tangible/Dev/ffpyplayer/ffmpeg/lib/libswscale.a -o /home/tangible/Dev/ffpyplayer/ffpyplayer/player.so
/usr/bin/ld: /home/tangible/Dev/ffpyplayer/ffmpeg/lib/libswscale.a(rgb2rgb.o): relocation R_X86_64_PC32 against symbol `ff_w1111' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
any help appreciated.
On Tue, Aug 25, 2015 at 12:43:50PM +0200, Gabriel Pettier wrote:
>I tried with master (from git://source.ffmpeg.org/ffmpeg.git), as
>well as an older commit (1f7b7) that has been tested with ffpyplayer
>in the past, to be sure, since i got the same issue, i went back to
>I used make clean between each try, and i just tried again with a
>make distclean before to be sure, no dice.
>Your command does indeed work for me, i'll try to reduce the CC
>command of my makefile until i find what flag or target is causing
>On Tue, Aug 25, 2015 at 09:57:24AM +0000, Carl Eugen Hoyos wrote:
>>Gabriel Pettier <gabriel.pettier <at> gmail.com> writes:
>>>I tried a lot of different ones, here are a few (by order)
>>Did you run "make distclean" after each try?
>>What version of FFmpeg is this?
>>I was unable to reproduce your issue with the following
>>$ ./configure && make libswscale/libswscale.a
>>$ gcc libswscale/libswscale.a -shared -o out.so
>>ffmpeg-user mailing list
>>ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user