Differences between revisions 1 and 24 (spanning 23 versions)
Revision 1 as of 2007-11-22 05:02:41
Size: 1587
Editor: was
Comment:
Revision 24 as of 2008-03-26 22:54:30
Size: 13450
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

 * export CFLAGS="-arch x86_64"

 * building python {{{
For some pointers on how to get python to build in 64 bit mode see

http://mail.python.org/pipermail/pythonmac-sig/2007-June/019045.html

To quote (which is actually about 64 bit on *Tiger*):

<quote>
The build is universal, but for me only one of the two archictures
actually worked: I did my build on an Intel system and the 64-bit
build worked on that machine, but didn't work on a G5 mac. That's
probably something shallow, but as that machine doesn't have the
Xcode installed and is on the other side of a slow network connection
I haven't tried to debug this yet.

1) Edit the configure script, look for "-arch i386" and "-arch ppc"
and change that those to "-arch ppc64" and "-arch x86_64". You'll
have to make multiple changes to the configure file.

2) Build using:

       $ mkdir build
       $ cd build
       $ CFLAGS="-arch ppc64 -arch x86_64" ../configure \
           --enable-universalsdk \
           --disable-toolbox-glue --prefix=/opt/python25-64bit
       $ make
       $ make install

3) Optionally: run "make testall" to run the unittests and check
pyconfig.h to check the various SIZEOF definitions.

You now have a 64-bit build of python in /opt/python25-64bit.
}}}
Line 45: Line 7:
}}}
But:

[06:36] <mabshoff> But it doesn't match the python flags. I checked on it once.
[06:37] <was_> It's distutils.
[06:37] <was_> Cython doesn't have anything to do with the flags.
}}}

= Building Python 2.5.2 on OSX =

  ./configure --prefix=/Users/mabshoff/python-2.5.2-64 --with-gcc="gcc -m64" --enable-toolbox-glue=false

make && make install works, but there are various error message from gcc since it fails to build the toolbox glue on OSX, despite the above command disabling it.

= Build Order of packages for 2.10.alpha2 =

 * dir-0.1 - sources !solve!
 * prereq-0.3 - sources !solve!
 * sage_scripts-2.10.alpha2 - sources !solve!
 * bzip2-1.0.4 - 32 bit enough? !solve!
 * conway_polynomials-0.2 - database? !solve!
 * gmp-4.2.1.p12 - must be 64 bit !solve!
 * termcap-1.3.1 - must be 64 bit !solve!
 * readline-5.2.p0 - must be 64 bit !solve!
 * pari-2.3.3 - must be 64 bit !solve!
 * ntl-5.4.1.p10 - must be 64 bit !solve!
 * cremona-20071219.p1 - must be 64 bit !solve!
 * graphs-20070722 - sources? !solve!
 * elliptic_curves-0.1 - don't know !solve!
 * extcode-2.10.alpha2 - sources? !solve!
 * flint-1.05 - must be 64 bit !solve!
 * zlib-1.2.3.p3 - must be 64 bit !solve!
 * sqlite-3.5.3.p1 - must be 64 bit !solve!
 * libgpg_error-1.5 - must be 64 bit !solve!
 * libgcrypt-1.2.4 - must be 64 bit !solve!
 * opencdk-0.5.9 - must be 64 bit !solve!
 * gnutls-1.6.3 - must be 64 bit !solve!
 * libpng-1.2.22.p3 - must be 64 bit !solve!
 * python-2.5.1.p11 - must be 64 bit - see above
 * freetype-2.3.5 - must be 64 bit
 * gd-2.0.33.p5 - must be 64 bit - distutils (partially?)
 * gdmodule-0.56.p4 - must be 64 bit - distutils
 * fortran-20071120.p3 - must be 64 bit - build gcc 4.2.2 gfortran from source
 * lapack-20071123.p0 - must be 64 bit
 * atlas-3.8.p7 - skipped anyway
 * gsl-1.9 - must be 64 bit
 * iml-1.0.1.p8 - must be 64 bit
 * ipython-0.8.1.p1 - python? - distutils?
 * givaro-3.2.6.p5 - must be 64 bit
 * linbox-20070915.p3 - must be 64 bit
 * f2c-20070816 - must be 64 bit
 * blas-20070724 - must be 64 bit
 * numpy-20080104-1.0.4.p1 - must be 64 bit - distutils
 * matplotlib-0.91.1.p1 - must be 64 bit - distutils
 * mercurial-0.9.5.p0 - must be 64 bit
 * mpfr-2.3.0.p0 - integarted into mpfr-2.3.0.p1
 * pexpect-2.0.p1 - must be 64 bit - distutils
 * mpfi-1.3.4-cvs20071125.p4 - must be 64 bit
 * pycrypto-2.0.1.p1 - python - distutils
 * cython-0.9.6.9 - python - distutils
 * sympy-0.5.7 - python - distutils
 * zodb3-3.7.0 - python only? - distutils
 * networkx-0.35.1 - pure python - distutils
 * quaddouble-2.2.p7 - must be 64 bit
 * python_gnutls-1.1.1 - python - distutils
 * twistedweb2-20070619 - python only? - distutils
 * twisted-2.5.0.p8 - python only? - distutils
 * singular-3-0-4-1-20071209.p3 - must be 64 bit
 * scons-0.97 - python only - distutils
 * symmetrica-2.0.p0 - must be 64 bit
 * libfplll-2.1.6-20071129 - must be 64 bit
 * polybori-0.1-r6 - must be 64 bit
 * rpy-1.0.1.p0 - must be 64 bit
 * r-2.6.1.p7 - must be 64 bit
 * rubiks-20070912.p0 - must be 64 bit
 * libm4ri-20071224 - must be 64 bit
 * sage-2.10.alpha2 - must be 64 bit
 * doc-2.10.alpha2 - doc
 * examples-2.10.alpha2 - doc
 * gap-4.4.10.p0 - 32 bit enough for now
 * clisp-2.41.p12 - 32 bit enough for now
 * maxima-5.13.0.p2 - 32 bit enough for now
 * genus2reduction-0.3 - depends on libpari, so needs to be 64 bits
 * lcalc-20070107.p0 - depends on libpari, so needs to be 64 bits
 * sympow-1.018.1.p3 - 32 bit enough for now
 * cddlib-094b.p0 - 32 bit enough for now
 * gfan-0.2.2.p2 - 32 bit enough for now
 * ecm-6.1.3 - 32 bit enough for now
 * tachyon-0.98beta.p3 - 32 bit enough for now
 * weave-0.4.9 - 32 bit enough for now
 * flintqs-20070817.p1 - 32 bit enough for now
 * palp-1.1 - 32 bit enough for now
 * moin-1.5.7.p2 - python
 * ipython1-20070130 - python
 * scipy-20071020-0.6.p2 - python only?
 * scipy_sandbox-20071020 - python only?
 * cvxopt-0.9.p5 - no clue
 * jmol-11.5.2 - java


= Build Notes =
Sage 2.10.alpha2 port to 64 bit OSX:

== prereq-0.3 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   SAGE_OPT="-O2 -g -m64 " && export SAGE_OPT
fi
}}}
More changes in spkg/base/bzip2-1.0.4-install

== gmp-4.2.1.p12 ==

broken, need to update to 4.2.2, skip patching

add ABI=64, otherwise set ABI=32

Maybe: Our gmp 4.2.1 is FUBAR, i.e. Cygwin problems

Important: add extern __inline__ gmp-h.in fix for Darwin

== termcap-1.3.1 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS="-O2 -g -m64 " && export CFLAGS
fi
}}}

== readline-5.2.p0 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS="-O2 -g -m64 " && export CFLAGS
fi
}}}

== pari-2.3.3 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS="-g -m64 " && export CFLAGS
fi
}}}
With those settings:
{{{
        GP/PARI CALCULATOR Version 2.3.3 (released)
   i386 running darwin (x86-64/GMP kernel) 64-bit version
  compiled: Jan 13 2008, gcc-4.0.1 (Apple Inc. build 5465)
   (readline not compiled in, extended help available)
}}}

== cremona-20071219.p1 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
    echo "64 bit MacIntel build"
    PICFLAG=-m64
    export PICFLAG
fi
}}}
OPTFLAG overwrites CC and CXX

== flint-1.05 ==

spkg-install:
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   FLINT_TUNE=" -fPIC -m64"
fi
}}}
In the dylib Darwin case:
{{{
    if ["$SAGE64" = "yes" ]; then
       $MAKE libflint.dylib64
    else
       $MAKE libflint.dylib
    fi
}}}
in src/makefile add
{{{
libflint.dylib64: $(FLINTOBJ)
        $(CC) -m64 -single_module -fPIC -dynamiclib -o libflint.dylib $(FLINTOBJ) $(LIBS)
}}}
spkg-check:
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   FLINT_TUNE=" -fPIC -m64"
fi
}}}

== zlib-1.2.3.p3 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS=" -m64 $CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
else
   CFLAGS="$CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
fi
export CFLAGS
}}}

== sqlite-3.5.3.p1 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi
}}}

== plibgpg_error-1.5 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi
}}}

== libgcrypt-1.2.4 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi
}}}

== opencdk-0.5.9 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi
}}}

== gnutls-1.6.3 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi
}}}

== libpng-1.2.22.p3 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS=" -m64 $CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
else
   CFLAGS="$CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
fi
export CFLAGS
}}}
Note: gd-2.0.35 requires a dynamic libpng12.dylib

== freetype-2.3.5 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi
}}}

== gd-2.0.33.p5 ==

Update to 2.0.35
{{{
# needed to pick up zlib.h
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS=" -m64 $CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\" -I$SAGE_LOCAL/include/freetype2/"
else
   CFLAGS="$CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\" -I$SAGE_LOCAL/include/freetype2/"
fi
export CFLAGS
}}}
Makefile.am: add "-m64"

== fortran-20071120.p3 ==

gfortran 4.2.2 compiled from scratch.

Add "-m64" to sage_fortran options, link x86_64 libgfortran.dylib

== iml-1.0.1.p8 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
fi
}}}

== linbox-20070915.p3 ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
   CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
fi
}}}

== f2c-20070816 ==

uncomment "CFLAGS = -O" in f2c/makefile
uncomment "CFLAGS = -O -fPIC" in libf2c/makefile
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "
else
   CFLAGS="-fPIC"
fi
}}}
Dual architecture static lib is created, but f2c works

== mpfi ==
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
   CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
fi
}}}

== quaddouble-2.2.p7 ==
{{{
CXXFLAGS='-fPIC -O3 -Dx86 -m64'
export CXXFLAGS
}}}

== twisted-2.5.0.p8 ==
depends on pymactoolbox.h?
{{{
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -m64 -I/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5 -c twisted/internet/cfsupport/cfsupport.c -o build/temp.macosx-10.3-i386-2.5/twisted/internet/cfsupport/cfsupport.o -w
In file included from twisted/internet/cfsupport/cfsupport.c:8:
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:138: error: syntax error before ‘Track’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:140: error: syntax error before ‘Movie’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:142: error: syntax error before ‘MovieController’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:146: error: syntax error before ‘UserData’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:148: error: syntax error before ‘Media’
error: command 'gcc' failed with exit status 1
Error: Subprocess exited with result 1 for project core
Error installing Twisted networking framework

real 0m5.832s
user 0m1.288s
sys 0m0.744s
sage: An error occurred while installing twisted-2.5.0.p8
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /Users/mabshoff/sage-2.10.alpha2/install.log. Describe your computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/Users/mabshoff/sage-2.10.alpha2/spkg/build/twisted-2.5.0.p8 and type 'make'.
Instead type "/Users/mabshoff/sage-2.10.alpha2/sage -sh"
in order to set all environment variables correctly, then cd to
/Users/mabshoff/sage-2.10.alpha2/spkg/build/twisted-2.5.0.p8
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/twisted-2.5.0.p8] Error 1
}}}

== singular-3-0-4-1-20071209.p3 ==
{{{
CXXFLAGS="$CXXFLAGS -fPIC -O3 -g -m64"; export CXXFLAGS
CFLAGS="$CFLAGS -fPIC -O3 -g -m64"; export CFLAGS
CPPFLAGS="$CXXFLAGS -fPIC -O3 -g -m64"; export CPPFLAGS
}}}

== symmetrica-2.0 ==

Add -m64 in patches/makefile in three places

== polybori ==
{{{
64 bit MacIntel
Starting build...
Running build_polybori...
scons: Reading SConscript files ...
KeyError: 'PYTHONHOME':
  File "/Users/mabshoff/sage-2.10.alpha2/spkg/standard/polybori-0.1-r6/src/PolyBoRi-0.1/SConstruct", line 105:
    env=Environment(ENV = {'PATH': os.environ['PATH']}, options=opts,tools = tools, toolpath = '.')
  File "/Users/mabshoff/sage-2.10.alpha2/local/lib/scons-0.97/SCons/Environment.py", line 779:
    options.Update(self)
  File "/Users/mabshoff/sage-2.10.alpha2/local/lib/scons-0.97/SCons/Options/__init__.py", line 145:
    execfile(filename, values)
  File "custom.py", line 13:
    PYPREFIX=os.environ['PYTHONHOME']
  File "/Users/mabshoff/sage-2.10.alpha2/local/lib/python2.5/UserDict.py", line 22:
    raise KeyError(key)
Error building PolyBoRi.
}}}

== 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" )
}}}


== libm4fri ==
{{{
CFLAGS="$CFLAGS -fPIC $INCLUDES -L$SAGE_LOCAL/lib -m64"
CXXFLAGS="$CXXFLAGS -fPIC $INCLUDES -L$SAGE_LOCAL/lib -m64"
CPPFLAGS="$INCLUDES -m64"
}}}


#####################################################################


== numpy, scipy & friends ==

With Python 2.5.2. compiler with {{{--with-gcc="gcc -m64"}}} numpy builds fine. More investigation is needed here.

== Done (incomplete list) ==

 * givaro-3.2.6.p10
 * gsl-1.10
 * libfplll
 * mpfr-2.3.0.p0
 * ntl-5.4.2

OSX 64-bit

  • Cython {{{ 20:58 < mabshoff> There is also a bug in the way Cython builds its extensions.

20:58 < mabshoff> It needs to use the flags python was build with, not some random stuff people thing 20:58 < mabshoff> think is good. 20:58 < mabshoff> I told Robert about it.

But:

[06:36] <mabshoff> But it doesn't match the python flags. I checked on it once. [06:37] <was_> It's distutils. [06:37] <was_> Cython doesn't have anything to do with the flags. }}}

Building Python 2.5.2 on OSX

  • /configure --prefix=/Users/mabshoff/python-2.5.2-64 --with-gcc="gcc -m64" --enable-toolbox-glue=false

make && make install works, but there are various error message from gcc since it fails to build the toolbox glue on OSX, despite the above command disabling it.

Build Order of packages for 2.10.alpha2

  • dir-0.1 - sources !solve!
  • prereq-0.3 - sources !solve!
  • sage_scripts-2.10.alpha2 - sources !solve!
  • bzip2-1.0.4 - 32 bit enough? !solve!
  • conway_polynomials-0.2 - database? !solve!
  • gmp-4.2.1.p12 - must be 64 bit !solve!
  • termcap-1.3.1 - must be 64 bit !solve!
  • readline-5.2.p0 - must be 64 bit !solve!
  • pari-2.3.3 - must be 64 bit !solve!
  • ntl-5.4.1.p10 - must be 64 bit !solve!
  • cremona-20071219.p1 - must be 64 bit !solve!
  • graphs-20070722 - sources? !solve!
  • elliptic_curves-0.1 - don't know !solve!
  • extcode-2.10.alpha2 - sources? !solve!
  • flint-1.05 - must be 64 bit !solve!
  • zlib-1.2.3.p3 - must be 64 bit !solve!
  • sqlite-3.5.3.p1 - must be 64 bit !solve!
  • libgpg_error-1.5 - must be 64 bit !solve!
  • libgcrypt-1.2.4 - must be 64 bit !solve!
  • opencdk-0.5.9 - must be 64 bit !solve!
  • gnutls-1.6.3 - must be 64 bit !solve!
  • libpng-1.2.22.p3 - must be 64 bit !solve!
  • python-2.5.1.p11 - must be 64 bit - see above
  • freetype-2.3.5 - must be 64 bit
  • gd-2.0.33.p5 - must be 64 bit - distutils (partially?)
  • gdmodule-0.56.p4 - must be 64 bit - distutils
  • fortran-20071120.p3 - must be 64 bit - build gcc 4.2.2 gfortran from source
  • lapack-20071123.p0 - must be 64 bit
  • atlas-3.8.p7 - skipped anyway
  • gsl-1.9 - must be 64 bit
  • iml-1.0.1.p8 - must be 64 bit
  • ipython-0.8.1.p1 - python? - distutils?
  • givaro-3.2.6.p5 - must be 64 bit
  • linbox-20070915.p3 - must be 64 bit
  • f2c-20070816 - must be 64 bit
  • blas-20070724 - must be 64 bit
  • numpy-20080104-1.0.4.p1 - must be 64 bit - distutils
  • matplotlib-0.91.1.p1 - must be 64 bit - distutils
  • mercurial-0.9.5.p0 - must be 64 bit
  • mpfr-2.3.0.p0 - integarted into mpfr-2.3.0.p1
  • pexpect-2.0.p1 - must be 64 bit - distutils
  • mpfi-1.3.4-cvs20071125.p4 - must be 64 bit
  • pycrypto-2.0.1.p1 - python - distutils
  • cython-0.9.6.9 - python - distutils
  • sympy-0.5.7 - python - distutils
  • zodb3-3.7.0 - python only? - distutils
  • networkx-0.35.1 - pure python - distutils
  • quaddouble-2.2.p7 - must be 64 bit
  • python_gnutls-1.1.1 - python - distutils
  • twistedweb2-20070619 - python only? - distutils
  • twisted-2.5.0.p8 - python only? - distutils
  • singular-3-0-4-1-20071209.p3 - must be 64 bit
  • scons-0.97 - python only - distutils
  • symmetrica-2.0.p0 - must be 64 bit
  • libfplll-2.1.6-20071129 - must be 64 bit
  • polybori-0.1-r6 - must be 64 bit
  • rpy-1.0.1.p0 - must be 64 bit
  • r-2.6.1.p7 - must be 64 bit
  • rubiks-20070912.p0 - must be 64 bit
  • libm4ri-20071224 - must be 64 bit
  • sage-2.10.alpha2 - must be 64 bit
  • doc-2.10.alpha2 - doc
  • examples-2.10.alpha2 - doc
  • gap-4.4.10.p0 - 32 bit enough for now
  • clisp-2.41.p12 - 32 bit enough for now
  • maxima-5.13.0.p2 - 32 bit enough for now
  • genus2reduction-0.3 - depends on libpari, so needs to be 64 bits
  • lcalc-20070107.p0 - depends on libpari, so needs to be 64 bits
  • sympow-1.018.1.p3 - 32 bit enough for now
  • cddlib-094b.p0 - 32 bit enough for now
  • gfan-0.2.2.p2 - 32 bit enough for now
  • ecm-6.1.3 - 32 bit enough for now
  • tachyon-0.98beta.p3 - 32 bit enough for now
  • weave-0.4.9 - 32 bit enough for now
  • flintqs-20070817.p1 - 32 bit enough for now
  • palp-1.1 - 32 bit enough for now
  • moin-1.5.7.p2 - python
  • ipython1-20070130 - python
  • scipy-20071020-0.6.p2 - python only?
  • scipy_sandbox-20071020 - python only?
  • cvxopt-0.9.p5 - no clue
  • jmol-11.5.2 - java

Build Notes

Sage 2.10.alpha2 port to 64 bit OSX:

prereq-0.3

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   SAGE_OPT="-O2 -g -m64 " && export SAGE_OPT
fi

More changes in spkg/base/bzip2-1.0.4-install

gmp-4.2.1.p12

broken, need to update to 4.2.2, skip patching

add ABI=64, otherwise set ABI=32

Maybe: Our gmp 4.2.1 is FUBAR, i.e. Cygwin problems

Important: add extern inline gmp-h.in fix for Darwin

termcap-1.3.1

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS="-O2 -g -m64 " && export CFLAGS
fi

readline-5.2.p0

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS="-O2 -g -m64 " && export CFLAGS
fi

pari-2.3.3

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS="-g -m64 " && export CFLAGS
fi

With those settings:

        GP/PARI CALCULATOR Version 2.3.3 (released)
   i386 running darwin (x86-64/GMP kernel) 64-bit version
  compiled: Jan 13 2008, gcc-4.0.1 (Apple Inc. build 5465)
   (readline not compiled in, extended help available)

cremona-20071219.p1

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
    echo "64 bit MacIntel build"
    PICFLAG=-m64
    export PICFLAG
fi

OPTFLAG overwrites CC and CXX

flint-1.05

spkg-install:

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   FLINT_TUNE=" -fPIC -m64"
fi

In the dylib Darwin case:

    if ["$SAGE64" = "yes" ]; then
       $MAKE libflint.dylib64
    else
       $MAKE libflint.dylib
    fi

in src/makefile add

libflint.dylib64: $(FLINTOBJ)
        $(CC) -m64 -single_module -fPIC -dynamiclib -o libflint.dylib $(FLINTOBJ) $(LIBS)

spkg-check:

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   FLINT_TUNE=" -fPIC -m64"
fi

zlib-1.2.3.p3

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS=" -m64 $CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
else
   CFLAGS="$CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
fi
export CFLAGS

sqlite-3.5.3.p1

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

plibgpg_error-1.5

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

libgcrypt-1.2.4

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

opencdk-0.5.9

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

gnutls-1.6.3

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

libpng-1.2.22.p3

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS=" -m64 $CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
else
   CFLAGS="$CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\""
fi
export CFLAGS

Note: gd-2.0.35 requires a dynamic libpng12.dylib

freetype-2.3.5

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

gd-2.0.33.p5

Update to 2.0.35

# needed to pick up zlib.h
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   CFLAGS=" -m64 $CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\" -I$SAGE_LOCAL/include/freetype2/"
else
   CFLAGS="$CFLAGS -fPIC -g -I\"$SAGE_LOCAL/include\" -I$SAGE_LOCAL/include/freetype2/"
fi
export CFLAGS

Makefile.am: add "-m64"

fortran-20071120.p3

gfortran 4.2.2 compiled from scratch.

Add "-m64" to sage_fortran options, link x86_64 libgfortran.dylib

iml-1.0.1.p8

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
fi

linbox-20070915.p3

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
   CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
fi

f2c-20070816

uncomment "CFLAGS = -O" in f2c/makefile uncomment "CFLAGS = -O -fPIC" in libf2c/makefile

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "
else
   CFLAGS="-fPIC"
fi

Dual architecture static lib is created, but f2c works

mpfi

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="-O2 -g -m64 "; export CFLAGS
   CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
   CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
fi

quaddouble-2.2.p7

CXXFLAGS='-fPIC -O3 -Dx86 -m64'
export CXXFLAGS

twisted-2.5.0.p8

depends on pymactoolbox.h?

gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -m64 -I/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5 -c twisted/internet/cfsupport/cfsupport.c -o build/temp.macosx-10.3-i386-2.5/twisted/internet/cfsupport/cfsupport.o -w
In file included from twisted/internet/cfsupport/cfsupport.c:8:
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:138: error: syntax error before ‘Track’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:140: error: syntax error before ‘Movie’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:142: error: syntax error before ‘MovieController’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:146: error: syntax error before ‘UserData’
/Users/mabshoff/sage-2.10.alpha2/local/include/python2.5/pymactoolbox.h:148: error: syntax error before ‘Media’
error: command 'gcc' failed with exit status 1
Error: Subprocess exited with result 1 for project core
Error installing Twisted networking framework

real    0m5.832s
user    0m1.288s
sys     0m0.744s
sage: An error occurred while installing twisted-2.5.0.p8
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /Users/mabshoff/sage-2.10.alpha2/install.log.  Describe your computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/Users/mabshoff/sage-2.10.alpha2/spkg/build/twisted-2.5.0.p8 and type 'make'.
Instead type "/Users/mabshoff/sage-2.10.alpha2/sage -sh"
in order to set all environment variables correctly, then cd to
/Users/mabshoff/sage-2.10.alpha2/spkg/build/twisted-2.5.0.p8
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/twisted-2.5.0.p8] Error 1

singular-3-0-4-1-20071209.p3

CXXFLAGS="$CXXFLAGS -fPIC -O3 -g -m64"; export CXXFLAGS
CFLAGS="$CFLAGS -fPIC -O3 -g -m64"; export CFLAGS
CPPFLAGS="$CXXFLAGS -fPIC -O3 -g -m64"; export CPPFLAGS

symmetrica-2.0

Add -m64 in patches/makefile in three places

polybori

64 bit MacIntel
Starting build...
Running build_polybori...
scons: Reading SConscript files ...
KeyError: 'PYTHONHOME':
  File "/Users/mabshoff/sage-2.10.alpha2/spkg/standard/polybori-0.1-r6/src/PolyBoRi-0.1/SConstruct", line 105:
    env=Environment(ENV = {'PATH': os.environ['PATH']}, options=opts,tools = tools, toolpath = '.')
  File "/Users/mabshoff/sage-2.10.alpha2/local/lib/scons-0.97/SCons/Environment.py", line 779:
    options.Update(self)
  File "/Users/mabshoff/sage-2.10.alpha2/local/lib/scons-0.97/SCons/Options/__init__.py", line 145:
    execfile(filename, values)
  File "custom.py", line 13:
    PYPREFIX=os.environ['PYTHONHOME']
  File "/Users/mabshoff/sage-2.10.alpha2/local/lib/python2.5/UserDict.py", line 22:
    raise KeyError(key)
Error building PolyBoRi.

== 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" )

libm4fri

CFLAGS="$CFLAGS -fPIC $INCLUDES -L$SAGE_LOCAL/lib -m64"
CXXFLAGS="$CXXFLAGS -fPIC $INCLUDES -L$SAGE_LOCAL/lib -m64"
CPPFLAGS="$INCLUDES -m64"

numpy, scipy & friends

With Python 2.5.2. compiler with --with-gcc="gcc -m64" numpy builds fine. More investigation is needed here.

Done (incomplete list)

  • givaro-3.2.6.p10
  • gsl-1.10
  • libfplll
  • mpfr-2.3.0.p0
  • ntl-5.4.2