Hi Andi: Thanks for that advice! Well, I checked my Makefile, and I don't *think* I have conflicting uncommented sections, but I will take another look.
Hmm, well the gcc flag for x86_64 don't seem to be set in my make output. I will double check it. I hope you don't mind me pasting my make command output: macpro:pylucene-3.0.1-1 viallon$ vi Makefile macpro:pylucene-3.0.1-1 viallon$ make /usr/bin/python -m jcc.__main__ --shared --arch x86_64 --jar lucene-java-3.0.1/build/lucene-core-3.0.1.jar --jar lucene-java-3.0.1/build/contrib/snowball/lucene-snowball-3.0.1.jar --jar lucene-java-3.0.1/build/contrib/analyzers/common/lucene-analyzers-3.0.1.jar --jar lucene-java-3.0.1/build/contrib/regex/lucene-regex-3.0.1.jar --jar lucene-java-3.0.1/build/contrib/memory/lucene-memory-3.0.1.jar --jar lucene-java-3.0.1/build/contrib/highlighter/lucene-highlighter-3.0.1.jar --jar lucene-java-3.0.1/build/contrib/queries/lucene-queries-3.0.1.jar --jar build/jar/extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParser.QueryParserTokenManager --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.1 --module python/collections.py --files 2 --build Warning: renaming static method 'getCommitUserData' on class org.apache.lucene.index.IndexReader to 'getCommitUserData_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Long to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'getCurrentSegmentFileName' on class org.apache.lucene.index.SegmentInfos to 'getCurrentSegmentFileName_' since it is shadowed by non-static method of same name. Warning: renaming static method 'fileModified' on class org.apache.lucene.store.FSDirectory to 'fileModified_' since it is shadowed by non-static method of same name. Warning: renaming static method 'listAll' on class org.apache.lucene.store.FSDirectory to 'listAll_' since it is shadowed by non-static method of same name. Warning: renaming static method 'isInfinite' on class java.lang.Double to 'isInfinite_' since it is shadowed by non-static method of same name. Warning: renaming static method 'isNaN' on class java.lang.Double to 'isNaN_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Double to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Boolean to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Integer to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Character to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Byte to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'isInfinite' on class java.lang.Float to 'isInfinite_' since it is shadowed by non-static method of same name. Warning: renaming static method 'isNaN' on class java.lang.Float to 'isNaN_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Float to 'toString_' since it is shadowed by non-static method of same name. Warning: renaming static method 'toString' on class java.lang.Short to 'toString_' since it is shadowed by non-static method of same name. running build_ext building 'lucene._lucene' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -D_java_generics -DPYTHON=1 -D_jcc_shared=1 -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -Ibuild/_lucene -I/Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg/jcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c build/_lucene/__init__.cpp -o build/temp.macosx-10.5-i386-2.5/build/_lucene/__init__.o -fno-strict-aliasing -Wno-write-strings cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -D_java_generics -DPYTHON=1 -D_jcc_shared=1 -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -Ibuild/_lucene -I/Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg/jcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c build/_lucene/__wrap01__.cpp -o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap01__.o -fno-strict-aliasing -Wno-write-strings cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -D_java_generics -DPYTHON=1 -D_jcc_shared=1 -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -Ibuild/_lucene -I/Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg/jcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c build/_lucene/__wrap02__.cpp -o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap02__.o -fno-strict-aliasing -Wno-write-strings cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -D_java_generics -DPYTHON=1 -D_jcc_shared=1 -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -Ibuild/_lucene -I/Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg/jcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c build/_lucene/__wrap03__.cpp -o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap03__.o -fno-strict-aliasing -Wno-write-strings cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -D_java_generics -DPYTHON=1 -D_jcc_shared=1 -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -Ibuild/_lucene -I/Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg/jcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c build/_lucene/lucene.cpp -o build/temp.macosx-10.5-i386-2.5/build/_lucene/lucene.o -fno-strict-aliasing -Wno-write-strings cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ g++ -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5/build/_lucene/__init__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap01__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap02__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap03__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/functions.o build/temp.macosx-10.5-i386-2.5/build/_lucene/JArray.o build/temp.macosx-10.5-i386-2.5/build/_lucene/JObject.o build/temp.macosx-10.5-i386-2.5/build/_lucene/lucene.o build/temp.macosx-10.5-i386-2.5/build/_lucene/types.o -L/Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg -ljcc -o build/lib.macosx-10.5-i386-2.5/lucene/_lucene.so -framework JavaVM -Wl,-S -Wl,-rpath /Library/Python/2.5/site-packages/JCC-2.5.1-py2.5-macosx-10.5-i386.egg build of complete On Mon, May 3, 2010 at 11:37 AM, Andi Vajda <va...@apache.org> wrote: > > On Mon, 3 May 2010, Michael Manoochehri wrote: > > I have a question about building a 64 bit binary of _lucene.so on Darwin. >> >> I am using (from uname): >> Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; >> root:xnu-1228.15.4~1/RELEASE_I386 i386 >> >> In my Makefile, I have uncommented: >> Mac OS X 10.6 (64-bit Python 2.6, Java 1.6) >> PREFIX_PYTHON=/usr >> ANT=ant >> PYTHON=$(PREFIX_PYTHON)/bin/python >> JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64 >> NUM_FILES=2 >> >> But after building and installing, when I check the _lucene.so binary, it >> returns >> >>> file >>>>> >>>> >> /Library/Python/2.5/site-packages/lucene-3.0.1-py2.5-macosx-10.5-i386.egg/lucene/_lucene.so >> >> >> /Library/Python/2.5/site-packages/lucene-3.0.1-py2.5-macosx-10.5-i386.egg/lucene/_lucene.so: >> Mach-O universal binary with 2 architectures >> >> /Library/Python/2.5/site-packages/lucene-3.0.1-py2.5-macosx-10.5-i386.egg/lucene/_lucene.so >> (for architecture i386): Mach-O bundle i386 >> >> /Library/Python/2.5/site-packages/lucene-3.0.1-py2.5-macosx-10.5-i386.egg/lucene/_lucene.so >> (for architecture ppc7400): Mach-O bundle ppc >> >> Any suggestions for me to produce an x86_64 build (basically, I'm trying >> to >> use pylucene with 64bit apache2 + wsgi)? >> > > You're doing the right thing. The --arch x86_64 tells gcc to skip the > building of i386 and ppc binaries (and saves two thirds of compile time). > > You probably have another section of the PyLucene Makefile uncommented thus > overriding the one you actually want to run. > > When the build is going, verify that the jcc command output from 'make' > shows the --arch x86_64 parameter. > > Andi.. > -- Michael Manoochehri Masters of Information Management and Systems 2010 UC Berkeley School of Information I write for: programmableweb.com my blog: e.ntangled.net follow me: @nTangledMichael