[Ecls-list] fatal: relocation errors on Solaris x86 and OpenSolaris 64-bit.

Dr. David Kirkby david.kirkby at onetel.net
Mon Aug 30 11:52:35 UTC 2010


On 08/30/10 09:10 AM, Juan Jose Garcia-Ripoll wrote:
> I really know nothing about Opensolaris 64 bit model and appropriate
> compiler flags. I would rather have an operating system that gave me just
> one sane build model by default, with not so much to tweak.
>
> However, this seems to be relevant:
> http://forums.sun.com/thread.jspa?threadID=5071225 The appropriate flags
> would be "-xarch=amd64 -KPIC" and all libraries should be built with the
> same flags. If you inspect the library for the object files that have those
> offending relocations it may well be that some components (gc, gmp, some
> files in ECL or in Maxima) are not compiled with the same flags.

Those are compiler flags for the Sun compiler. Not a lot of help with gcc.

> BTW, what is the status of Opensolaris support in Sage.

Sage now builds on OpenSolaris 32-bit, and passes all the Sage test suite.

> This project
> (Opensolaris) apparently has been totally discontinued by their creators.
>
> Juanjo

That looks to be true.

But Solaris 10 has not died, neither or x86 or SPARC. The issues are seen on 
Solaris 10 SPARC too, so it not just an x86 problem. Maxima is not complaining 
on SPARC, but the elfdump command clearly shows the problem is in the ECL 
library file. That problem exits on 64-bit SPARC  too.

kirkby at t2:64 ~/t2/64/sage-4.5.3.alpha2/local/lib$ uname -a
SunOS t2 5.10 Generic_141414-02 sun4v sparc SUNW,T5240
kirkby at t2:64 ~/t2/64/sage-4.5.3.alpha2/local/lib$ elfdump -d libecl.so | fgrep 
TEXTREL
       [18]  TEXTREL           0
       [30]  FLAGS             0x4                 [ TEXTREL ]
kirkby at t2:64 ~/t2/64/sage-4.5.3.alpha2/local/lib$

Two of the parts of Sage that are showing problems on 64-bit Solaris/OpenSolaris 
buids (ECL and Cliquer) give an output from that command above. So if the 
link-editor thinks a file contains non-pic code, then it will present a problem.

The problem can't be Maxima, as I don't need to even build Maxima to show the 
ECL code has this problem.

The MPIR library does not exhibit this issue.

kirkby at t2:64 ~/t2/64/sage-4.5.3.alpha2/local/lib$ elfdump -d libmpir.so | fgrep 
TEXTREL
kirkby at t2:64 ~/t2/64/sage-4.5.3.alpha2/local/lib$

Neither do most others. The only offenders in Sage are ECL, PolyBoRi and Cliquer.

Sorry, the title is a bit confusing. The problem is seen

  * 64-bit SPARC
  * 64-bit Solaris 10 on x86
  * 64-bit OpenSolaris on x86

Note also, I built your latest sources outside of Sage. The issue is seen there.

Note also, that there's this compiler warnings when I build on Solaris (or any 
sort)

/export/home/drkirkby/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c:680:13: 
warning: too many arguments for format

When I use the debugging technique mentioned at

http://blogs.sun.com/rie/entry/my_relocations_don_t_fit

$ export LD_OPTIONS=-Dreloc
$ make

and look at the resulting output, it indicates to me, the problem is with dpp.c 
- which maybe coincidence, or maybe not, is the same file giving a compiler 
warning.


if test -f ../CROSS-DPP; then touch dpp; else \^M
gcc 
-I/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/src/c 
-I/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/build 
-I./ 
/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c 
  -I/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/local/include  -O2  -m64  -g 
  -Wall  -fPIC  -Dsun4sol2 -o dpp ; \^M
fi^M
/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c: 
In function ‘put_declaration’:^M
/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c:678: 
warning: too few arguments for format^M
/rootpool2/local/kirkby/t2/64/sage-4.5.3.alpha2/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c:680: 
warning: too many arguments for format^M
debug: ^M
debug: collecting input relocations: section=.text, 
file=/usr/local/gcc-4.4.1-sun-linker/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.1/sparcv9/crt1.o^M
debug:          type                               offset             addend 
section        symbol^M
debug:     in R_SPARC_WDISP30                        0x1c                  0 
.rela.text     atexit  ^M
debug:    out R_SPARC_JMP_SLOT                       0x1c                  0 
.plt           atexit  ^M
debug:    act R_SPARC_WDISP30                        0x1c 
.text          atexit  ^M
<Then *thousdands* more similar notices>

debug: collecting input relocations: section=.text, 
file=/usr/local/gcc-4.4.1-sun-linker/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.1/sparcv9/crtbegin.o^M
debug:          type                               offset             addend 
section        symbol^M
debug:     in R_SPARC_GOT22                           0xc                  0 
.rela.text     completed.4129  ^M
debug:    act R_SPARC_GOT22                           0xc 
.got           completed.4129  ^M
debug:    act R_SPARC_GOT22                           0xc 
.text          completed.4129  ^M




Dave




More information about the ecl-devel mailing list