[Pythonmac-SIG] install_name changing
Boyd Waters
bwaters at nrao.edu
Mon Aug 28 00:28:22 CEST 2006
Dan:
I saw your recent post on the Python-Mac SIG regarding the difficulty
that you are having using libguide.dylib in a Python application,
since you've built Python with the Intel compiler.
I think that you're on the right track with the install_name_tool --
this is what I had to do to get the Intel binaries working:
> # cd /opt/intel/cc/9.1.029/lib
>
> # for i in *.dylib
> > do
> > install_name_tool -id $(pwd)/$i $i
> > done
Then I had to change the references to libirc.dylib in libimf and
libsvml
> for i in libimf.dylib libsvml.dylib
> > do
> > install_name_tool -change libirc.dylib $(pwd)/libirc.dylib $i
> > done
When I was done, this is what it looks like:
> $ otool -L /opt/intel/cc/9.1.029/lib/*.dylib
> /opt/intel/cc/9.1.029/lib/libguide.dylib:
> /opt/intel/cc/9.1.029/lib/libguide.dylib (compatibility
> version 4.0.0, current version 4.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 88.1.3)
> /opt/intel/cc/9.1.029/lib/libguide_stats.dylib:
> /opt/intel/cc/9.1.029/lib/libguide_stats.dylib
> (compatibility version 4.0.0, current version 4.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 88.1.3)
> /opt/intel/cc/9.1.029/lib/libimf.dylib:
> /opt/intel/cc/9.1.029/lib/libimf.dylib (compatibility
> version 0.0.0, current version 0.0.0)
> /opt/intel/cc/9.1.029/lib/libirc.dylib (compatibility
> version 0.0.0, current version 0.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 88.1.3)
> /opt/intel/cc/9.1.029/lib/libirc.dylib:
> /opt/intel/cc/9.1.029/lib/libirc.dylib (compatibility
> version 0.0.0, current version 0.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 88.1.3)
> /opt/intel/cc/9.1.029/lib/libsvml.dylib:
> /opt/intel/cc/9.1.029/lib/libsvml.dylib (compatibility
> version 0.0.0, current version 0.0.0)
> /opt/intel/cc/9.1.029/lib/libirc.dylib (compatibility
> version 0.0.0, current version 0.0.0)
>
Every dynamic library is referenced using the full path.
In my distribution, I have to re-distribute these libraries, and put
them in /opt/intel/cc/9.1.029/lib on the client.
This is not the best option, but it works for the numerous open-
source packages that we use for our image-processing system.
I have a question for you, if you don't mind: I cannot get the Python
package to build with the Intel compiler. It does not find the
_Py_Main symbol when linking the top-level "python.exe". I would be
very happy to get pointed in the right direction regarding compiler
and linker flags for building Python 2.4.3; if we need to use Python
2.5 then we can do that too.
Thanks and good luck!
- boyd
Boyd Waters
Scientific Programmer
National Radio Astronomy Observatory
Socorro, New Mexico
http://www.aoc.nrao.edu/
More information about the Pythonmac-SIG
mailing list