Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#33791 closed defect (fixed)

py27-numpy ignoring build_arch because of building in destroot where ARCHFLAGS isn't set

Reported by: joanmanel@… Owned by: anddam (Andrea D'Amore)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: dh@…, skymoo (Adam Mercer)
Port: py-numpy

Description (last modified by anddam (Andrea D'Amore))

I set in macports.conf to use i386. I am using right now Lion 10.7.3, and this is a Macbook 5,2. If I don't set it to i386 it installs everything 64, but I need to install everything in 32 because I need opencv in 32.

The installation is Ok, but then when in python loading numpy:

python2.7
Python 2.7.2 (default, Mar 27 2012, 16:48:41) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
    import add_newdocs
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module>
    from type_check import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py", line 5, in <module>
    import multiarray
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): no suitable image found.  Did find:
	/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so: mach-o, but wrong architecture

Some more info: this is the main.log: http://paste.ubuntu.com/902463/ the installation: http://pastebin.com/eW8Q62aj more install log: http://pastebin.com/4dg3c9k7

some more stuff: file /opt/local/bin/python2.7 /opt/local/bin/python2.7: Mach-O executable i386 file /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so: Mach-O 64-bit bundle x86_64

I installed this 3 days ago, in SL and macports for SL, and it worked perfectly. Then I updated my SO to lion, cleaned everything about macports, installed macports for Lion and as you can see it isn't working.

Change History (8)

comment:1 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: openmaintainer@… removed

comment:2 Changed 13 years ago by joanmanel@…

to set macports to install i386 I uncommented that line in macports.conf

comment:3 Changed 13 years ago by anddam (Andrea D'Amore)

Description: modified (diff)

I cannot reproduce your issue.

I'm on Lion with python port installed with universal variant and py27-numpy built for i386 architecture. Check following output:

~ $ port -v installed python27
The following ports are currently installed:
  python27 @2.7.2_4+universal (active) platform='darwin 11' archs='i386 x86_64'
~ $ port -v installed py27-numpy
The following ports are currently installed:
  py27-numpy @1.6.1_1 (active) platform='darwin 11' archs='i386'
~ $ port select --show python
The currently selected version for 'python' is 'python27'.
~ $ which python
/opt/local/bin/python
~ $ python 
Python 2.7.2 (default, Jan 16 2012, 17:34:25) 
[GCC 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.12)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> ^D
~ $

comment:4 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:5 Changed 13 years ago by anddam (Andrea D'Amore)

Owner: changed from macports-tickets@… to and.damore@…

comment:6 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… removed
Resolution: fixed
Status: newclosed

Should be fixed in r91289, I've tested it in both i386 only and +universal variant, provides shared objects with coherent architecture.

comment:7 Changed 13 years ago by jmroot (Joshua Root)

Port: py-numpy added

comment:8 Changed 13 years ago by jmroot (Joshua Root)

That's a workaround; the real fix is of course to stop it from building in the destroot phase at all.

Note: See TracTickets for help on using tickets.