I tried to build sage from source code on my mac running Mountain lion (10.8.2), but didn't succeed.
I followed the instruction of the README on sage website, i.e., enter the source code folder and run 'make'. I pasted the last portion of the log from the terminal below. Also, in case it helps, here is a link to the log file suggested in the terminal log:
https://dl.dropbox.com/u/38390926/python-2.7.3.p0.log
gcc -fno-strict-aliasing -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -I_ctypes/darwin -I/Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0/src/Modules/_ctype s/libffi_osx/include -I/Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0/src/Modules/_ctype s/libffi_osx/powerpc -I. -IInclude -I./Include -I/Users/jianbao/tmp/sage-5.3/local/include -I/usr/local/include -I/Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0/src/Include -I/Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0/src -c /Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0/src/Modules/_ctypes/ _ctypes.c -o build/temp.macosx-10.8-intel-2.7/Users/jianbao/tmp/sage-5.3/spkg/build/pyth on-2.7.3.p0/src/Modules/_ctypes/_ctypes.o -DMACOSX
gcc: error: i386: No such file or directory
gcc: error: x86_64: No such file or directory
gcc: error: unrecognized option ‘-arch’
gcc: error: unrecognized option ‘-arch’
Python build finished, but the necessary bits to build these modules were not found:
_bsddb dl gdbm
imageop linuxaudiodev ossaudiodev spwd sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
running build_scripts
running install_lib
warning: PyBuildInstallLib: 'build/lib.macosx-10.8-intel-2.7' does not exist -- no Python modules to install
running install_scripts
copying build/scripts-2.7/2to3 -> /Users/jianbao/tmp/sage-5.3/local/bin
copying build/scripts-2.7/idle -> /Users/jianbao/tmp/sage-5.3/local/bin
copying build/scripts-2.7/pydoc -> /Users/jianbao/tmp/sage-5.3/local/bin
copying build/scripts-2.7/smtpd.py -> /Users/jianbao/tmp/sage-5.3/local/bin
changing mode of /Users/jianbao/tmp/sage-5.3/local/bin/2to3 to 755
changing mode of /Users/jianbao/tmp/sage-5.3/local/bin/idle to 755
changing mode of /Users/jianbao/tmp/sage-5.3/local/bin/pydoc to 755
changing mode of /Users/jianbao/tmp/sage-5.3/local/bin/smtpd.py to 755
running install_egg_info
Creating /Users/jianbao/tmp/sage-5.3/local/lib/python2.7/lib-dynload/
Writing /Users/jianbao/tmp/sage-5.3/local/lib/python2.7/lib-dynload/Python-2.7.3-py 2.7.egg-info
if test -f /Users/jianbao/tmp/sage-5.3/local/bin/python -o -h /Users/jianbao/tmp/sage-5.3/local/bin/python; \
then rm -f /Users/jianbao/tmp/sage-5.3/local/bin/python; \
else true; \
fi
(cd /Users/jianbao/tmp/sage-5.3/local/bin; ln -s python2 python)
rm -f /Users/jianbao/tmp/sage-5.3/local/bin/python2
(cd /Users/jianbao/tmp/sage-5.3/local/bin; ln -s python2.7 python2)
rm -f /Users/jianbao/tmp/sage-5.3/local/bin/python2-config
(cd /Users/jianbao/tmp/sage-5.3/local/bin; ln -s python2.7-config python2-config)
rm -f /Users/jianbao/tmp/sage-5.3/local/bin/python-config
(cd /Users/jianbao/tmp/sage-5.3/local/bin; ln -s python2-config python-config)
test -d /Users/jianbao/tmp/sage-5.3/local/lib/pkgconfig || /usr/bin/install -c -d -m 755 /Users/jianbao/tmp/sage-5.3/local/lib/pkgconfig
rm -f /Users/jianbao/tmp/sage-5.3/local/lib/pkgconfig/python2.pc
(cd /Users/jianbao/tmp/sage-5.3/local/lib/pkgconfig; ln -s python-2.7.pc python2.pc)
rm -f /Users/jianbao/tmp/sage-5.3/local/lib/pkgconfig/python.pc
(cd /Users/jianbao/tmp/sage-5.3/local/lib/pkgconfig; ln -s python2.pc python.pc)
/usr/bin/install -c -m 644 ./Misc/python.man \
/Users/jianbao/tmp/sage-5.3/local/share/man/man1/python2.7.1
Testing importing of various modules...
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named math
math module failed to import
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/jianbao/tmp/sage-5.3/local/lib/python2.7/hashlib.py", line 141, in <module>
import logging
File "/Users/jianbao/tmp/sage-5.3/local/lib/python2.7/logging/__init__.py", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref
ImportError: No module named time
hashlib module failed to import
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named crypt
crypt module failed to import
Error: One or more modules failed to import.
real 1m0.045s
user 0m45.631s
sys 0m12.378s
************************************************************************
Error installing package python-2.7.3.p0
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
/Users/jianbao/tmp/sage-5.3/spkg/logs/python-2.7.3.p0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/Users/jianbao/tmp/sage-5.3/spkg/build/python-2.7.3.p0' && '/Users/jianbao/tmp/sage-5.3/sage' -sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
make[1]: *** [installed/python-2.7.3.p0] Error 1
real 43m39.075s
user 38m29.006s
sys 4m24.782s
Error building Sage.
make: *** [build] Error 1
On Tuesday, September 25, 2012 1:57:42 PM UTC-7, JBT wrote:
> Hi,
> I tried to build sage from source code on my mac running Mountain lion > (10.8.2), but didn't succeed.
Sage won't build, as is, on Mountain Lion. Several of us have had good luck with the following procedure:
- make sure you've updated to 10.8.2 (which you have). - make sure you've updated to the latest version of Xcode (4.5), and install the command line tools. - get the scipy spkg from the link given at http://trac.sagemath.org/sage_trac/ticket/13309, and put it in SAGE_ROOT/spkg/standard. - run 'make'.
On Tuesday, September 25, 2012 2:12:25 PM UTC-7, John H Palmieri wrote:
> On Tuesday, September 25, 2012 1:57:42 PM UTC-7, JBT wrote:
>> Hi,
>> I tried to build sage from source code on my mac running Mountain lion >> (10.8.2), but didn't succeed.
> Sage won't build, as is, on Mountain Lion. Several of us have had good > luck with the following procedure:
> - make sure you've updated to 10.8.2 (which you have). > - make sure you've updated to the latest version of Xcode (4.5), and > install the command line tools. > - get the scipy spkg from the link given at > http://trac.sagemath.org/sage_trac/ticket/13309, and put it in > SAGE_ROOT/spkg/standard. > - run 'make'.
> On Tuesday, September 25, 2012 2:12:25 PM UTC-7, John H Palmieri wrote:
>> On Tuesday, September 25, 2012 1:57:42 PM UTC-7, JBT wrote:
>>> Hi,
>>> I tried to build sage from source code on my mac running Mountain lion >>> (10.8.2), but didn't succeed.
>> Sage won't build, as is, on Mountain Lion. Several of us have had good >> luck with the following procedure:
>> - make sure you've updated to 10.8.2 (which you have).
>> - make sure you've updated to the latest version of Xcode (4.5), and >> install the command line tools.
>> - get the scipy spkg from the link given at >> http://trac.sagemath.org/sage_trac/ticket/13309, and put it in >> SAGE_ROOT/spkg/standard.
>> - run 'make'.
OK, I didn't try either of the two things last time. But I didn't get lucky either after 'make clean' and deleting old scipy package. It failed at the same spot.
On Tuesday, September 25, 2012 3:02:30 PM UTC-7, yomcat wrote:
> On 26/09/2012, at 9:45 AM, JBT <jianb...@gmail.com <javascript:>> wrote: > > Hi, John,
> > Thanks for the tip. I tried it, but no luck :-( The 'make' got stuck > pretty > > much at the same place.
> 1. Did you try again from scratch? Either by running 'make clean' or > unpacking the source again. > 2. Did you delete the older scipy spkg?
> Michael
> > JBT
> > On Tuesday, September 25, 2012 2:12:25 PM UTC-7, John H Palmieri wrote:
> >> On Tuesday, September 25, 2012 1:57:42 PM UTC-7, JBT wrote:
> >>> Hi,
> >>> I tried to build sage from source code on my mac running Mountain lion > >>> (10.8.2), but didn't succeed.
> >> Sage won't build, as is, on Mountain Lion. Several of us have had good > >> luck with the following procedure:
> >> - make sure you've updated to 10.8.2 (which you have). > >> - make sure you've updated to the latest version of Xcode (4.5), and > >> install the command line tools. > >> - get the scipy spkg from the link given at > >> http://trac.sagemath.org/sage_trac/ticket/13309, and put it in > >> SAGE_ROOT/spkg/standard. > >> - run 'make'.
On Tuesday, September 25, 2012 3:11:52 PM UTC-7, JBT wrote:
> Michael,
> OK, I didn't try either of the two things last time. But I didn't get > lucky either after 'make clean' and deleting old scipy package. It failed > at the same spot.
> JBT
> On Tuesday, September 25, 2012 3:02:30 PM UTC-7, yomcat wrote:
>> On 26/09/2012, at 9:45 AM, JBT <jianb...@gmail.com> wrote: >> > Hi, John,
>> > Thanks for the tip. I tried it, but no luck :-( The 'make' got stuck >> pretty >> > much at the same place.
>> 1. Did you try again from scratch? Either by running 'make clean' or >> unpacking the source again. >> 2. Did you delete the older scipy spkg?
'make clean' doesn't do very much. 'make distclean' is more effective. I don't know if it will help, though.
What does 'uname -a' return? What sort of machine is this?
On Tuesday, September 25, 2012 3:16:35 PM UTC-7, John H Palmieri wrote:
> On Tuesday, September 25, 2012 3:11:52 PM UTC-7, JBT wrote:
>> Michael,
>> OK, I didn't try either of the two things last time. But I didn't get >> lucky either after 'make clean' and deleting old scipy package. It failed >> at the same spot.
>> JBT
>> On Tuesday, September 25, 2012 3:02:30 PM UTC-7, yomcat wrote:
>>> On 26/09/2012, at 9:45 AM, JBT <jianb...@gmail.com> wrote: >>> > Hi, John,
>>> > Thanks for the tip. I tried it, but no luck :-( The 'make' got stuck >>> pretty >>> > much at the same place.
>>> 1. Did you try again from scratch? Either by running 'make clean' or >>> unpacking the source again. >>> 2. Did you delete the older scipy spkg?
> 'make clean' doesn't do very much. 'make distclean' is more effective. I > don't know if it will help, though.
> What does 'uname -a' return? What sort of machine is this?
On Tuesday, September 25, 2012 3:24:08 PM UTC-7, JBT wrote:
> John,
> FYI, here is the uname info: > >$ uname -a > Darwin jbtlap.ssl.berkeley.edu 12.2.0 Darwin Kernel Version 12.2.0: Sat > Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
From your log:
gcc ... -arch i386 -arch x86_64 ... gcc: error: i386: No such file or directory gcc: error: x86_64: No such file or directory
This looks suspicious. Did Sage's gcc spkg build? Or have you installed gcc yourself? If you've installed it yourself, what does "gcc --version" say? Also if you've installed it yourself, start with a clean Sage tarball, get the new scipy spkg (although this won't be relevant if the python package fails to build) and do this:
Thanks for following up on this. So, I tried your suggestion. Here are a few shell lines:
>$ make
cd spkg && \ "../spkg/pipestatus" \ "env SAGE_PARALLEL_SPKG_BUILD='' ./install all 2>&1" \ "tee -a ../install.log" Installing GCC because SAGE_INSTALL_GCC is set to 'yes'.
Unfortunately, still no luck. The building process stopped at the same place. Bummer :-(
On Wednesday, September 26, 2012 7:11:26 PM UTC-7, John H Palmieri wrote:
> On Tuesday, September 25, 2012 3:24:08 PM UTC-7, JBT wrote:
>> John,
>> FYI, here is the uname info: >> >$ uname -a >> Darwin jbtlap.ssl.berkeley.edu 12.2.0 Darwin Kernel Version 12.2.0: Sat >> Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
> From your log:
> gcc ... -arch i386 -arch x86_64 ... > gcc: error: i386: No such file or directory > gcc: error: x86_64: No such file or directory
> This looks suspicious. Did Sage's gcc spkg build? Or have you installed > gcc yourself? If you've installed it yourself, what does "gcc --version" > say? Also if you've installed it yourself, start with a clean Sage tarball, > get the new scipy spkg (although this won't be relevant if the python > package fails to build) and do this:
On Thursday, September 27, 2012 3:16:07 PM UTC-7, JBT wrote:
> Hi John,
> Thanks for following up on this. So, I tried your suggestion. Here are a > few shell lines: > >$ make > cd spkg && \ > "../spkg/pipestatus" \ > "env SAGE_PARALLEL_SPKG_BUILD='' ./install all 2>&1" \ > "tee -a ../install.log" > Installing GCC because SAGE_INSTALL_GCC is set to 'yes'.
> Unfortunately, still no luck. The building process stopped at the same > place. Bummer :-(
You didn't answer the other questions: have you installed another version of gcc? What does "gcc --version" say? Oh, and also, what does "command -v gcc" say?