Dr. David Kirkby wrote:
Jaap Spies wrote:
I'm almost there:

Finished building ATLAS core
The Makefile generated in ATLAS for building shared libraries
assumes the linker is the GNU linker, which it not true in
your setup. (It is generally considered better to use the
Sun linker in /usr/ccs/bin rather than the GNU linker from binutils)
The linker flags in
/export/home/jaap/Downloads/sage-4.3.1.alpha1/spkg/build/atlas-3.8.3.p10/ATLAS-build/lib/Makefile
will be changed.
'-shared' will be changed to '-G'
'-soname' will be changed to '-h'
'--whole-archive' will be changed to '-zallextract'
'--no-whole-archive' will be changed to '-zdefaultextract'
A copy of the original Makefile will be copied to Makefile.orig
rm -f libatlas.so liblapack.so
make libatlas.so liblapack.so libf77blas.so libcblas.so liblapack.so
make[1]: Entering directory
`/export/home/jaap/Downloads/sage-4.3.1.alpha1/spkg/build/atlas-3.8.3.p10/ATLAS-build/lib'

ld -melf_x86_64 -G -h libatlas.so -o libatlas.so \
-z allextract libatlas.a -z defaultextract -lc -lm
ld: warning: file libatlas.a(ATL_flushcache.o): wrong ELF class:
ELFCLASS64
ld: fatal: entry point symbol `lf_x86_64' is undefined
make[1]: *** [libatlas.so] Error 1
make[1]: Leaving directory
`/export/home/jaap/Downloads/sage-4.3.1.alpha1/spkg/build/atlas-3.8.3.p10/ATLAS-build/lib'


I know how to fix this on the command line:

ld -64 -G -h libatlas.so -o libatlas.so \
-z allextract libatlas.a -z defaultextract -lc -lm

produces the shared library. But I don't know where this -melf_x86_64
comes from. I don't know if its supposed to be a linker option. I
suspect I could hack this to work at the command line. Sorting out the
script might be a bit more difficult, but I expect it can be done.



 vi src/CONFIG/src/SpewMakeInc.c

   fprintf(fpout, "   LDFLAGS =");
   if (MachIsX86(mach))
   {
      if (ptrbits == 32)
         fprintf(fpout, " -melf_i386");
      else if (ptrbits == 64)
         fprintf(fpout, " -melf_x86_64");
   }

This program generates the Make.inc
included in every Makefile, more important it is included in the Makefile
in lib.

I don't understand why there must an emulation mode at all.

Changing SpewMakeInc.c such that LDFLAGS = -64 resp. -32

gives me a working atlas!

Is this
make[1]: Leaving directory 
`/export/home/jaap/Downloads/sage-4.3.1.alpha2/spkg/build/atlas-3.8.3.p10/ATLAS-build'
Deleting liblapack.so on Solaris due to bug in numpy/scipy
needed for Open Solaris?


It's possible

export LDFLAGS=-64

(not -m64, but -64)

might help. I've not tried that.


I don't think this helps. See above.

Jaap


dave




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

Reply via email to