[MPlayer-dev-eng] Linking mplayer fails

Xidorn Quan quanxunzhen at gmail.com
Mon Apr 1 13:57:15 CEST 2013


On Mon, Apr 1, 2013 at 7:24 PM, Dan Oscarsson <Dan.Oscarsson at tieto.com>wrote:

> mån 2013-04-01 klockan 12:44 +0200 skrev Grozdan:
> > On Mon, Apr 1, 2013 at 12:40 PM, Dan Oscarsson <Dan.Oscarsson at tieto.com
> >wrote:
> >
> > > mån 2013-04-01 klockan 12:22 +0200 skrev Nicolas George:
> > > > Le duodi 12 germinal, an CCXXI, Dan Oscarsson a écrit :
> > > > > Tried to create mplayer under opensuse 12.3 but linking fails with:
> > > > >
> > > > >
> > >
> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
> > > libmpcodecs/vf_fspp.o: relocation R_X86_64_32S against `.rodata' can
> not be
> > > used when making a shared object; recompile with -fPIC
> > > > > libmpcodecs/vf_fspp.o: could not read symbols: Bad value
> > > > > collect2: error: ld returned 1 exit status
> > > >
> > > > Wild guess: try to revert 36098.
> > > >
> > >
> > > If I get that by doing:
> > > svn co -r 36098 svn://svn.mplayerhq.hu/mplayer/trunk mplayer
> > >
> > > it does not help. Same failure.
> > >
> >
> > I'm on openSUSE 12.3 myself and revision 36090 works here so you may want
> > to check that out
>
> Yes, it works.
> Tested many more revisions. 36097 is OK. 36098 is not.
>
> The difference seams to be related to PIC.
> Working version have #define CONFIG_PIC 1 in mplayer/config.h, but set
> to 0 in revision 36098.
>

It looks really strange. Before I committed the revision 36098,
mplayer could not be compiled in my OS X because of the same reason
you found for the current revision. It seems that compilers have
different behaviors for the default value of PIC flag. I guess that
what the compiler in my system does is wrong.

However, I suggest to unconditionally add the PIC flag which is that
configure of ffmpeg actually does. It is obvious that compilation will
fail without this flag in many situations.


-- 
Xidorn Quan
GnuPG fingerprint: 6F1E DF9A D250 7505 63E2  345E 7570 8D3F 7C9A 1209


More information about the MPlayer-dev-eng mailing list