[MacPorts] #21444: boost with +python26 links against wrong python on Snow Leopard
MacPorts
noreply at macports.org
Sun Oct 4 10:42:04 PDT 2009
#21444: boost with +python26 links against wrong python on Snow Leopard
---------------------------------+------------------------------------------
Reporter: stromnov@… | Owner: nox@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 1.8.0
Resolution: worksforme | Keywords:
Port: boost |
---------------------------------+------------------------------------------
Comment(by stromnov@…):
Probably, problem goes from hardcoded ld paths (man ld):
{{{
Search paths
ld maintains a list of directories to search for a library or framework
to use. The default library search path
is /usr/lib then /usr/local/lib. The -L option will add a new library
search path. The default framework
search path is /Library/Frameworks then /System/Library/Frameworks.
(Note: previously, /Network/Library/Frame-
works was at the end of the default path. If you need that
functionality, you need to explicitly add -F/Net-
work/Library/Frameworks). The -F option will a new framework search
path. The -Z option will remove the stan-
dard search paths. The -syslibroot option will prepend a prefix to all
search paths.
}}}
Let's check it:
{{{
stromnov at stromnov:~$ ls -la /usr/lib | grep python2.6
lrwxr-xr-x 1 root wheel 18 Oct 2 23:57 libpython.dylib ->
libpython2.6.dylib
lrwxr-xr-x 1 root wheel 68 Oct 2 23:57 libpython2.6.dylib ->
../../System/Library/Frameworks/Python.framework/Versions/2.6/Python
lrwxr-xr-x 1 root wheel 75 Oct 2 23:58 python2.6 ->
../../System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
stromnov at stromnov:~$ gcc -F/opt/local/Library/Frameworks `python2.6-config
--cflags` `python2.6-config --ldflags` test.c
stromnov at stromnov:~$ otool -L a.out
a.out:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 124.1.1)
/System/Library/Frameworks/Python.framework/Versions/2.6/Python
(compatibility version 2.6.0, current version 2.6.1)
stromnov at stromnov:~$ sudo mv /usr/lib/libpython2.6.dylib
/usr/lib/libpython2.6.dylib_sys
stromnov at stromnov:~$ sudo ln -s /opt/local/lib/libpython2.6.dylib
/usr/lib/libpython2.6.dylib
stromnov at stromnov:~$ ls -la /usr/lib | grep python2.6
lrwxr-xr-x 1 root wheel 18 Oct 2 23:57 libpython.dylib ->
libpython2.6.dylib
lrwxr-xr-x 1 root wheel 33 Oct 4 21:35 libpython2.6.dylib ->
/opt/local/lib/libpython2.6.dylib
lrwxr-xr-x 1 root wheel 68 Oct 2 23:57 libpython2.6.dylib_sys
-> ../../System/Library/Frameworks/Python.framework/Versions/2.6/Python
lrwxr-xr-x 1 root wheel 75 Oct 2 23:58 python2.6 ->
../../System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
stromnov at stromnov:~$ gcc -F/opt/local/Library/Frameworks `python2.6-config
--cflags` `python2.6-config --ldflags` test.c
stromnov at stromnov:~$ otool -L a.out
a.out:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 124.1.1)
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python
(compatibility version 2.6.0, current version 2.6.0)
stromnov at stromnov:~$
}}}
--
Ticket URL: <http://trac.macports.org/ticket/21444#comment:24>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list