[Ecls-list] Solaris 9 build report and suggested fixes with current cvs

Michael Abshoff Michael.Abshoff at fsmath.mathematik.uni-dortmund.de
Sun Aug 26 00:43:12 UTC 2007


Hello,

congratulations on an open source lisp that actually builds on Solaris
(and many other systems) without too much fixing and without the need to
bootstrap itself off another list machine. My experience with gcl in
general and clisp on Solaris hasn't been a pleasant one.

I am interested in running Maxima and Axiom on top of ecls in the long
term, but I understand that might take a while to accomplish due to

a) Maxima doesn't support ecl as far as I can tell "out of the box" and I
haven't even checked Axiom yet
b) ansi support isn't quite 100% there, but you are getting close :)

Anyway: Here is my experience to get the current cvs snapshot to compile
on Solaris 9/Sparc with gcc 4.2.1 (in 32 bit mode for now, 64 bit should
come later):

-----------------------

gmp link failure: On Solaris 9 - I know about the workaround of using an
external gmp, but if  you want to compile in 32 bit mode:

- gmp is compiled in 64 bit mode per default while ecls itself
is build in 32 bit mode. This leads to problem at link time.

"ABI=32; export ABI" fixes that issue. I am not sure if the "pass extra
flags to gmp switch" works in that case, unless you specify a 32 bit
solaris host explicitly.

-----------------------

- remove "-g" from CCASFLAGS: assembler dwarf2 relocations break solaris
native ld

see http://osdir.com/ml/gnu.binutils.bugs/2005-08/msg00005.html

                gcc
-L/extra/home/mabshoff/SAGE-build/sage-2.8.2.rc1/local//lib
-o ecl_min cinit.o c/all_symbols.o -L./ libeclmin.a
-leclgc  -ldl  -lm -lsocket -lnsl -lintl -lgmp;\
        fi
ld: fatal: relocation error: R_SPARC_32: file
.//libeclgc.a(sparc_mach_dep.o): symbol <unknown>: offset 0x7eb1cef7 is
non-aligned
ld: fatal: relocation error: R_SPARC_32: file
.//libeclgc.a(sparc_mach_dep.o): symbol <unknown>: offset 0x7eb1cefd is
non-aligned
ld: fatal: relocation error: R_SPARC_32: file
.//libeclgc.a(sparc_mach_dep.o): symbol <unknown>: offset 0x7eb1cf01 is
non-aligned
ld: fatal: relocation error: R_SPARC_32: file
.//libeclgc.a(sparc_mach_dep.o): symbol <unknown>: offset 0x7eb1cf05 is
non-aligned
ld: fatal: relocation error: R_SPARC_32: file
.//libeclgc.a(sparc_mach_dep.o): symbol <unknown>: offset 0x7eb646c6 is
non-aligned
ld: fatal: relocation error: R_SPARC_32: file
.//libeclgc.a(sparc_mach_dep.o): symbol <unknown>: offset 0x7eba92ee is
non-aligned
collect2: ld returned 1 exit status

I am not sure why that bug hasn't been fixed yet. We are using the current
binutils-2.17 release. I see the removal of the debug flag as a Solaris
workaround and obviously do not recommend that you actually remove the
flags from the build in general. But maybe the Solaris ld can stand an
update :)

-----------------------

Solaris doesn't have a stdint.h: (in build/ecl/ecl.h", around line 20)

#if !defined(_MSC_VER)
#include <stdint.h>             /* int8_t and friends */
#else

you should have a check for defined(__sun) added. I haven't looked where
ecl.h is created, but I would assume the fix is obvious to anybody
familiar with the build system.

-----------------------

The build also breaks later because SO_REUSEPORT doesn't exist on Solaris
9. Workaroud: configure with --with-tcp=no

;;; Emitting code for (SETF SOCKOPT-REUSE-PORT).
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc  -g -O2 -fPIC
-I/extra/home/mabshoff/SAGE-build/sage-2.8.2.rc1/local//include
-fstrict-aliasing -Dsun4sol2 -I"/extra/home/mabshoff/eclcvs/ecl/src/c" 
"-I/extra/home/mabshoff/eclcvs/ecl/build/" -w -c
"/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c" -o
"/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.o"

/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c: In function
'L80sockopt_reuse_port':
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c:2376: error:
'SO_REUSEPORT' undeclared (first use in this function)
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c:2376: error: (Each
undeclared identifier is reported only once
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c:2376: error: for each
function it appears in.)
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c: In function
'L81_setf_sockopt_reuse_port_':
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c:2388: error:
'SO_REUSEPORT' undeclared (first use in this function)
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c: In function
'init_EXT_SOCKETS':
/extra/home/mabshoff/eclcvs/ecl/build/ext/sockets.c:2441: error:
'AF_LOCAL' undeclared (first use in this function)
Segmentation violation.
Broken at TOP-LEVEL.No restarts available.
Top level.
SB-BSD-SOCKETS>

It would obviously be nice if that code could be fixed to also work on
Solaris :), but I don't know, so I cannot suggest a fix.

-----------------------

After the install I ran the ansi tests and I got the following end result:

38 out of 21696 total tests failed: COMMON-LISP-PACKAGE-NICKNAMES,
COMMON-LISP-USER-PACKAGE-NICKNAMES,
   PROCLAIM.ERROR.7, CTYPECASE.15, CTYPECASE.16, EQUALP.5, EQUALP.6,
   MACROLET.47, DEFGENERIC.ERROR.20, DEFGENERIC.ERROR.21,
   CALL-NEXT-METHOD.ERROR.1, CALL-NEXT-METHOD.ERROR.2,
   DEFMETHOD.ERROR.14, DEFMETHOD.ERROR.15, MAKE-CONDITION.4,
   UPGRADED-ARRAY-ELEMENT-TYPE.8, BIGNUM.FLOAT.COMPARE.7,
   BIGNUM.FLOAT.COMPARE.8, ROUND.3, EXP.ERROR.8, EXP.ERROR.9,
   EXP.ERROR.10, EXP.ERROR.11, EXPT.ERROR.8, EXPT.ERROR.9,
   EXPT.ERROR.10, EXPT.ERROR.11, MAP.ERROR.11,
   ALL-STANDARD-GENERIC-FUNCTIONS-ARE-INSTANCES-OF-THAT-CLASS,
   FORMAT.LOGICAL-BLOCK.23, SYNTAX.DOT-ERROR.1, COMPILE-FILE.2,
   COMPILE-FILE.2A, COMPILE-FILE.6A, COMPILE-FILE.18, MISC.209,
   MISC.521, MISC.523.
real time : 1987.484 secs
run time  : 1630.140 secs

If you care about the details (or if there are unexpected platform
specific failures I can provide the whole log).

Keep up the great work,

Cheers,

Michael





More information about the ecl-devel mailing list