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

Dr. David Kirkby david.kirkby at onetel.net
Sun Aug 29 23:48:36 UTC 2010

Several months ago I discovered that Maxima would not build in Sage on 64-bit 
OpenSolaris. ECL built, but Maxima would not.

The error was:

make[3]: Entering directory 
test -d binary-ecl || mkdir binary-ecl
ecl -norc -eval '(progn (load "../lisp-utils/defsystem.lisp") (funcall (intern 
(symbol-name :operate-on-system) :mk) "maxima" :compile :verbose t) 
(build-maxima-lib))' -eval '(ext:quit)'
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
make[3]: *** [binary-ecl/maxima] Killed

More info at


At the time, I did not have a clue whether this was a Maxima, ECL or Sage issue, 
but now I believe it is an ECL issue, as the link-editor thinks the shared 
object contains text relocations.

There's a command given on this Sun blog, which will show libraries with this 


After downloading the latest from your git repository about an hour ago, and 
building ECL, with

export CC="gcc -m64"

I see:

drkirkby at hawk:/tmp/ecl$ elfdump -d ./build/libecl.so |  fgrep TEXTREL
       [23]  TEXTREL           0
       [31]  FLAGS             0x4                 [ TEXTREL ]

which indicates a problem.

One obvious reason for this is if the code is not compiled as position 
independent code. Anohter is if the code contains assembly code which is not 
position indepedant, but I think I've disabled that when I tried again with

$ ./configure --with-dffi=no

I also tried setting

CC="gcc -m64 -fPIC"

but that did not help either.

Have you any clue how I might resolve this?


More information about the ecl-devel mailing list