When I tried to build Sage on my Blade 2000 with gcc 4.4.0 configured to 
use the Sun linker, so it failed to build, when building ATLAS.



make[3]: Entering directory 
`/export/home/drkirkby/sage/sage-4.0.2/spkg/build/atlas-3.8.3.p3/ATLAS-build/lib'
ld  -shared -soname libatlas.so -o libatlas.so \
         --whole-archive libatlas.a --no-whole-archive -lc -lm
ld: fatal: file libatlas.so: open failed: No such file or directory
make[3]: *** [libatlas.so] Error 1
make[3]: Leaving directory 
`/export/home/drkirkby/sage/sage-4.0.2/spkg/build/atlas-3.8.3.p3/ATLAS-build/lib'
make[2]: *** [shared] Error 2


I downloaded the ATLAS source code from sourceforge, built, tested and 
installed that with no problem at all. However, I note it only maked 
static libraries, not shared libraries on my Sun Blade 2000.

But Sage appears to attempt build shared libraries. It's is its failing 
to build them that is screwing up the build of Sage with gcc used with 
the Sun linker.

I traced the problem to the Makefile in

sage-4.0.2/spkg/build/atlas-3.8.3.p3/ATLAS-build/lib

This makefile calls the linker 'ld' with some GNU-specific options.

e.g

libatlas.so : libatlas.a
         ld $(LDFLAGS) -shared -soname libatlas.so -o libatlas.so \
         --whole-archive libatlas.a --no-whole-archive -lc $(LIBS)

Note, the linker 'ld' is hard-coded here, as are the flags to build the 
shared libraries.

It seem sensible to make the name of the linker, and those flags 
configurable

i.e.

libatlas.so : libatlas.a
         $(LD) $(LDFLAGS) $(FLAGS_FOR_SHARED_LIB) -o libatlas.so ...etc

I think I could probably fiddle this to build the shared libraries in 
Sage, by simply replacing 'ld' with 'gcc', as I think gcc would pass the 
correct flags to the Sun linker, and so build the shared libraries. I 
could be tempted to do that as  quick hack-to get this to build on Solaris.

But in general, if we want to get this to build on Solaris with the Sun 
tools, it would be *far* more sensible to allow the linker and flags to 
be specified, rather than hard-code the linker as 'gcc'.

If I'm right in assuming that Sage added shared library suport to ATLAS, 
can someone point me to where it's done, as a cursory glance did not 
find it.

So far, the only two problems I've hit when building Sage with the Sun 
linker seems to be code is Sage, rather than the programs Sage is trying 
to build. That might mean sorting them out is quicker, as we will not be 
relying so much on the support of developers of the tools included in Sage.



Dave


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to