I have a project that requires Xapian for a 32 bit arch, but Mac defaults to 64 bit. How can I configure Xapian core and Xapian python bindings to build 32 bit?
On 26 Mar 2011, at 05:36, Ira Ray Jenkins wrote:> I have a project that requires Xapian for a 32 bit arch, but Mac > defaults to 64 bit. How can I configure Xapian core and Xapian python > bindings to build 32 bit?You can select a particular architecture by setting a variable on your configure line: $ ./configure CXX="g++ -m32" will build 32 bit. You can check the architecture created by running file(1) on the resultant library (although this is tucked away due to our use of libtool), or of course on the installed library once completed. This has now been documented in xapian-core's INSTALL file. Note that if building bindings as well, you'll need to do the same thing there; the architectures must match. J -- James Aylett talktorex.co.uk - xapian.org - devfort.com - spacelog.org
James Aylett
2011-Apr-30 20:32 UTC
[Xapian-discuss] [Xapian-devel] Building Xapian on Mac OSX 10.6.x
Please keep things on-list if possible, so that more people are available to help. On 30 Apr 2011, at 01:03, Ira Ray Jenkins wrote:> I have yet to successfully build xapian and the python bindings > on my mac OSx 10.6; however, in the process of trying to track down > the problem I came across a website that suggested I actually see what > arch everything is being built for... > > Looking at my python installation: > file `which python` > /Library/Frameworks/Python.framework/Versions/2.7/bin/python: Mach-O > universal binary with 2 architectures > /Library/Frameworks/Python.framework/Versions/2.7/bin/python (for > architecture i386): Mach-O executable i386 > /Library/Frameworks/Python.framework/Versions/2.7/bin/python (for > architecture x86_64): Mach-O 64-bit executable x86_64 > > > Then looking at _xapian.so: > file /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xapian/_xapian.so > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xapian/_xapian.so: > Mach-O 64-bit bundle x86_64 > > This seems interesting in that which I configured both xapian core and > xapian bindings, I used: > ./configure CXX="g++ -m32" > > Am I missing an option, because it looks to be disregarding it and > coming out as 64 bit.I think there's a -arch which will do the job better; I think someone else on list (possibly Richard) can remember this more reliably than I seem to be able to :-( J -- James Aylett talktorex.co.uk - xapian.org - devfort.com - spacelog.org