[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building ffmpeg --enable-shared



On Thu, Apr 14, 2005 at 02:08:09PM +0200, Lorenzo Milesi wrote:
> Hi
> I'm getting and error trying to compile ffmpeg with the enable-shared
> configure option.
> The latest lines are these
> 
> ar rc libavcodec.a bitstream.o utils.o mem.o allcodecs.o mpegvideo.o
> jrevdct.o jfdctfst.o jfdctint.o mpegaudio.o ac3enc.o m
> jpeg.o resample.o resample2.o dsputil.o motion_est.o imgconvert.o
> imgresample.o mpeg12.o mpegaudiodec.o pcm.o simple_idct.o
>  ratecontrol.o adpcm.o eval.o dv.o error_resilience.o fft.o mdct.o
> mace.o huffyuv.o cyuv.o raw.o h264.o golomb.o vp3.o asv1
> .o 4xm.o cabac.o ffv1.o ra144.o ra288.o vcr1.o cljr.o roqvideo.o
> dpcm.o interplayvideo.o xan.o rpza.o cinepak.o msrle.o msv
> ideo1.o vqavideo.o idcinvideo.o adx.o rational.o faandct.o 8bps.o
> smc.o parser.o flicvideo.o truemotion1.o vmdav.o lcl.o qt
> rle.o g726.o flac.o vp3dsp.o integer.o snow.o tscc.o sonic.o ulti.o
> h264idct.o qdrw.o xl.o rangecoder.o png.o pnm.o qpeg.o
> vc9.o h263.o h261.o msmpeg4.o h263dec.o svq1.o rv10.o wmadec.o
> indeo3.o shorten.o loco.o alac.o  i386/fdct_mmx.o i386/cpute
> st.o i386/dsputil_mmx.o i386/mpegvideo_mmx.o i386/idct_mmx.o
> i386/motion_est_mmx.o i386/simple_idct_mmx.o i386/fft_sse.o i3
> 86/vp3dsp_mmx.o i386/vp3dsp_sse2.o  
> ranlib libavcodec.a
> gcc -shared -o libavcodec.so bitstream.o utils.o mem.o allcodecs.o
> mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o mpegaudio.o
> ac3enc.o mjpeg.o resample.o resample2.o dsputil.o motion_est.o
> imgconvert.o imgresample.o mpeg12.o mpegaudiodec.o pcm.o sim
> ple_idct.o ratecontrol.o adpcm.o eval.o dv.o error_resilience.o fft.o
> mdct.o mace.o huffyuv.o cyuv.o raw.o h264.o golomb.o
> vp3.o asv1.o 4xm.o cabac.o ffv1.o ra144.o ra288.o vcr1.o cljr.o
> roqvideo.o dpcm.o interplayvideo.o xan.o rpza.o cinepak.o m
> srle.o msvideo1.o vqavideo.o idcinvideo.o adx.o rational.o faandct.o
> 8bps.o smc.o parser.o flicvideo.o truemotion1.o vmdav.
> o lcl.o qtrle.o g726.o flac.o vp3dsp.o integer.o snow.o tscc.o sonic.o
> ulti.o h264idct.o qdrw.o xl.o rangecoder.o png.o pnm
> .o qpeg.o vc9.o h263.o h261.o msmpeg4.o h263dec.o svq1.o rv10.o
> wmadec.o indeo3.o shorten.o loco.o alac.o  i386/fdct_mmx.o
> i386/cputest.o i386/dsputil_mmx.o i386/mpegvideo_mmx.o i386/idct_mmx.o
> i386/motion_est_mmx.o i386/simple_idct_mmx.o i386/ff
> t_sse.o i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o  -lm -lz -ldl 
> -Wl,--warn-common -rdynamic
> /usr/bin/ld: i386/dsputil_mmx.o: relocation R_X86_64_32S can not be
> used when making a shared object; recompile with -fPIC
> i386/dsputil_mmx.o: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [libavcodec.so] Error 1
> 
> 
> My "problem" is that dsputil_mmx is part of ffmpeg itself!!
> Why isn't that compiling?

mmx instructions are not supported by amd64.  i386 assembly is not
supported on amd64.  If the program can't be compiled without the
assembly routines for i386, then it won't compile properly on amd64.  It
shouldn't be using anything from that i386 directory at all if you
configure it correctly.

amd64 only supports sse* instructions and regular x86 instructions and
the various 64bit instructions it added.  the x87, mmx and other
extensions are disabled in 64bit mode.  I don't remember if 3Dnow is
supported in 64bit or not.  They nicely tried to dump the garbage when
the went to 64bit mode.  About time someone cleaned up the x86 rather
than just patch more stuff on.

Len Sorensen



Reply to: