[mythtv] Compilation error

Jean-Yves Avenard jyavenard at gmail.com
Mon Mar 3 01:00:56 UTC 2008


Hi

I have merged the latest version of ffmpeg and made a few changes here
and there.

I'm having a compilation issue that I haven't encountered before when
compiling on 64 bits target:

/usr/bin/ld: asf.o: relocation R_X86_64_PC32 against `av_read_frame'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value


I had this error with the assembly MMX which I found reference about
on the ffmpeg archive and adding __attribute__((visibility("hidden")))
in front of the definition.

This unfortunately doesn't seem to make any changes for the
av_read_frame declaration.
What is even more weird, libs/libavformat/utils.c where the function
av_read_frame is declared , is compiled with -fPIC

gcc -c -pipe -fomit-frame-pointer -O3 -Wall -Wno-switch
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -w -D_REENTRANT -DPIC -fPIC  -DMMX -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local/mythtv\"
-DLIBDIR=\"/usr/local/mythtv/lib64\" -DHAVE_AV_CONFIG_H
-D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED
-I/usr/lib64/qt-3.3/mkspecs/default -I. -I/usr/local/mythtv/include
-I/usr/include/v4l -I/usr/include -I.. -I../.. -I../libavcodec
-I../libavutil -I../libmythtv -I/usr/lib64/qt-3.3/include -o utils.o
utils.c
rm -f libmythavformat-0.20.so.0.20.0 libmythavformat-0.20.so
libmythavformat-0.20.so.0 libmythavformat-0.20.so.0.20
g++ -shared -Wl,-soname,libmythavformat-0.20.so.0 -o
libmythavformat-0.20.so.0.20.0 utils.o cutils.o os_support.o
allformats.o sdp.o avio.o aviobuf.o raw.o adtsenc.o aiff.o riff.o
amr.o apc.o ape.o asf.o asfcrypt.o asf-enc.o au.o avidec.o avienc.o
avs.o vocdec.o voc.o bethsoftvid.o c93.o crcenc.o daud.o dsicin.o dv.o
dvenc.o dxa.o eacdata.o electronicarts.o ffm.o flic.o flvdec.o
flvenc.o 4xm.o framecrcenc.o gif.o gifdec.o gxf.o gxfenc.o idcin.o
img2.o ipmovie.o matroskaenc.o matroska.o matroskadec.o mm.o mmf.o
mov.o isom.o movenc.o mp3.o mpc.o mpegenc.o mpeg.o mpegts.o
mpegtsenc.o mpjpeg.o mtv.o mxf.o nsvdec.o nutdec.o nutenc.o nut.o
nuv.o oggparsevorbis.o oggparsetheora.o oggparseflac.o oggparseogm.o
rtsp.o rmdec.o rmenc.o idroq.o rtp.o rtp_h264.o rtp_mpv.o rtp_aac.o
segafilm.o siff.o smacker.o sol.o psxstr.o swf.o thp.o tiertexseq.o
tta.o txd.o sierravmd.o vocenc.o wav.o wc3movie.o westwood.o wv.o
yuv4mpeg.o file.o http.o rtpproto.o tcp.o udp.o
-L/usr/lib64/qt-3.3/lib -L../libavcodec -lmythavcodec-0.20
-L../libavutil -lmythavutil-0.20 -lqt-mt -lXext -lX11 -lm -lpthread
/usr/bin/ld: asf.o: relocation R_X86_64_PC32 against `av_read_frame'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [libmythavformat-0.20.so.0.20.0] Error 1


Any ideas ?
Jean-Yves


More information about the mythtv-dev mailing list