[gambit-list] Xcode 5

Bradley Lucier lucier at math.purdue.edu
Tue Oct 1 13:38:10 EDT 2013


On 10/01/2013 12:21 PM, Marc Feeley wrote:
> On #gambit someone reported an issue when compiling Gambit on the newly released Xcode 5.  When I try building Gambit with Xcode 5, with and without --enable-single-host, the system builds fine.  Has anyone encountered issues compiling with Xcode 5?
>
> For your information, I also tried compiling Gambit with GNU gcc 4.8.0.  With gcc the compilation and execution times are much better (with --enable-single-host a "make -j8" takes 20 seconds versus 400 seconds for Xcode 5, and the interpreter is about 2x faster).  To install GNU gcc on OS X, just use the script misc/install-gnu-gcc-osx .  I highly recommend it!

Marc:

Some comments about your script:

1.  I don't think you need brew.  You can download the latest gmp, mpfr,
and mpc sources, and add soft links from the gcc source directory to
thesource directories of the libraries.  Then these libraries will be
bootstrapped and tested using the newly built gcc.

2.  I don't know why you'd give up the goodness of GNU Fortran, java,
and objc by restricting --enable-languages.  LTO is enabled by default.

3.  I wouldn't recommend disabling multilib (wouldn't you ever want to
build a 32-bit binary on a 64-bit machine?).

4.  The GCC developers do *not* support what they call "in source tree"
builds.  So you should put the build directory outside the gcc source tree.

5.  I'd rather put the install directory in /usr/local instead of /usr.

I'm no shell script expert, and I don't think the included script works
as is, but it's an attempt at addressing some of these issues.

Brad
-------------- next part --------------
#! /bin/bash
GCCVERSION=4.8.1
GMPVERSION=5.1.3
MPFRVERSION=3.1.2
MPCVERSION=1.0.1
PREFIX=/usr/local/gcc-$GCCVERSION
MAKE="make -j 4"

mkdir temp-gcc
cd temp-gcc

wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCCVERSION/gcc-$GCCVERSION.tar.gz
wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMPVERSION.tar.gz
wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFRVERSION.tar.gz
wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPCVERSION.tar.gz

tar zxf gcc-$GCCVERSION.tar.gz
tar zxf gmp-$GMPVERSION.tar.gz
tar zxf mpfr-$MPFRVERSION.tar.gz
tar zxf mpc-$MPCVERSION.tar.gz

ln -s ../gmp-$GMPVERSION   gcc-$GCCVERSION/gmp
ln -s ../mpfr-$MPFRVERSION gcc-$GCCVERSION/mpfr
ln -s ../mpc-$MPCVERSION   gcc-$GCCVERSION/mpc

mkdir build-dir
cd build-dir
../gcc-$GCCVERSION/configure --prefix=$PREFIX
$MAKE bootstrap > build.log

sudo mkdir -p $PREFIX
sudo make install


More information about the Gambit-list mailing list