I have been trying to build ECL under OS X 10.7 and I have been running into trouble. When I try building it I end up getting a segfault on the ecl_min stage.
I configure with the following line:
./configure --build=x86_64 --target=x86_64 --prefix=`pwd`/install_ecl
CC=/Developer/usr/bin/gcc-4.2
And the compile fails with:
if [ -f CROSS-COMPILER ]; then \
./CROSS-COMPILER compile; \
else \
ECLDIR=`pwd`/ ./ecl_min compile; \
fi
/bin/sh: line 1: 17433 Segmentation fault: 11 ECLDIR=`pwd`/ ./ecl_min compile
I have tried building gmp and boehm-gc externally and not using the included ones, but unfortunately it ended up with the same results. I have also tried the default llvm-gcc without much luck either.
Has anyone been able to compile ECL under Lion, and if so, what configure options / patches did you need to apply.
Update: I was able to compile thanks to the accepted answer below. Here is the scripts that I used (Note: This is from a fresh git clone of ECL):
#!/bin/sh
ECL_INSTALLDIR="`pwd`/install_ecl"
mkdir -p $ECL_INSTALLDIR
./configure\
--prefix=$ECL_INSTALLDIR\
--enable-boehm\
--enable-unicode=no\
CC=/Developer/usr/bin/gcc\
CXX=/Developer/usr/bin/g++\
CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS"
make && make install
This page describes the two causes of the problem (an issue with the compiler, and an issue with garbage collector compatibility), and offers a temporary solution until the issue itself is fixed. The instructions come down to:
--enable-boehm=system CPPFLAGS=-I/location/for/library/include LDFLAGS=-L/location/for/library/lib
Where /location/for/library
is the prefix you used to install the garbage collector.
And then it should build properly.
I also found this MacPorts ticket which seems to be tracking this issue; check there for future updates to see if it will be fixed.