Re: Instructions for building universal apsw/sqlite

Allen Hancock <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
a couple of extra notes for the more green at this (hi)

and I am bracketing [  ]  anything that needs to be all on one line,  
as email tends to throw in line breaks


On Sep 4, 2007, at 7:51 AM, Sean Burke wrote:

> 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, with python 2.5.1, it is line 66
[  LDFLAGS=   -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 somewhere on your  
> computer:

   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  (just run this in  
> the terminal while in the sqlite directory:)
>

[  env CC="gcc -fPIC" CFLAGS="-DHAVE_DLOPEN" ./configure --enable- 
threadsafe --disable-tcl    ]

> 5) Add the following line to your Makefile AFTER the variable TCC  
> is defined:  (putting it just after line 29 is good)

[    TCC += -arch ppc -arch i386 -isysroot /Developer/SDKs/ 
MacOSX10.4u.sdk    ]

> 6) Build sqlite3 and copy library to source root: (fixed a typo here)

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) now get into the apsw directory

cd ..

> 8) 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

Thanks a million Sean!

that did the trick!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.