[Ecls-list] Problem with ECL + Maxima combo on OpenSolaris x64
Dr. David Kirkby
david.kirkby at onetel.net
Mon May 31 02:13:12 UTC 2010
I'm trying to build Sage on OpenSolaris. I've built it on 32-bit SPARC on
Solaris 10, but are now trying 64-bit on the Intel/AMD processors.
I get a problem which manifests itself with the error message:
ld.so.1: ecl: fatal: relocation error: R_AMD64_PC32: file
/export/home/drkirkby/sage-4.4.2/local/lib//libecl.so: symbol main: value
0x22800097de04 does not fit
(you can see more details, and the fuller message at
http://trac.sagemath.org/sage_trac/ticket/9099 )
Googling, it would appear a number of people get this problem come up on various
bits of software, so it is not specific to Maxima or specific to ECL.
http://developers.sun.com/solaris/articles/about_amd64_abi.html
Has a couple of suggestions.
#####################################
1. Using the -Kpic option. This creates a position independent code. But the
compiler will generate 64-bit memory reference by using register indirection via
the Global Offset Table with the R_AMD64_GOTPCREL relocatable type. This will
work fine as long as the difference between the current code location and the
location in the Global Offset Table for the corresponding data object is less
than 32 bits.
2. Allocate all static data objects in heap. Then reference the objects via
pointer indirection.
Note the workaround may have a small performance degradation in memory access
due to reference indirection.
======================================
Since I'm using gcc, the -fPIC option is the one to get position independant
code. I'm not sure if ECL builds the library with PIC code.
The second workaround may be better, as there is no warning about the 32-bit
offset.
Any thoughts on the best way forward?
Dave
More information about the ecl-devel
mailing list