Mailinglist Archive: opensuse-programming (85 mails)
| < Previous | Next > |
Re: Position independent code (?)
- From: "Steve Graegert" <graegerts@xxxxxxxxx>
- Date: Sun, 26 Mar 2006 16:28:25 +0000
- Message-id: <6a00c8d50603260828i2107350di8e13469950cdb544@xxxxxxxxxxxxxx>
On 3/26/06, Anders Johansson <andjoh@xxxxxxxxxx> wrote:
> On Sun, 2006-03-26 at 15:44 +0000, Steve Graegert wrote:
> > Could you please post the complete command line which is used during
> > compilation and the complete compiler/linker output? It's extremely
> > difficult to tell what's going on without it. Oh, please don't forget
> > to post the contents of the environment variables as well (CFLAGS,
> > etc.).
>
> I'm trying to build libfame on 64 bit
>
> CFLAGS is set to '-O2 -fmessage-length=0 -fno-unit-at-a-time -fPIC'
> LDFLAGS is set to '-fPIC'
>
> The command line for the linker is
>
> gcc -shared -fPIC fame.lo cpuflags.lo fame_profile_mpeg.lo
> fame_profile_mpeg1.lo fame_profile_mpeg4_simple.lo
> fame_profile_mpeg4_shape.lo fame_profile_stats.lo fame_encoder_mpeg.lo
> fame_decoder_mpeg.lo fame_syntax_mpeg1.lo fame_syntax_mpeg4.lo
> fame_shape.lo fame_rate_simple.lo fame_rate_1param.lo fame_rate.lo
> fame_monitor.lo fame_motion.lo fame_motion_none.lo
> fame_motion_fourstep.lo fame_motion_pmvfast.lo fame_malloc.lo -lm -lc
> -Wl,-soname -Wl,libfame-0.9.so.1 -o .libs/libfame-0.9.so.1.0.0
>
> and the output is
>
> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
> fame_encoder_mpeg.lo: relocation R_X86_64_PC32 against `prefetch_C_withmask'
> can not be used when making a shared object; recompile with -fPIC
> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
> final link failed: Bad value
How has "fame_encoder_mpeg.lo" been compiled? Try turning the
"-fvisibility-hidden" switch off if it is set. Don't know what else
to do at the moment :-(
\Steve
> On Sun, 2006-03-26 at 15:44 +0000, Steve Graegert wrote:
> > Could you please post the complete command line which is used during
> > compilation and the complete compiler/linker output? It's extremely
> > difficult to tell what's going on without it. Oh, please don't forget
> > to post the contents of the environment variables as well (CFLAGS,
> > etc.).
>
> I'm trying to build libfame on 64 bit
>
> CFLAGS is set to '-O2 -fmessage-length=0 -fno-unit-at-a-time -fPIC'
> LDFLAGS is set to '-fPIC'
>
> The command line for the linker is
>
> gcc -shared -fPIC fame.lo cpuflags.lo fame_profile_mpeg.lo
> fame_profile_mpeg1.lo fame_profile_mpeg4_simple.lo
> fame_profile_mpeg4_shape.lo fame_profile_stats.lo fame_encoder_mpeg.lo
> fame_decoder_mpeg.lo fame_syntax_mpeg1.lo fame_syntax_mpeg4.lo
> fame_shape.lo fame_rate_simple.lo fame_rate_1param.lo fame_rate.lo
> fame_monitor.lo fame_motion.lo fame_motion_none.lo
> fame_motion_fourstep.lo fame_motion_pmvfast.lo fame_malloc.lo -lm -lc
> -Wl,-soname -Wl,libfame-0.9.so.1 -o .libs/libfame-0.9.so.1.0.0
>
> and the output is
>
> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
> fame_encoder_mpeg.lo: relocation R_X86_64_PC32 against `prefetch_C_withmask'
> can not be used when making a shared object; recompile with -fPIC
> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
> final link failed: Bad value
How has "fame_encoder_mpeg.lo" been compiled? Try turning the
"-fvisibility-hidden" switch off if it is set. Don't know what else
to do at the moment :-(
\Steve
| < Previous | Next > |