[x264-devel] relocation error on x86_64

sean darcy seandarcy2 at gmail.com
Fri Aug 19 17:04:47 CEST 2005


I've built today's svn of x264 - using -fPIC. I'm now trying to build
ffmpeg ( also with -fPIV ) with x264, but:

gcc -shared -o libavcodec.so bitstream.o utils.o mem.o allcodecs.o
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o [........]
vorbis.o vp3.o vqavideo.o wmadec.o wnv1.o ws-snd1.o xan.o xl.o
pthread.o  faad.o faac.o xvidff.o x264.o libpostproc/postprocess.o
mp3lameaudio.o oggvorbis.o oggtheora.o  -lm -lx264 -lz -ldl -lpthread
-L../libavutil -lavutil -lfaac -lxvidcore -lx264 -lmp3lame -lvorbisenc
-lvorbis -ltheora -logg  -Wl,--warn-common -rdynamic -ldl
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a(dct-a.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status

Is this as simple as x264.a ( a static lib ) cannot be used to build
libavcodec.so?  Can I only build the ffmpeg static libs? Is generating
x264.so a real problem?

I tried building ffmpeg with just static libs, then I got:

gcc -O3 -g -Wall -Wno-switch  -mtune=athlon64 -fPIC -ftree-vectorize
-pipe -mfpmath=sse -I. -I'/usr/src/redhat/BUILD/ffmpeg'
-I'/usr/src/redhat/BUILD/ffmpeg'/libavutil
-I'/usr/src/redhat/BUILD/ffmpeg'/libavcodec
-I'/usr/src/redhat/BUILD/ffmpeg'/libavformat -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o cmdutils.o cmdutils.c
gcc -Wl,--warn-common -rdynamic -ldl -I/usr/X11R6/include/X11 -g  -o
ffmpeg_g ffmpeg.o cmdutils.o -L./libavformat -lavformat -L./libavcodec
-lavcodec -L./libavutil -lavutil -lm -lx264 -lz -ldl -lpthread
-lmp3lame -lvorbisenc -lvorbis -ltheora -logg -lfaac -lxvidcore
/usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a(display-x11.o):
In function `disp_line':
: undefined reference to `XDrawLine'
/usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a(display-x11.o):
In function `disp_rect':
: undefined reference to `XDrawRectangle'
.....................


Which left me completely puzzled.

sean

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list