[Pythonmac-SIG] with libraries compiled with intel compilers, intel libguide.dylib not included

Dan White dan at chalkie.org.uk
Thu Jun 15 09:28:10 CEST 2006


On 14 Jun 2006, at 18:26, Bob Ippolito wrote:

>
> On Jun 14, 2006, at 8:01 AM, Dan White wrote:
>
>> Hi Python Mac folks,
>>
>>   I am using intel compilers to make VTK dylibs,
>> then py2app 0.2 maint  svn version to make a .app bundle
>>
>> When I run the .app that i am making it complains about not being
>> able to find one of the intel compiler .dylib s
>> libguide.dylib
>> which is found at
>> /opt/intel/cc/9.1.024/lib/libguide.dylib
>>
>> how do I get py2app to include this dylib correctly so the vtk libs
>> can see it as they do when I run my app from the command line?
>
> Could you please paste the actual error messages? Also, do you have  
> any DYLD_* environment variables set?

here you go Bob,

from the error message python/BioImageXD.app pops up on failed launch:

An unexpected error has occurred during execution of the main script

ImportError: Failure linking new module: /Users/dan/Desktop/ 
bioimagexdsvn/trunk/dist/BioImageXD.app/Contents/Resources/Python/lib- 
dynload/vtk/libvtkCommonPython.so: Library not loaded: libguide.dylib
   Referenced from: /Users/dan/Desktop/bioimagexdsvn/trunk/dist/ 
BioImageXD.app/Contents/MacOS/../Frameworks/libvtkCommonPythonD.dylib. 
5.1
   Reason: image not found

See the Console for a detailed traceback.

and from the console

2006-06-15 10:18:39.707 BioImageXD[294] BioImageXD Error
2006-06-15 10:18:39.707 BioImageXD[294] An unexpected error has  
occurred during execution of the main script

ImportError: Failure linking new module: /Users/dan/Desktop/ 
bioimagexdsvn/trunk/dist/BioImageXD.app/Contents/Resources/Python/lib- 
dynload/vtk/libvtkCommonPython.so: Library not loaded: libguide.dylib
   Referenced from: /Users/dan/Desktop/bioimagexdsvn/trunk/dist/ 
BioImageXD.app/Contents/MacOS/../Frameworks/libvtkCommonPythonD.dylib. 
5.1
   Reason: image not found

See the Console for a detailed traceback.
2006-06-15 10:18:39.836 BioImageXD[294] *** -[NSBundle load]: Error  
loading code /Users/dan/Library/InputManagers/Smart Crash Reports/ 
Smart Crash Reports.bundle/Contents/MacOS/Smart Crash Reports for  
bundle /Users/dan/Library/InputManagers/Smart Crash Reports/Smart  
Crash Reports.bundle, error code 2 (link edit error code 4, error  
number 0 ())
2006-06-15 10:18:52.656 BioImageXD[294] CFLog (21): dyld returns 2  
when trying to load /Users/dan/Library/Contextual Menu Items/ 
ToastIt.plugin/Contents/MacOS/ToastIt
2006-06-15 10:18:52.657 BioImageXD[294] CFLog (22): Cannot find  
function pointer pluginFactory for factory 053918F4-2869-11D7- 
A671-000A27E2DB90 in CFBundle/CFPlugIn 0x3b72f0 </Users/dan/Library/ 
Contextual Menu Items/ToastIt.plugin> (bundle, not loaded)
2006-06-15 10:19:46.868 Console[299] *** -[NSBundle load]: Error  
loading code /Users/dan/Library/InputManagers/Smart Crash Reports/ 
Smart Crash Reports.bundle/Contents/MacOS/Smart Crash Reports for  
bundle /Users/dan/Library/InputManagers/Smart Crash Reports/Smart  
Crash Reports.bundle, error code 2 (link edit error code 0, error  
number 0 ())

This is a new computer, and I haven't set many env variables yet

white:~ dan$ echo $DYLD_*
Desktop Documents Downloads Incomplete Library Movies Music Network  
Trash Folder Pictures Public Shared Sites TheVolumeSettingsFolder mbox
white:~ dan$

and my .bashrc has to be manually called, since its supposed to br  
named .profile right?
anyway my .bashrc  contains only

source /opt/intel/cc/9.1.024/bin/iccvars.sh
export PATH=$PATH:/usr/local/bin:/Library/Frameworks/Python.framework/ 
Versions/2.4/bin/

ahh haaa, but iccvars.sh contains this:

#! /bin/sh

if [ -z "${PATH}" ]
then
     PATH="/opt/intel/cc/9.1.024/bin"; export PATH
else
     PATH="/opt/intel/cc/9.1.024/bin:${PATH}"; export PATH
fi

if [ -z "${LD_LIBRARY_PATH}" ]
then
     LD_LIBRARY_PATH="/opt/intel/cc/9.1.024/lib"; export LD_LIBRARY_PATH
else
     LD_LIBRARY_PATH="/opt/intel/cc/9.1.024/lib:${LD_LIBRARY_PATH}";  
export LD_LIBRARY_PATH
fi

# DYLD_LIBRARY_PATH is used on MAC OS
if [ -z "${DYLD_LIBRARY_PATH}" ]
then
     DYLD_LIBRARY_PATH="/opt/intel/cc/9.1.024/lib"; export  
DYLD_LIBRARY_PATH
else
     DYLD_LIBRARY_PATH="/opt/intel/cc/9.1.024/lib:$ 
{DYLD_LIBRARY_PATH}"; export DYLD_LIBRARY_PATH
fi

if [ -z "${MANPATH}" ]
then
     MANPATH="/opt/intel/cc/9.1.024/man":$(manpath); export MANPATH
else
     MANPATH="/opt/intel/cc/9.1.024/man:${MANPATH}"; export MANPATH
fi


if [ -z "${INTEL_LICENSE_FILE}" ]
then
	INTEL_LICENSE_FILE="/opt/intel/cc/9.1.024/licenses:/opt/intel/ 
licenses:${HOME}/intel/licenses:/Users/Shared/Library/Application  
Support/Intel/licenses"; export INTEL_LICENSE_FILE
else
	INTEL_LICENSE_FILE="${INTEL_LICENSE_FILE}:/opt/intel/cc/9.1.024/ 
licenses:/opt/intel/licenses:${HOME}/intel/licenses:/Users/Shared/ 
Library/Application Support/Intel/licenses"; export INTEL_LICENSE_FILE
fi


So yes there are some DYLD_LIBRARY_PATH suff set.

Maybe therein lies the problem...?
Python probably doesn't know about that stuff?

Dan




Dr. Daniel James White BSc. (Hons.) PhD
Bioimaging Coordinator
Nanoscience Centre and Department of Biological and Environmental  
Sciences
Division of Molecular Recognition
Ambiotica C242
PO Box 35
University of Jyväskylä
Jyväskylä
FIN 40014
Finland

+358 14 260 4183 (work)
+358 468102840 (mobile)
http://www.bioimagexd.org
http://www.chalkie.org.uk
dan at chalkie.org.uk
white at cc.jyu.fi




More information about the Pythonmac-SIG mailing list