Dr. David Kirkby wrote:
> 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.


I realised later that building shared libraries is supported in ATLAS, 
but one needs to change to the 'lib' directory and type 'make' to build 
them. (Sage does this). But the build still fails, for the reasons I 
wrote earlier.

My attempts at just substituting 'gcc' for 'ld' did not work. I'm sure I 
will find some way around this though.

I believe this is a bug in ATLAS, so I have submitted it as a support 
request to the Sourceforge site - the developers prefer end-users not to 
submit directly to the bug database.

See

http://sourceforge.net/tracker/index.php?func=detail&aid=2811131&group_id=23725&atid=379483

if you wish to keep track of this.

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