<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">That did it!<div><br class="webkit-block-placeholder"></div><div>Now I've copied the Sword.py module and _Sword.so into a working directory and am able to use the command-line python to manipulate it.</div><div><br class="webkit-block-placeholder"></div><div>My next question is, how is this going to work in a self-contained project? I'm guessing it's finding the sword library at /usr/local/sword/lib and this is not portable to other machines, right? If I drop the lucene and sword .dylibs into the same working directory, will that suffice for finding the library at runtime? Xcode should put that into my app package if I include it as a dependency, right?</div><div><br class="webkit-block-placeholder"></div><div>Remember, I'm fairly new to this and having trouble finding good tutorials or online documentation on what I'm trying to do. Take it easy on me, okay? :)<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><br class="Apple-interchange-newline">Thanks!</div><div><br></div><div>Jon Brisbin</div><div><a href="http://jbrisbin.com">http://jbrisbin.com</a></div><div><br></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On Dec 18, 2007, at 2:42 PM, Ben Morgan wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,</div> <div>&nbsp;</div> <div>Try make pythonswig in the package directory before doing make python_make. This will generate that file.<br><br>-- <br>God Bless,<br>Ben<br>------------------------------------------------------------------------------------------- <br>The Lord is not slow to fulfill his promise as some count slowness,<br>but is patient toward you, not wishing that any should perish,<br>but that all should reach repentance.<br>2 Peter 3:9 (ESV) </div> <div><br>&nbsp;</div> <div><span class="gmail_quote">On 12/19/07, <b class="gmail_sendername">Jon Brisbin</b> &lt;<a href="mailto:jon@jbrisbin.com">jon@jbrisbin.com</a>&gt; wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I've got 10.5.1 of Leopard (with Developer tools, obviously :) and I<br>can compile clucene and sword just fine. I put it in /usr/local/sword <br><br>Then I went into the bindings/swig/ directory, read the README,<br>followed the steps therein and got a few errors:<br><br>+-( ~/src/sword-1.5.10/bindings/swig/package ):&gt; ./autogen.sh<br>*** copying swig files <br>*** Recreating aclocal.m4<br>aclocal<br>zlib.m4:4: warning: underquoted definition of AC_FIND_ZLIB<br>zlib.m4:4:&nbsp;&nbsp; run info '(automake)Extending aclocal'<br>zlib.m4:4:&nbsp;&nbsp; or see <a href="http://sources.redhat.com/automake/automake.html#Extending-aclocal"> http://sources.redhat.com/automake/automake.html#Extending-aclocal</a><br>*** Recreating configure<br>*** Recreating the <a href="http://Makefile.in">Makefile.in</a> files<br><br>So I ran configure, which seemed to be mostly okay with the setup: <br><br>+-( ~/src/sword-1.5.10/bindings/swig/package ):&gt; ./configure<br>checking for a BSD-compatible install... /usr/bin/install -c<br>checking whether build environment is sane... yes<br>checking for a thread-safe mkdir -p... ./install-sh -c -d <br>checking for gawk... no<br>checking for mawk... no<br>checking for nawk... no<br>checking for awk... awk<br>checking whether make sets $(MAKE)... yes<br>checking for gcc... gcc<br>checking for C compiler default output file name... a.out<br>checking whether the C compiler works... yes<br>checking whether we are cross compiling... no<br>checking for suffix of executables...<br>checking for suffix of object files... o<br>checking whether we are using the GNU C compiler... yes <br>checking whether gcc accepts -g... yes<br>checking for gcc option to accept ISO C89... none needed<br>checking for style of include used by make... GNU<br>checking dependency style of gcc... gcc3<br>checking for g++... g++ <br>checking whether we are using the GNU C++ compiler... yes<br>checking whether g++ accepts -g... yes<br>checking dependency style of g++... gcc3<br>checking for a BSD-compatible install... /usr/bin/install -c<br>checking build system type... i686-apple-darwin9.1.0<br>checking host system type... i686-apple-darwin9.1.0<br>checking for a sed that does not truncate output... /usr/bin/sed<br>checking for grep that handles long lines and -e... /usr/bin/grep<br>checking for egrep... /usr/bin/grep -E <br>checking for ld used by gcc... /usr/libexec/gcc/i686-apple-<br>darwin9/4.0.1/ld<br>checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld)<br>is GNU ld... no<br>checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to <br>reload object files... -r<br>checking for BSD-compatible nm... /usr/bin/nm -p<br>checking whether ln -s works... yes<br>checking how to recognise dependent libraries... pass_all<br>checking how to run the C preprocessor... gcc -E <br>checking for ANSI C header files... yes<br>checking for sys/types.h... yes<br>checking for sys/stat.h... yes<br>checking for stdlib.h... yes<br>checking for string.h... yes<br>checking for memory.h... yes<br>checking for strings.h... yes<br>checking for inttypes.h... yes<br>checking for stdint.h... yes<br>checking for unistd.h... yes<br>checking dlfcn.h usability... yes<br>checking dlfcn.h presence... yes<br>checking for dlfcn.h... yes<br> checking how to run the C++ preprocessor... g++ -E<br>checking for g77... no<br>checking for xlf... no<br>checking for f77... no<br>checking for frt... no<br>checking for pgf77... no<br>checking for cf77... no<br>checking for fort77... no <br>checking for fl32... no<br>checking for af77... no<br>checking for xlf90... no<br>checking for f90... no<br>checking for pgf90... no<br>checking for pghpf... no<br>checking for epcf90... no<br>checking for gfortran... no <br>checking for g95... no<br>checking for xlf95... no<br>checking for f95... no<br>checking for fort... no<br>checking for ifort... no<br>checking for ifc... no<br>checking for efc... no<br>checking for pgf95... no<br>checking for lf95... no <br>checking for ftn... no<br>checking whether we are using the GNU Fortran 77 compiler... no<br>checking whether&nbsp;&nbsp;accepts -g... no<br>checking the maximum length of command line arguments... 196608<br>checking command to parse /usr/bin/nm -p output from gcc object... rm: <br>conftest.dSYM: is a directory<br>rm: conftest.dSYM: is a directory<br>rm: conftest.dSYM: is a directory<br>rm: conftest.dSYM: is a directory<br>ok<br>checking for objdir... .libs<br>checking for ar... ar<br>checking for ranlib... ranlib <br>checking for strip... strip<br>rm: conftest.dSYM: is a directory<br>rm: conftest.dSYM: is a directory<br>checking if gcc supports -fno-rtti -fno-exceptions... rm:<br>conftest.dSYM: is a directory<br>no<br>checking for gcc option to produce PIC... -fno-common <br>checking if gcc PIC flag -fno-common works... rm: conftest.dSYM: is a<br>directory<br>yes<br>checking if gcc static flag -static works... rm: conftest.dSYM: is a<br>directory<br>no<br>checking if gcc supports -c -o file.o.. . rm: conftest.dSYM: is a<br>directory<br>yes<br>checking whether the gcc linker (/usr/libexec/gcc/i686-apple-<br>darwin9/4.0.1/ld) supports shared libraries... yes<br>checking dynamic linker characteristics... darwin9.1.0 dyld<br>checking how to hardcode library paths into programs... immediate<br>checking whether stripping libraries is possible... yes<br>checking if libtool supports shared libraries... yes<br>checking whether to build shared libraries... yes <br>checking whether to build static libraries... yes<br>configure: creating libtool<br>appending configuration tag "CXX" to libtool<br>rm: conftest.dSYM: is a directory<br>rm: conftest.dSYM: is a directory<br>checking for ld used by g++... /usr/libexec/gcc/i686-apple- <br>darwin9/4.0.1/ld<br>checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld)<br>is GNU ld... no<br>checking whether the g++ linker (/usr/libexec/gcc/i686-apple-<br>darwin9/4.0.1/ld) supports shared libraries... yes <br>checking for g++ option to produce PIC... -fno-common<br>checking if g++ PIC flag -fno-common works... rm: conftest.dSYM: is a<br>directory<br>yes<br>checking if g++ static flag -static works... rm: conftest.dSYM: is a <br>directory<br>no<br>checking if g++ supports -c -o file.o... rm: conftest.dSYM: is a<br>directory<br>yes<br>checking whether the g++ linker (/usr/libexec/gcc/i686-apple-<br>darwin9/4.0.1/ld) supports shared libraries... yes <br>checking dynamic linker characteristics... darwin9.1.0 dyld<br>checking how to hardcode library paths into programs... immediate<br>appending configuration tag "F77" to libtool<br>checking for swig... /usr/bin/swig <br>checking for extra includes... no<br>checking for extra libs... no<br>checking for libz... -lz<br>checking for Sword library files... /usr/local/sword/lib<br>checking for Sword include files... /usr/local/sword/include/sword <br>checking if you have Sword 1.5.7 or later... rm: conftest.dSYM: is a<br>directory<br>1.5.10<br>checking whether to enable maintainer-specific portions of<br>Makefiles... no<br>checking for perl... /usr/bin/perl<br>checking for Perl5 header files... /System/Library/Perl/5.8.8/darwin- <br>thread-multi-2level/CORE<br>checking for Perl5 library... perl.dylib<br>checking for NONE/bin/python... no<br>checking for python... /usr/bin/python<br>checking for Python prefix... /System/Library/Frameworks/<br>Python.framework /Versions/2.5<br>checking for Python exec-prefix... /System/Library/Frameworks/<br>Python.framework/Versions/2.5<br>checking for Python version... python2.5<br>checking for Python header files... -I/System/Library/Frameworks/ <br>Python.framework/Versions/2.5/include/python2.5 -I/System/Library/<br>Frameworks/Python.framework/Versions/2.5/lib/python2.5/config<br>checking for Python library... /System/Library/Frameworks/<br>Python.framework/Versions/2.5/lib/python2.5/config <br>checking for php... /usr/bin/php<br>checking for PHP4 header files... not found<br>checking for Tcl configuration... found /usr/lib/tclConfig.sh<br>checking for Tcl header files... -I/usr/include<br>checking for Tcl library... -framework Tcl <br>configure: creating ./config.status<br>config.status: creating Makefile<br>config.status: executing depfiles commands<br><br><br>Then I ran "make python_make" and got this:<br><br>+-( ~/src/sword-1.5.10/bindings/swig/package ):&gt; make python_make <br>mkdir -p python<br>echo "writing python/setup.py"<br>writing python/setup.py<br>cd python &amp;&amp; /usr/bin/python setup.py build_ext -I/usr/local/sword/<br>include/sword -L/usr/local/sword/lib -lsword<br> running build_ext<br>building '_Sword' extension<br>creating build<br>creating build/temp.macosx-10.5-i386-2.5<br>gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-<br>madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes - <br>DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -<br>DSWIG=1 -I/usr/local/sword/include/sword -I/System/Library/Frameworks/<br>Python.framework/Versions/2.5/include/python2.5 -c Sword.cxx -o build/ <br>temp.macosx-10.5-i386-2.5/Sword.o<br>i686-apple-darwin9-gcc-4.0.1: Sword.cxx: No such file or directory<br>i686-apple-darwin9-gcc-4.0.1: no input files<br>powerpc-apple-darwin9-gcc-4.0.1: Sword.cxx: No such file or directory <br>powerpc-apple-darwin9-gcc-4.0.1: no input files<br>lipo: can't figure out the architecture type of: /var/folders/D9/<br>D9dZokG-EY0DTvB37eDKUk+++TI/-Tmp-//ccqeSETG.out<br>error: command 'gcc' failed with exit status 1 <br>make: *** [python_make] Error 1<br><br><br>Any ideas? It's really not there:<br><br>+-( ~/src/sword-1.5.10/bindings/swig/package/python ):&gt; find .<br>.<br>./build<br>./build/temp.macosx-10.5-i386-2.5<br>./setup.py <br><br><br>Thanks!<br><br>Jon Brisbin<br><a href="http://jbrisbin.com">http://jbrisbin.com</a><br><br><br><br><br>_______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org"> sword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br> </blockquote></div><br><br clear="all"> _______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page</blockquote></div><br></div></body></html>