On 2007-08-19 18:41, Kevin Brosius wrote:
> On 2007-08-19 10:50, Graham Evans wrote:
> > 
> > >
> > > ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): relocation 
> > > R_X86_64_32 against `a local symbol' can not be used when making a 
> > > shared object; recompile with -fPIC
> > >
> > > ffmpeg/libavcodec/.libs/libavcodec.a(fdct_mmx.o): could not read 
> > > symbols: Bad value
> > >
> > > did not look into it but must be a change after my patch from earlier
> > > this year.
> > >
> > > j
> > >
> > I'm pretty sure I can help with this one - by reposting a patch posted 
> > earlier by Hermann (easier than tracking down and constructing a useful 
> > link).
> > 
> > Around the time of cinelerra svn 1000 I switched from fedora to debian 
> > sid and couldn't compile cinelerra anymore.   My distro is debian sid 
> > pure 64 on an amd64smp/openGL system.  I was having all sorts of fpic 
> > and ffmpeg problems exactly like the one above.  Hermann had a patch 
> > which only changed one line in a makefile and that fixed all my 
> > problems.  It looks like this patch has not been committed.  Perhaps it 
> > will help you (attached).
> > 
> > I'm not sure why this patch is not committed - perhaps there is some 
> > uncertainty whether it is sound for all build systems.
> > 
> > With this patch I have been building all recent svn versions up to svn 
> > 1017 without any compile flags.
> > 
> > best of luck and please send in any feedback which might help this patch 
> > get evaluated.
> 
> Thanks Graham,
> 
> I suspect no one knew the full impact of this change.
> 
> I think it will fix my build problem also.
> 
> Does anyone have a system that builds without -fPIC on a 64 bit platform
> (either amd64 or Intel?)  I think that is the only case that may break
> with the change.  I don't see any results for this case, although there
> are some comments that fPIC should not be needed in all cases.
> 

Well, this has been a long and somewhat painful investigation. :)

I can answer why the original patch is not or should not be committed as
is, Graham.  It breaks 32 bit intel/amd platform builds.  I've extended
it and will commit a change that should work on all intel/amd 32 and 64
bit systems.  Please let me know if anyone sees trouble with builds
afterwards.

The short version, is that ffmpeg/libavcodec in our tree needs
-prefer-non-pic for 32 bit platforms, but not 64 bit (on the platforms I
tested and for the people who reported in this thread.)  If you disable
PIC completely on 64 bit platforms, you will normally fail to link,
either the ffmpeg portion or a higher level library.

On 32bit, it's a little more complicated.  ffmpeg/avcodec builds with
PIC, but selectively.  The mpegvideo_mmx file can not build with PIC,
else it will not have enough registers to compile successfully.  The
-prefer-non-pic causes ffmpeg to build some files with PIC and some
without, mpegvideo_mmx being built without PIC.  I suspect you can break
the build by overriding all this with one of --with-pic or --without-pic
on the top level configure.

Thanks to all for the feedback and build logs.

-- 
Kevin

_______________________________________________
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra

Reply via email to