Hey all,

I'm a long-time python wrangler, but I've recently been doing more  
development for deployment on the Mac. I've been trying to get py2app  
to build a wrapper around a small Python server that uses PyLucene.  
Unfortunately, I've hit a few snags.

When I build, I supply the following environment parameters to the  
location where I have the PyLucene.py, _PyLucene.so and required  
*dylib files.

export DYLD_LIBRARY_PATH=~/Projects/dtsearch/lib
export PYTHONPATH=~/Projects/dtsearch/lib;

setup.py py2app seems to run without a problem and correctly tracks  
down the dependencies.

However, when a I run a new terminal, without those environment  
variables, I get this spew:

[msolomon]beast:~/Projects/dtsearch> dist/dtserv.app/Contents/MacOS/ 
dtserv
Traceback (most recent call last):
   File "/Users/msolomon/Projects/dtsearch/dist/dtserv.app/Contents/ 
Resources/__boot__.py", line 137, in ?
     _run('dtserv.py')
   File "/Users/msolomon/Projects/dtsearch/dist/dtserv.app/Contents/ 
Resources/__boot__.py", line 134, in _run
     execfile(path, globals(), globals())
   File "/Users/msolomon/Projects/dtsearch/dist/dtserv.app/Contents/ 
Resources/dtserv.py", line 17, in ?
     import dtsearch
   File "dtsearch.pyc", line 10, in ?
   File "search.pyc", line 7, in ?
   File "PyLucene.pyc", line 33, in ?
ImportError: Failure linking new module: /Users/msolomon/Projects/ 
dtsearch/dist/dtserv.app/Contents/Resources/lib/python2.4/lib-dynload/ 
_PyLucene.so: Library not loaded: /opt/local/lib/gcc41/libgcj.7.dylib
   Referenced from: /Users/msolomon/Projects/dtsearch/dist/dtserv.app/ 
Contents/Resources/lib/python2.4/lib-dynload/_PyLucene.so
   Reason: image not found
2007-01-01 20:07:06.127 dtserv[8407] dtserv Error
2007-01-01 20:07:06.130 dtserv[8407] dtserv Error
An unexpected error has occurred during execution of the main script

ImportError: Failure linking new module: /Users/msolomon/Projects/ 
dtsearch/dist/dtserv.app/Contents/Resources/lib/python2.4/lib-dynload/ 
_PyLucene.so: Library not loaded: /opt/local/lib/gcc41/libgcj.7.dylib
   Referenced from: /Users/msolomon/Projects/dtsearch/dist/dtserv.app/ 
Contents/Resources/lib/python2.4/lib-dynload/_PyLucene.so
   Reason: image not found


Now, the _PyLucene.so want to link against these libs, none of which  
exists at these paths (nor have they ever, on my machine).

   /opt/local/lib/gcc41/libgcj.7.dylib (compatibility version 8.0.0,  
current version 8.0.0)
   /opt/local/lib/gcc41/libgcc_s.1.dylib (compatibility version  
1.0.0, current version 1.0.0)
   /opt/local/lib/gcc41/libstdc++.6.dylib (compatibility version  
7.0.0, current version 7.8.0)

So, normally, I have to export they correct DYLD_LIBRARY_PATH, so I  
added those variables back in.  Now I get this:

[msolomon]beast:~/Projects/dtsearch> dist/dtserv.app/Contents/MacOS/ 
dtserv
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap


I've spent several hours hunting through the bootstrap and a few  
other bits, but I didn't have a good intuitive feel for where the  
problem is.

Is there something simple that I'm missing?

Any help would be appreciated.

Thanks,

-Mike

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to