[Ecls-list] ecl on Solaris/sparc?

Raymond Toy toy.raymond at gmail.com
Tue Aug 26 03:09:19 UTC 2008


Michael Abshoff wrote:
> Raymond Toy wrote:
>
> Hi Raymond,
>
> > I tried compiling ecl-0.9l on sparc/Solaris using gcc 3.4.3 and ran 
> into
> > a few problems.
> >
> > First, the rest of ecl wants to build a 32-bit app, but gmp builds a
> > 64-bit library, so that doesn't work together.  I think ecl may want to
> > set ABI=32 when building gmp so that gmp will build a 32-bit 
> library.  I
> > didn't try making a 64-bit version of ecl, so I don't know if that 
> would
> > have worked or not.
>
> That is probably a good idea, but gmp is somewhat inconsistent there, 
> i.e. it builds a 64 bit version if the hardware supports it. 
> Defaulting to 32 bit since gcc also defaults to 32 bit seems like the 
> best solution.
>
> > After fixing that, eclmin won't link because isfinite is not defined.
> > Solaris 10 seems to have isfinite in math.h, but only if _STDC_C99 is
> > defined.  This isn't defined with gcc 3.4.3 so that doesn't work.  My
> > solution was to steal definitions for isnan and isfinite from glibc.  I
> > stuffed the macros in ecl.h, and placed the C implementation in
> > numbers.d.  I can provide a patch if desired.
>
> Shouldn't you add "-std=c99" to CFLAGS? Solaris is "correct" about 
> that since it is a C99 feature IIRC :)
>
Oh, I didn't even know there was such an option!   Let me try that....

Well configure complains when building gmp that sys/sysinfo.h exists but 
can't be compiled, which should be reported to gmp-bugs.  (I haven't 
done that yet.)  And now it complains about using v8plus instructions in 
a non-v8plus target binary while compiling add_n.asm.

Too lazy to figure that out right now. :-(


> > That took care of the linking problem.
> >
> > The last problem I have no solution for.  When linking in libeclgc, I
> > get linker errors about non-aligned access in sparc_mac_dep.S.  Not 
> sure
> > what that means, but I'm basically stuck there.
>
> Sounds like a gas issue I had seen before. The Sun Freeware tools ship 
> an ancient binutils. I "fixed" it by removing the "-g" flag since the 
> problem was dwarf2 debugging symbols, but I might be very wrong here.
I'm using gcc 3.3 on a Solaris 8 box, and gcc 3.4.3 that comes with a 
Solaris 10 box.
>
> > Any tried building ecl on Sparc?  Am I doing something wrong?
>
> I will play around with it in the near future and let you know how it 
> goes. But I am using gcc 4.2.4 and the latest binutils on Solaris 10, 
> so it might not be something that is too helpful in your case.
>
>
I think I had problems building 4.2.4 on my Sun box, so I can't use 
that.  I also don't use binutils, but use the Sun as and Sun ld.

I also tried building with Sun C.   There are lots of places where -fPIC 
is hardwired into the makefiles.  I changed them all (I think) to -KPIC, 
but the result wasn't any better.  Can't remember now what the problem was.

Ray





More information about the ecl-devel mailing list