Compiling universal glib on Mac OS X
- From: "hadley wickham" <h wickham gmail com>
- To: gtk-list gnome org
- Subject: Compiling universal glib on Mac OS X
- Date: Tue, 12 Jun 2007 17:19:09 +0200
Hi,
I'm trying to build a universal version of gtk2 on OS X, and currently
I'm stuck trying to build a universal gtk2 (2.13.3)
# Build and install i386 version
mkdir i368; cd i386
../configure $COMMON CC='gcc -arch i386 ' CXX='g++ -arch i386'
make; sudo make install
cd ..
# Build ppc, and lipo libraries
mkdir ppc; cd pcc
../configure $COMMON CC='gcc -arch ppc ' CXX='g++ -arch ppc'
make
sudo lipo -create $PREFIX/lib/libglib-2.0.0.1300.3.dylib
glib/.libs/libglib-2.0.0.1300.3.dylib -o
$PREFIX/lib/libglib-2.0.0.1300.3.dylib
# sudo lipo -create $PREFIX/lib/libgmodule-2.0.0.1300.3.dylib
gmodule/.libs/libgmodule-2.0.0.1300.3.dylib -o
$PREFIX/lib/libgmodule-2.0.0.1300.3.dylib
sudo lipo -create $PREFIX/lib/libgobject-2.0.0.1300.3.dylib
gobject/.libs/libgobject-2.0.0.1300.3.dylib -o
$PREFIX/lib/libgobject-2.0.0.1300.3.dylib
sudo lipo -create $PREFIX/lib/libgthread-2.0.0.1300.3.dylib
gthread/.libs/libgthread-2.0.0.1300.3.dylib -o
$PREFIX/lib/libgthread-2.0.0.1300.3.dylib
cd ..
# Fix glibconfig.h
GLIBCONF=$PREFIX/lib/glib-2.0/include/glibconfig.h
echo '#ifdef __i386__' > glibconf2.h
cat i386/glibconfig.h >> glibconf2.h
echo '#else' >> glibconf2.h
echo '#ifdef __ppc__' >> glibconf2.h
cat ppc/glibconfig.h >> glibconf2.h
echo '#else' >> glibconf2.h
echo '#error "Unsupported architecture!"' >> glibconf2.h
echo '#endif' >> glibconf2.h
echo '#endif' >> glibconf2.h
sudo mv glibconf2.h $GLIBCONF
But while it configures and install correctly, atk fails on configure with:
configure:20284: checking for GLIB - version >= 2.5.7
configure:20408: gcc -arch i386 -o conftest -g -O2 -Wall
-I/usr/local/gtk2/include/glib-2.0
-I/usr/local/gtk2/lib/glib-2.0/include conftest.c
-L/usr/local/gtk2/lib -lglib-2.0 -lintl -liconv >&5
In file included from /usr/local/gtk2/include/glib-2.0/glib/galloca.h:30,
from /usr/local/gtk2/include/glib-2.0/glib.h:30,
from conftest.c:23:
/usr/local/gtk2/include/glib-2.0/glib/gtypes.h:41: error: syntax error
before 'typedef'
In file included from /usr/local/gtk2/include/glib-2.0/glib/galloca.h:30,
from /usr/local/gtk2/include/glib-2.0/glib.h:30,
from conftest.c:23:
/usr/local/gtk2/include/glib-2.0/glib/gtypes.h:392:2: error: #error
unknown ENDIAN type
In file included from /usr/local/gtk2/include/glib-2.0/glib.h:31,
from conftest.c:23:
which I presume has something to do with glibconfig.c failing to load.
Does anyone have any ideas?
Thanks,
Hadley
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]