[MacPorts] #17998: Linking to Python 2.5 framework is broken due to broken symlinks
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Linking to /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a fails, because the file is a broken symlink (as an aside, the file identifies as a dynamically linked shared library, not a static one; is that a naming problem?). This is a result of libpython2.5.a being a symlink to ../../../Python, thereby crossing a symlinked directory: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 points to /opt/local/lib/python2.5. Traversing this symlinked directory manually is no problem, but the symlinked file is broken. Comparing to the system installed variant, the symlinked directory is the other way around: {{{ ls -l /usr/lib/ lrwxr-xr-x 1 root wheel 75 9 Nov 2007 python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 }}} Manually fixing this now results in proper linking with libpython2.5 (I also added a libpython2.5.dylib in the config/ directory, which is simply a copy of libpython2.5.a). The directory structure now reads {{{ ls -l /opt/local/lib lrwxr-xr-x 1 root admin 66 14 Jan 18:03 python2.5 -> ../Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ ls -l /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config total 208 lrwxr-xr-x 1 root admin 15 14 Jan 18:02 libpython2.5.a -> ../../../Python lrwxr-xr-x 1 root admin 15 14 Jan 18:02 libpython2.5.dylib -> ../../../Python }}} This ticket originated from ticket [/ticket/17975 #17975] -- Ticket URL: <http://trac.macports.org/ticket/17998> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => mww@… Comment: Do you have the python_select port installed? Have you run: {{{ sudo python_select python25 }}} Also, are you really on macports 1.6? If so, you should run: {{{ sudo port selfupdate sudo port upgrade outdated }}} -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Comment(by evert.rol@…): Replying to [comment:1 macsforever2000@…]:
Do you have the python_select port installed? Have you run:
{{{ sudo python_select python25 }}}
Yes,I have indeed.
Also, are you really on macports 1.6? If so, you should run:
{{{ sudo port selfupdate sudo port upgrade outdated }}}
Yes, have just done so. Doesn't change, that is, the broken symlinks remain (cannot check compiling & linking against the 2.5 framework, since that's manually changed now on my machine). So the issue seems to remain, despite the upgrade. -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Comment(by mleinart@…): I had this same problem while trying to compile boost+python25 - quite annoying. Using the directory structure above fixes it. I'm not sure about the .a vs .dylib - it feels like an error, but doesnt break anything for me. Note that there *is* a libpython2.5.dylib but it's only in /opt/local/lib/ and is created by a post-destroot action in the Portfile.. Anyway, I'm attaching a patch to fix the line in the Portfile that's conflicting with the relative symlink created by Python's Mac/Makefile -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Comment(by mleinart@…): Looks like my patch has some bad side effects - other packages (py25-*, likely others) install in /opt/local/lib/python2.5/site-packages which is now not an absolute path. Ports seems to get confused when adding the files in there to file_map after activation and errors out with "Error: Target org.macports.activate returned: Not a directory" - this leaves the package installed and activated, but the files are stranded and not listed in 'port contents'. I'm guessing this is the reason that /opt/local/lib/python2.5 was moved to be the real directory and /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 the symlink. Unless someone wants to fix all of the ports installing in /opt/local/lib/python*/site-packages/, it looks like the symlink of libpython25.a in Mac/Makefile (in the Python2.5 source) needs to be patched to be absolute instead of relative. I haven't looked at the other lang/python* ports - do they all move this lib/python2.5 directory from where Python's Makefiles install and re- symlink? -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Comment(by raimue@…): Replying to [comment:8 mleinart@…]: You cannot install into `${prefix}/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5` as it is a symlink. While I did the framework transition, I decided to use the old location for site-packages and symlink that into the framework. Otherwise it would have required manual reinstallation of all py25-* ports. Moving everything into the framework did also cause problems, for example binaries being installed in the framework only and not available in PATH without manual fixing. -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Changes (by jmr@…): * cc: sanchom@… (removed) * cc: nox@… (added) -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------------------------+------------------------------- Reporter: evert.rol@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Keywords: python boost framework symlink | Port: python25 --------------------------------------------+------------------------------- Changes (by jmr@…): * owner: mww@… => jwa@… -- Ticket URL: <http://trac.macports.org/ticket/17998#comment:20> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------+-------------------------------------------- Reporter: evert.rol@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Resolution: | Keywords: python boost framework symlink Port: python25 | --------------------------+-------------------------------------------- Comment (by jwa@…): Is this still a problem? -- Ticket URL: <https://trac.macports.org/ticket/17998#comment:27> MacPorts <http://www.macports.org/> Ports system for OS X
#17998: Linking to Python 2.5 framework is broken due to broken symlinks --------------------------+------------------- Reporter: evert.rol@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Resolution: | Keywords: Port: python25 | --------------------------+------------------- Changes (by mf2k@…): * cc: macsforever2000@… (removed) * keywords: python boost framework symlink => Old description:
Linking to /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a fails, because the file is a broken symlink (as an aside, the file identifies as a dynamically linked shared library, not a static one; is that a naming problem?).
This is a result of libpython2.5.a being a symlink to ../../../Python, thereby crossing a symlinked directory: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 points to /opt/local/lib/python2.5. Traversing this symlinked directory manually is no problem, but the symlinked file is broken. Comparing to the system installed variant, the symlinked directory is the other way around:
{{{ ls -l /usr/lib/ lrwxr-xr-x 1 root wheel 75 9 Nov 2007 python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 }}}
Manually fixing this now results in proper linking with libpython2.5 (I also added a libpython2.5.dylib in the config/ directory, which is simply a copy of libpython2.5.a). The directory structure now reads
{{{ ls -l /opt/local/lib lrwxr-xr-x 1 root admin 66 14 Jan 18:03 python2.5 -> ../Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ ls -l /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config total 208 lrwxr-xr-x 1 root admin 15 14 Jan 18:02 libpython2.5.a -> ../../../Python lrwxr-xr-x 1 root admin 15 14 Jan 18:02 libpython2.5.dylib -> ../../../Python
}}}
This ticket originated from ticket [/ticket/17975 #17975]
New description: Linking to /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a fails, because the file is a broken symlink (as an aside, the file identifies as a dynamically linked shared library, not a static one; is that a naming problem?). This is a result of libpython2.5.a being a symlink to ../../../Python, thereby crossing a symlinked directory: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 points to /opt/local/lib/python2.5. Traversing this symlinked directory manually is no problem, but the symlinked file is broken. Comparing to the system installed variant, the symlinked directory is the other way around: {{{ ls -l /usr/lib/ lrwxr-xr-x 1 root wheel 75 9 Nov 2007 python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 }}} Manually fixing this now results in proper linking with libpython2.5 (I also added a libpython2.5.dylib in the config/ directory, which is simply a copy of libpython2.5.a). The directory structure now reads {{{ ls -l /opt/local/lib lrwxr-xr-x 1 root admin 66 14 Jan 18:03 python2.5 -> ../Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ ls -l /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config total 208 lrwxr-xr-x 1 root admin 15 14 Jan 18:02 libpython2.5.a -> ../../../Python lrwxr-xr-x 1 root admin 15 14 Jan 18:02 libpython2.5.dylib -> ../../../Python }}} This ticket originated from ticket #17975 -- -- Ticket URL: <https://trac.macports.org/ticket/17998#comment:28> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts