Sean Burke
2007-09-04 12:51:06 UTC
Ok,
I spent a couple hours mashing this through, so here is an update to the
things I had to do to get a static universal apsw build.
1) Edit your python makefile:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Makefile
Add the following to the LDFLAGS field:
-Wl,-F.,-search_paths_first
The whole line should look like this:
-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
-Wl,-F.,-search_paths_first
2) Download sqlite 3.4.1 into your apsw folder:
cd apsw-3.3.13-r1
wget http://www.sqlite.org/sqlite-3.4.1.tar.gz
3) Unzip, move to "sqlite3" directory:
tar zxvf sqlite-3.4.1.tar.gz
mv sqlite-3.4.1 sqlite3
4) Configure sqlite a la Roger's prescription:
env CC="gcc -fPIC" CFLAGS="-DHAVE_DLOPEN" ./configure
--enable-threadsafe --disable-tcl
5) Add the following line to you makefile AFTER the variable TCC is defined:
TCC += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
6) Build sqlite3 and copy library to source root:
make && cp .libs/*.a && ranlib *.a
You will get the following errors - this is OK:
ranlib: for architecture: ppc file: libsqlite3.a(loadext.o) has no symbols
ranlib: for architecture: ppc file: libsqlite3.a(os_win.o) has no symbols
ranlib: for architecture: ppc file: libsqlite3.a(os_os2.o) has no symbols
ranlib: for architecture: i386 file: libsqlite3.a(loadext.o) has no symbols
ranlib: for architecture: i386 file: libsqlite3.a(os_win.o) has no symbols
ranlib: for architecture: i386 file: libsqlite3.a(os_os2.o) has no symbols
If you get 3 errors instead of six, your build is not universal.
7) Build and install apsw:
python setup.py install
(Again, if you are going to get errors, it will be at this step or the
previous one.)
Hope this helps. Email with questions, comments.
Sean
I spent a couple hours mashing this through, so here is an update to the
things I had to do to get a static universal apsw build.
1) Edit your python makefile:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Makefile
Add the following to the LDFLAGS field:
-Wl,-F.,-search_paths_first
The whole line should look like this:
-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
-Wl,-F.,-search_paths_first
2) Download sqlite 3.4.1 into your apsw folder:
cd apsw-3.3.13-r1
wget http://www.sqlite.org/sqlite-3.4.1.tar.gz
3) Unzip, move to "sqlite3" directory:
tar zxvf sqlite-3.4.1.tar.gz
mv sqlite-3.4.1 sqlite3
4) Configure sqlite a la Roger's prescription:
env CC="gcc -fPIC" CFLAGS="-DHAVE_DLOPEN" ./configure
--enable-threadsafe --disable-tcl
5) Add the following line to you makefile AFTER the variable TCC is defined:
TCC += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
6) Build sqlite3 and copy library to source root:
make && cp .libs/*.a && ranlib *.a
You will get the following errors - this is OK:
ranlib: for architecture: ppc file: libsqlite3.a(loadext.o) has no symbols
ranlib: for architecture: ppc file: libsqlite3.a(os_win.o) has no symbols
ranlib: for architecture: ppc file: libsqlite3.a(os_os2.o) has no symbols
ranlib: for architecture: i386 file: libsqlite3.a(loadext.o) has no symbols
ranlib: for architecture: i386 file: libsqlite3.a(os_win.o) has no symbols
ranlib: for architecture: i386 file: libsqlite3.a(os_os2.o) has no symbols
If you get 3 errors instead of six, your build is not universal.
7) Build and install apsw:
python setup.py install
(Again, if you are going to get errors, it will be at this step or the
previous one.)
Hope this helps. Email with questions, comments.
Sean
--
Sean Patrick Burke
Imaging Analysis Specialist
Albert Einstein College of Medicine
Yeshiva University
Sean Patrick Burke
Imaging Analysis Specialist
Albert Einstein College of Medicine
Yeshiva University