[MacPorts] #33791: py27-numpy ignoring build_arch because of building in destroot where ARCHFLAGS isn't set

MacPorts noreply at macports.org
Tue Mar 27 11:30:55 PDT 2012


#33791: py27-numpy ignoring build_arch because of building in destroot where
ARCHFLAGS isn't set
---------------------------------+------------------------------------------
 Reporter:  joanmanel@…          |       Owner:  macports-tickets@…                   
     Type:  defect               |      Status:  new                                  
 Priority:  Normal               |   Milestone:                                       
Component:  ports                |     Version:  2.0.4                                
 Keywords:                       |        Port:                                       
---------------------------------+------------------------------------------

Old description:

> 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.

New description:

 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.

--

Comment(by and.damore@…):

 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
 ~ $
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/33791#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list