Sage 64 bit OSX 64 bit build notes for Sage 3.2.3

Notes

fortran.spkg

Use OSX-gfortran.spkg (coming soon) which is a repackaged Gfortran 4.2.3 by the R people. It is quad universal.

Make local/bin/sage_fortran like

gfortran -m64 "$@"

Make sure to chmod 755 and extend DYLD_LIBRARY_PATH to include the Fortran runtime - maybe in toolchain?

gmp

use eMPIRe

Python

ctypes broken, use the old workaround, but also look at 2.5.4 and 2.6.1 for potential solutions

atlas

The following error pops up, but it is harmless:

/bin/sh: /Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/bin/which_fortran: No such file or directory

It should still be fixed.

pynac

No OSX64 bit support yet - an unclean version that builds would be:

diff -r 56d7250fb1dc spkg-install
--- a/spkg-install      Wed Oct 15 10:32:53 2008 +0200
+++ b/spkg-install      Tue Jan 06 13:40:13 2009 -0800
@@ -22,8 +22,10 @@
 build_pynac()
 {
     cd ${PYNACDIR}
-    CPPFLAGS=-I"$SAGE_LOCAL"/include/python2.5 PKG_CONFIG_PATH=${SAGE_LOCAL}/lib/pkgconfig ./configure --disable-static --prefix=${SAGE_LOCAL}
-    CPPFLAGS=-I"$SAGE_LOCAL"/include/python2.5 $MAKE
+    LDFLAGS="-m64"; export LDFLAGS [needs to be 64 bit OSX specific] 
+    PKG_CONFIG_PATH="$SAGE_LOCAL"/lib/pkgconfig/: export PKG_CONFIG_PATH
+    CPPFLAGS="-m64 -I\"$SAGE_LOCAL\"/include/python2.5" ./configure --disable-static --prefix=${SAGE_LOCAL}
+    CPPFLAGS="-m64 -I\"$SAGE_LOCAL\"/include/python2.5" $MAKE
     if [ $? -ne 0 ]; then
         echo "Error building pynac."
         exit 1

r

libpng trouble since the build with a dynamic libpng was fixed recently:

Error in dyn.load(file, ...) : 
  unable to load shared library '/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/spkg/build/r-2.6.1.p21/src/library/grDevices/libs/grDevices.so':
  dlopen(/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/spkg/build/r-2.6.1.p21/src/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_png_create_info_struct
  Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib//libPng.dylib
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load
Execution halted

Analog fix like the one for 32 bit via LD_FLAGS

sagelib

sage -b: devel/sage/c_lib/SConstruct

## We want the debug and optimization flags, since debug symbols are so useful, etc.
env.Append( CFLAGS="-O2 -g -m64" )
env.Append( CXXFLAGS="-O2 -g -m64" )

The above fix needs to be dependent on SAGE64 being set. CXXFLAGS should have -g addded