Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#7838 closed defect (fixed)

Remove script using ctypes from ATLAS

Reported by: David Kirkby Owned by: Georg S. Weber
Priority: major Milestone: sage-4.3.1
Component: build Keywords: ctypes atlas
Cc: Jaap Spies, vengoroso@… Merged in: sage-4.3.1.rc0
Authors: David Kirkby Reviewers: Jaap Spies
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Frédéric Chapoton)

#1497 added a few lines of code

import ctypes
print str(8*ctypes.sizeof(ctypes.c_long))

into the ATLAS build process, which reports the number of bits Sage was compiled as. It makes use of the module 'ctypes' in Python, but

shows that ctypes is seriosuly broken on many platforms, including

  • Older linux-x86 build failures
  • aix-powerpc build failures
  • linux-ia64 build failures
  • solaris-sparc build failures
  • solaris-x86 build failures
  • hpux-parisc libffi not ported to PA-RISC arch
  • hpux-ia64 build failures
  • win64

Hence the code needs replacing with something less broken


Change History (8)

comment:1 Changed 13 years ago by David Kirkby

Cc: Carl Witty added

comment:2 Changed 13 years ago by David Kirkby

Description: modified (diff)
Keywords: ctypes atlas added

comment:3 Changed 13 years ago by David Kirkby

Authors: David Kirkby, Javier
Cc: Jaap Spies vengoroso@… added
Status: newneeds_review


for an updated version of ATLAS which fixes this issue. has been changed.

The 4/5 lines of code I used were posted on sage-devel by vengoroso@… but I don't know his fully name, so can't give full credit. Please let us know your full name!

Note however, for me at least, ATLAS does not build fully, but at least it gets further than it did on Open Solaris.


comment:4 Changed 13 years ago by Jaap Spies

The fix looks good.

My setup is clearly not ok. The build failed at the end:

ATLAS install complete.  Examine 
ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.
make[1]: Leaving directory `/export/home/jaap/Downloads/sage-4.3.1.alpha0/spkg/build/atlas-3.8.3.p10/ATLAS-build'
make clean
make[1]: Entering directory `/export/home/jaap/Downloads/sage-4.3.1.alpha0/spkg/build/atlas-3.8.3.p10/ATLAS-build'
rm -f *.o x* config?.out *core*
make[1]: Leaving directory `/export/home/jaap/Downloads/sage-4.3.1.alpha0/spkg/build/atlas-3.8.3.p10/ATLAS-build'
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.alpha0/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
make[1]: Entering directory `/export/home/jaap/Downloads/sage-4.3.1.alpha0/spkg/build/atlas-3.8.3.p10/ATLAS-build/lib'
ld -melf_x86_64 -G -h -o \
        -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]: *** [] Error 1
make[1]: Leaving directory `/export/home/jaap/Downloads/sage-4.3.1.alpha0/spkg/build/atlas-3.8.3.p10/ATLAS-build/lib'
make: *** [shared] Error 2
Building shared ATLAS libraries failed
Failed to build ATLAS.

real	155m22.653s
user	147m22.502s
sys	6m4.162s
sage: An error occurred while installing atlas-3.8.3.p10

Maybe I should use gcc gcc-4.4.2 with the gnu loader?


comment:5 Changed 13 years ago by William Stein

Javier Lopez
 to wstein
show details 4:39 AM (1 hour ago)
Hi William,

reply here since I've got no trac account. My full name is Javier
López Peña, but no credit is needed for such a small contribution.


comment:6 Changed 13 years ago by Jaap Spies

Authors: David Kirkby, JavierDavid Kirkby
Cc: Carl Witty removed
Reviewers: Jaap Spies
Status: needs_reviewpositive_review

The patch works ok. Positive review.

Removed cwitty from the cc list.

And Javier from the authors list (see comment above).


comment:7 Changed 13 years ago by Robert Miller

Merged in: sage-4.3.1.rc0
Resolution: fixed
Status: positive_reviewclosed

comment:8 Changed 7 years ago by Frédéric Chapoton

Description: modified (diff)
Note: See TracTickets for help on using tickets.