RPM Community Forums

Mailing List Message of <rpm-users>

Re: Proposal: use rpm5 package format and the smart package manager

From: devzero2000 <pinto.elia@gmail.com>
Date: Wed 10 Nov 2010 - 18:03:50 CET
Message-ID: <AANLkTinGXmn4GWNPpkxm_PRxuDODGMfBhcADzoiRRNqF@mail.gmail.com>
On Tue, Nov 9, 2010 at 3:15 PM, Jeff Johnson <n3npq@mac.com> wrote:

>
> On Nov 9, 2010, at 1:09 AM, pinto.elia@gmail.com wrote:
>
> > Jbj, which problem for popt ? Last time have i checked the new autofu of
> popt HEAD work fine on opensolaris.
>
> If I change the %indiana stanza to use
>        --with-popt=internal
> this is the error that I see:
>
> gcc -std=gnu99 -shared -Wl,-h -Wl,libpopt.so.0 -o .libs/libpopt.so.0.0.0
>  .libs/popt.o .libs/poptparse.o .libs/poptconfig.o .libs/popthelp.o
> .libs/poptint.o  -lc
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/popt.o: symbol
> _poptArgMask: a GOT relative relocation must reference a local symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/popt.o: symbol
> _poptArgMask: a GOT relative relocation must reference a local symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/popt.o: symbol
> _poptArgMask: a GOT relative relocation must reference a local symbol
>
> Feel free to check the change in on -r rpm-5_3 and debug through the
> eastham:8010 buildbot if you want.
>
>
I have looked now to the problem. First of all on opensolaris 9 i have with
popt-1.16 (different from you : which gcc are you using ?I 3.4.3 )

gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl,libpopt.so.0 -o
.libs/libpopt.so.0.0.0  .libs/popt.o .libs/poptparse.o .libs/poptconfig.o
.libs/popthelp.o .libs/poptint.o   -lc

and have no error. I have not error if also link with your gcc invocation,
however

What is more i have not un R_386_GOTOFF   on _poptArgMask (in both case) but

elfdump .libs/libpopt.so | grep -i ArgMask
       [9]  0x00019444 0x00000004  OBJT GLOB  D    1 .data
_poptArgMask
     [273]  0x00019444 0x00000004  OBJT GLOB  D    0 .data
_poptArgMask
      [52]  0x00019444 0x00000004  OBJT GLOB  D    1 .data
_poptArgMask
      7  [9]         _poptArgMask
      [11]  0x00019180  0x00000000  R_386_GLOB_DAT            _poptArgMask
  R_386_GLOB_DAT              0x19180             .SUNW_reloc
_poptArgMask


The error that you are seeing means:

The compiler has generated a GOT based relocation, which must bind to the
object being built. However, the symbol is global, which means that it could
be bound to at runtime to another object. If it did, the GOT base use would
be compromised. The usual fix, but sure not what you want, is to mark the in
the link map file the symbol as local.

I have with popt-1.16

CFLAGS='-g -O2 -Wall -W -D_GNU_SOURCE -D_REENTRANT.

I have also tried popt-1.17DEVEL with POPT_CFLAGS=' -fpie
-fno-delete-null-pointer-checks -D_FORTIFY_SOURCE=2 -fexceptions
-D_REENTRANT' and again no problem and no R_386_GOTOFF.

I have also flushed a little patch on popt HEAD for adding ld version script
on solaris, just in case is a problem with the gcc version and adding a
mapfile could be useful. I stay continuing the research with other gcc
version.

Best Regards

Elia





hth
>
> 73 de Jeff
>
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
>
Received on Wed Nov 10 18:09:25 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.