Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#22360 closed defect (fixed)

py26-numpy won't build

Reported by: ak@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: orez.org@…, nerdling (Jeremy Lavergne), skymoo (Adam Mercer), acgrissom@…, mike@…, firxen@…, danmichaelo@…, fracai, motya@…, nchaimov@…, navymaker@…, stransky@…, michaelld (Michael Dickens)
Port: py26-numpy

Description

On OS X 10.6, error message:

--->  Computing dependencies for py26-gtk
--->  Building py26-numpy
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/work/numpy-1.3.0" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg build " returned error 1
Command output:     return old_setup(**new_attr)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
    cmd_obj.run()
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/work/numpy-1.3.0/numpy/distutils/command/build.py", line 37, in run
    old_build.run(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build.py", line 134, in run
    self.run_command(cmd_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
    cmd_obj.run()
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/work/numpy-1.3.0/numpy/distutils/command/build_src.py", line 130, in run
    self.build_sources()
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/work/numpy-1.3.0/numpy/distutils/command/build_src.py", line 147, in build_sources
    self.build_extension_sources(ext)
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/work/numpy-1.3.0/numpy/distutils/command/build_src.py", line 250, in build_extension_sources
    sources = self.generate_sources(sources, ext)
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/work/numpy-1.3.0/numpy/distutils/command/build_src.py", line 307, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 286, in generate_config_h
    moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
  File "numpy/core/setup.py", line 30, in check_types
    out = check_types(*a, **kw)
  File "numpy/core/setup.py", line 186, in check_types
    "Cannot compiler 'Python.h'. Perhaps you need to "\
SystemError: Cannot compiler 'Python.h'. Perhaps you need to install python-dev|python-devel.

Error: The following dependencies failed to build: py26-cairo py26-numpy py26-gobject libffi
Error: Status 1 encountered during processing.

Attachments (1)

py26-numpy.log (58.0 KB) - added by ak@… 14 years ago.
debug log as requested

Download all attachments as: .zip

Change History (46)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to mcalhoun@…

comment:2 Changed 14 years ago by orez.org@…

Cc: orez.org@… added

Cc Me!

comment:3 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Have you tried rebuilding python26 and everything up from there? Perhaps it was an old build that got used as it built fine for me.

comment:4 Changed 14 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:5 Changed 14 years ago by skymoo (Adam Mercer)

Summary: py26-numpy won't buildpy26-gtk2 won't build

comment:6 Changed 14 years ago by skymoo (Adam Mercer)

Summary: py26-gtk2 won't buildpy26-numpy won't build

Sorry, should read better next time :-(

Can you attach a full debug log.

comment:7 Changed 14 years ago by acgrissom@…

Cc: acgrissom@… added

Cc Me!

comment:8 Changed 14 years ago by ak@…

Well, I erased (as specified in the FAQ) and reinstalled macports, and I'm getting the exact same error. Just in case, the flags I'm using are "+universal +quartz +no_x11".

As for the full debug log, can you tell me where to find it?

comment:9 Changed 14 years ago by nerdling (Jeremy Lavergne)

You can create a full debug log in your home directory using the following:

sudo port -d install py26-numpy &> ~/py26-numpy.log

Changed 14 years ago by ak@…

Attachment: py26-numpy.log added

debug log as requested

comment:10 Changed 14 years ago by skymoo (Adam Mercer)

Is python26 fully up to date? Have you made python26 the default python by running

sudo python_select python26

comment:11 in reply to:  10 Changed 14 years ago by mike@…

I can confirm that py26-numpy does not build on 10.6.2. I have python26 selected, and both python-config and python2.6-config return the correct paths.

comment:12 Changed 14 years ago by mike@…

Cc: mike@… added

Cc Me!

comment:13 Changed 14 years ago by skymoo (Adam Mercer)

It builds for me on 10.6.2:

[ram@cizin ~]$ sudo port outdated
No installed ports are outdated.
[ram@cizin ~]$ sudo port install py26-numpy
--->  Computing dependencies for py26-numpy
--->  Fetching py26-numpy
--->  Verifying checksum(s) for py26-numpy
--->  Extracting py26-numpy
--->  Applying patches to py26-numpy
--->  Configuring py26-numpy
--->  Building py26-numpy
--->  Staging py26-numpy into destroot
--->  Installing py26-numpy @1.3.0_0
--->  Activating py26-numpy @1.3.0_0
--->  Cleaning py26-numpy
[ram@cizin ~]$

Is everything up to date?

comment:14 Changed 14 years ago by mike@…

Everything was up to date. I ran "port sync", then "port install -u outdated", then tried to install py26-numpy. I was able to build it directly from the work folder, then install using sudo port install -f py26-numpy.

comment:15 in reply to:  14 ; Changed 14 years ago by skymoo (Adam Mercer)

Replying to mike@…:

I was able to build it directly from the work folder, then install using sudo port install -f py26-numpy

What do you mean by the above? What command did you use in the build directory?

comment:16 in reply to:  15 Changed 14 years ago by mike@…

Replying to ram@…:

Replying to mike@…:

I was able to build it directly from the work folder, then install using sudo port install -f py26-numpy

What do you mean by the above? What command did you use in the build directory?

sudo python setup.py build

comment:17 Changed 14 years ago by skymoo (Adam Mercer)

Which doesn't pass the appropriate options to link against the MacPorts atlas, does the no_atlas variant build?

comment:18 Changed 14 years ago by firxen@…

Cc: firxen@… added

Cc Me!

comment:19 in reply to:  17 Changed 14 years ago by firxen@…

Replying to ram@…:

Which doesn't pass the appropriate options to link against the MacPorts atlas, does the no_atlas variant build?

The no_atlas variant fails with the same error for me.

comment:20 Changed 14 years ago by skymoo (Adam Mercer)

Have you tried rebuilding python26 as suggested?

comment:21 in reply to:  20 Changed 14 years ago by firxen@…

Replying to ram@…:

Have you tried rebuilding python26 as suggested?

I reinstalled python26 and all py26-* packages I had installed. The only non-default variant I'm using (apart from the +no_atlas test) is +universal.

comment:22 Changed 14 years ago by skymoo (Adam Mercer)

atlas does not build universally so I imagine that is causing a problem, can you try building numpy without +universal?

comment:23 Changed 14 years ago by firxen@…

It builds (with +universal) if I have python26 installed with -universal. I'm not entirely clear on what magic +universal does, but that seems to be what's breaking it.

comment:24 Changed 14 years ago by firxen@…

I should be clearer on what I actually did here.

I uninstalled python26 and everything depending on it. Then in installed python26 with -universal. After that, I reinstalled everything else with +universal (which is my default) and everything seems happy. I haven't actually used any of it yet, though.

Just building numpy with -universal, as ram suggested, failed in the same way with a +universal python26.

And now my head hurts. :-(

comment:25 Changed 14 years ago by santagada@…

I can confirm, that building python26 -universal fixes this.

comment:26 Changed 14 years ago by Veence (Vincent)

You can build py26-numpy universal, but you need to disable the atlas dependency. Proof

-> port installed py26-numpy
The following ports are currently installed:
  py26-numpy @1.3.0_0+universal (active)

comment:27 Changed 14 years ago by danmichaelo@…

Cc: danmichaelo@… added

Cc Me!

comment:28 Changed 14 years ago by fracai

I was able to build py26-numpy using the no_gcc43 variant. No other modifications to python26, etc. were necessary (ie. still installed as universal).

The following ports are currently installed:
  py26-numpy @1.3.0_0+no_gcc43+universal (active)

comment:29 Changed 14 years ago by fracai

Cc: arno+macports@… added

Cc Me!

comment:30 Changed 14 years ago by mjjohnson.geo@…

Cc: mjjohnson.geo@… added

Cc Me!

comment:31 Changed 14 years ago by anishmuttreja@…

From the debug log attached to the bug, it seems gcc-mp-4.3 may have failed because of this

804 don't know how to compile Fortran code on platform 'posix' 805 C compiler: /opt/local/bin/gcc-mp-4.3 -arch x86_64 -arch i386 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 806 807 compile options: '-Inumpy/core/src -Inumpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c' 808 gcc-mp-4.3: _configtest.c 806 807 compile options: '-Inumpy/core/src -Inumpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c' 808 gcc-mp-4.3: _configtest.c 809 cc1: error

Might this be why builds with python26+universal fail and builds with python26 -universal work. From the gcc manual

man gcc-mp-4.3

"FSF GCC on Darwin does not create "fat" object files; it will create an

object file for the single architecture that it was built to target. Apple's GCC on Darwin does create "fat" files if multiple -arch options are used; it does so by running the compiler or linker multiple times and joining the results together with lipo."

Can the gcc maintainer take a look?

comment:32 Changed 14 years ago by anishmuttreja@…

Apologies, I should have used WikiFormatting. Writing the comment again to be more readable. From the debug log attached to the bug, it seems gcc-mp-4.3 may have failed because of this

804	don't know how to compile Fortran code on platform 'posix'
805	C compiler: /opt/local/bin/gcc-mp-4.3 -arch x86_64 -arch i386 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
806	
807	compile options: '-Inumpy/core/src -Inumpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c'
808	gcc-mp-4.3: _configtest.c

From 
> man gcc-mp-4.3

FSF GCC on Darwin does not create "fat" object files; it will create an object file for the single architecture that it was built to target. Apple's GCC on Darwin does create "fat" files if multiple -arch options are used; it does so by running the compiler or linker multiple times and joining the results together with lipo.

comment:33 Changed 14 years ago by jon@…

Using arno+macports solution I was able to install py26-numpy using the no_gcc43 variant.

For anyone that stumbles onto this ticket, just run:

sudo port clean py26-numpy
sudo port install py26-numpy +no_gcc43

You should be able to continue installing your original port after that. I was able to install py26-gtk after getting py26-numpy working on the no_gcc43 variant.

comment:34 Changed 14 years ago by motya@…

Cc: motya@… added

Cc Me!

comment:35 Changed 14 years ago by nchaimov@…

Cc: nchaimov@… added

Cc Me!

comment:36 Changed 14 years ago by Russell-Jones-OxPhys (Russell Jones)

sudo port install py26-numpy +no_gcc43

Worked for me on 10.6.2 on two different macports installs. No fiddling required. The install process was (suspiciously?) short.

Should this be the default on Snow Leopard? Running nosetest-2.6 in /opt/local/Library/Frameworks/Python.framework/Version/2.6/lib/python2.6/site-packages/numpy/ threw up a few (nine) things, but three were warnings (kind of: KnownErrors) and six were due to failed imports, presumably because of missing optional dependencies, e.g. py-f2py.

comment:37 in reply to:  36 Changed 14 years ago by nerdling (Jeremy Lavergne)

Replying to russell.jones@…:

The install process was (suspiciously?) short.

You can use port contents to see what actually managed to get installed.

comment:38 Changed 14 years ago by mjjohnson.geo@…

Cc: mjjohnson.geo@… removed

Cc Me!

comment:39 Changed 14 years ago by navymaker@…

Cc: navymaker@… added

Cc Me!

comment:40 Changed 14 years ago by skymoo (Adam Mercer)

I believe atlas should now build universally, is this still a problem?

comment:41 Changed 14 years ago by skymoo (Adam Mercer)

does the solution proposed in #19397 fix this issue?

comment:42 Changed 14 years ago by stransky@…

Cc: stransky@… added

Cc Me!

comment:43 Changed 14 years ago by michaelld (Michael Dickens)

Cc: michaelld@… added

Cc Me!

comment:44 Changed 14 years ago by michaelld (Michael Dickens)

There's a potential fix for this issue on ticket #24942; please try the last diff & see if it works for you on this issue.

comment:45 Changed 14 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

I've checked in the changes in r72220; please do:

sudo port clean py26-numpy
sudo port selfupdate
sudo port install py26-numpy [+variants]

and see if it works. I'm closing this ticket as fixed; please reopen if the changes do not work for you.

Note: See TracTickets for help on using tickets.