[MacPorts] #44086: py-sip @4.16.1 installs files with wrong target architecture
#44086: py-sip @4.16.1 installs files with wrong target architecture -----------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: | Port: py-sip -----------------------------+-------------------------------- I installed MacPorts from source in `/opt/macports-i386` following the instructions [https://guide.macports.org/#installing.macports.source.multiple in the guide]. I changed the CPU architecture target to `build_arch i386` in `macports.conf`, then I installed `py27-sip`. The file `sip.so` installed by `py27-sip` appears to have `x86_64` as target architecture: {{{ $ file /opt/macports-i386/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/sip.so /opt/macports-i386/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/sip.so: Mach-O 64-bit x86_64 bundle }}} Importing `sip` in Python results in this error: {{{ $ /opt/macports-i386/bin/python2.7 Python 2.7.7 (default, Jun 18 2014, 14:59:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import sip Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: dlopen(/opt/macports-i386/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/sip.so, 2): no suitable image found. Did find: /opt/macports-i386/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/sip.so: mach-o, but wrong architecture ^D }}}
-- Ticket URL: <https://trac.macports.org/ticket/44086> MacPorts <http://www.macports.org/> Ports system for OS X
#44086: py-sip @4.16.1 installs files with wrong target architecture ------------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-sip | ------------------------------+-------------------------------- Comment (by davide.liessi@…): Forgot to say: I'm running Snow Leopard on a 64 bit capable CPU (Intel Core 2 Duo) with 32 bit kernel. {{{ $ uname -mprsv Darwin 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386 }}} -- Ticket URL: <https://trac.macports.org/ticket/44086#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#44086: py-sip @4.16.1 installs files with wrong target architecture ------------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-sip | ------------------------------+-------------------------------- Comment (by michaelld@…): The SIP build system is probably not honoring environment flags, which is not a big surprise given that it uses Python for all parts of the build. Will you do the following: {{{ sudo port clean py27-sip sudo port destroot py27-sip cp `port logfile py27-sip` ~/Desktop/py27-sip_log.txt bzip2 ~/Desktop/py27-sip_log.txt }}} then attach the compressed logfile to this ticket. I doubt I'll be able to replicate your issue on my OS (10.8 and 10.9) -- SIP builds as +universal correctly for me as far as I can tell (just checked the actual binary files, and they are indeed "fat"). But, maybe the logfile will help. -- Ticket URL: <https://trac.macports.org/ticket/44086#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#44086: py-sip @4.16.1 installs files with wrong target architecture ------------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-sip | ------------------------------+-------------------------------- Comment (by davide.liessi@…): Replying to [comment:2 michaelld@…]:
then attach the compressed logfile to this ticket.
Done. -- Ticket URL: <https://trac.macports.org/ticket/44086#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#44086: py-sip @4.16.1 installs files with wrong target architecture ------------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-sip | ------------------------------+-------------------------------- Comment (by michaelld@…): Thanks. I know the issue and have a fix. I'm attaching it as a patch here until I can get it checked in (Trac is not letting me do so right now). Here's how you apply it (I'll assume you've downloaded it to "~/Downloads /py-sip_Portfile.diff") {{{ cd `port dir py-sip` patch -p0 < ~/Downloads/py-sip_Portfile.diff sudo port clean py*sip sudo port -f uninstall `port installed py27-sip | sed -e 1d -e "s@(active)@@"` sudo port install py27-sip }}} and, this time the build arch should (will!) be honored. It won't hurt to have SIP installed in this manner; when the update comes through "port selfupdate" should be smart enough to merge them correctly. You can always do: {{{ cd `port dir py-sip` patch -R -p0 < ~/Downloads/py-sip_Portfile.diff }}} to revert back to the original Portfile before doing a selfupdate. -- Ticket URL: <https://trac.macports.org/ticket/44086#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#44086: py-sip @4.16.1 installs files with wrong target architecture ------------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-sip | ------------------------------+-------------------------------- Comment (by davide.liessi@…): I confirm that your patch works for me: {{{ $ file /opt/macports-i386/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/sip.so /opt/macports-i386/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/sip.so: Mach-O i386 bundle $ /opt/macports-i386/bin/python2.7 Python 2.7.7 (default, Jun 18 2014, 14:59:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import sip
}}}
Thanks! -- Ticket URL: <https://trac.macports.org/ticket/44086#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#44086: py-sip @4.16.1 installs files with wrong target architecture ------------------------------+-------------------------------- Reporter: davide.liessi@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: py-sip | ------------------------------+-------------------------------- Changes (by michaelld@…): * status: new => closed * resolution: => fixed Comment: Great! Committed in r121203. -- Ticket URL: <https://trac.macports.org/ticket/44086#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts