7956
Comment: more sagelib and misc build issues with tachyon, flintqs and cvxopt
|
← Revision 26 as of 2022-03-31 02:06:56 ⇥
0
outdated
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= 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 {{{ #!/bin/bash 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 added, too. Another problem is that the Sage's libsage.dylib is linked without -m64 - setting LDFLAGS in SConstruct does not fix the problem: {{{ libcsage.dylib: Mach-O dynamically linked shared library i386 }}} Building manually works around the problem for now. Another problem is that the memory.pyx extension needs to be linked against libcsage: {{{ --- a/module_list.py Mon Jan 05 23:03:45 2009 -0800 +++ b/module_list.py Tue Jan 06 17:13:03 2009 -0800 @@ -854,7 +854,7 @@ Extension('sage.rings.memory', sources = ['sage/rings/memory.pyx'], - libraries=['gmp','stdc++']), + libraries=['csage','ntl','gmp','stdc++']), Extension('sage.rings.morphism', sources = ['sage/rings/morphism.pyx']), }}} Otherwise Sage starts up, but doctesting fails always with {{{ sage -t "devel/sage/sage/rings/complex_interval_field.py" Traceback (most recent call last): File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/tmp/complex_interval_field.py", line 2, in <module> from sage.all_cmdline import *; File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5/site-packages/sage/all_cmdline.py", line 14, in <module> from sage.all import * File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5/site-packages/sage/all.py", line 56, in <module> from sage.rings.memory import pmem_malloc ImportError: dlopen(/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5/site-packages/sage/rings/memory.so, 2): Symbol not found: _rand_n Referenced from: /Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5/site-packages/sage/rings/memory.so Expected in: dynamic lookup }}} Similar linker fixes are needed for Cygwin === ghmm === ghmm is build 32 bits only {{{ libghmm.1.0.0.dylib: Mach-O dynamically linked shared library i386 libghmm.1.dylib: Mach-O dynamically linked shared library i386 libghmm.dylib: Mach-O dynamically linked shared library i386 }}} Quick and ugly hack, needs SAGE64 specific cleanup: {{{ Sprocketer:ghmm-20080813 michaelabshoff$ hg diff diff -r 9d3e399ae771 spkg-install --- a/spkg-install Sun Aug 03 18:34:26 2008 -0700 +++ b/spkg-install Tue Jan 06 15:31:08 2009 -0800 @@ -7,6 +7,9 @@ # this does *NOT* work. First the configure.in script is hardcoded to # ignore that option. Second, if you change that then it turns out # that ghmm doesn't even compile. + +export CFLAGS="-O2 -g -m64" +export LDFLAGS="-m64" ./configure --prefix="$SAGE_LOCAL" }}} === singular === We need to enable system malloc for MacIntel since it is only chosen pre default for MacPPC. The ugly hack below needs to be cleaned up: {{{ diff -r 0e3b296b487a spkg-install --- a/spkg-install Sun Nov 30 23:10:51 2008 -0800 +++ b/spkg-install Tue Jan 06 16:46:38 2009 -0800 @@ -116,7 +116,8 @@ --enable-IntegerProgramming \ --disable-doc \ "$DYNAMIC_KERNEL" \ - "$ENABLE_DEBUG" + "$ENABLE_DEBUG" \ + --with-malloc=system if [ $? -ne 0 ]; then echo "Unable to configure Singular." }}} But at exit we are having problems with double frees: {{{ Sprocketer:sage-3.2.3-64bit michaelabshoff$ ./sage ---------------------------------------------------------------------- | Sage Version 3.2.3, Release Date: 2009-01-05 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: import sys sage: sys.maxint 9223372036854775807 sage: !uname Darwin sage: Exiting SAGE (CPU time 0m0.07s, Wall time 0m13.65s). sage.bin(162) malloc: *** error for object 0x106592030: Non-aligned pointer being freed (2) *** set a breakpoint in malloc_error_break to debug sage.bin(162) malloc: *** error for object 0x106592038: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug sage.bin(162) malloc: *** error for object 0x106591048: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug sage.bin(162) malloc: *** error for object 0x106591030: Non-aligned pointer being freed (2) *** set a breakpoint in malloc_error_break to debug Sprocketer:sage-3.2.3-64bit michaelabshoff$ ./sage }}} These also happen on Cygwin, so this needs to be investigated and fixed. === tachyon === Fails due to 64 bit build problems - known problem with ticket === flintqs === Fails due to 64 bit build problems - known problem with ticket === cvxopt === Linker trouble - no clue why yet. {{{ gcc -m64 -L/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/C/base.o build/temp.macosx-10.3-i386-2.5/C/dense.o build/temp.macosx-10.3-i386-2.5/C/sparse.o -L/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib -lm -llapack -lblas -lgfortran -o build/lib.macosx-10.3-i386-2.5/cvxopt/base.so ld: library not found for -lgfortran collect2: ld returned 1 exit status }}} |