Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#25409 closed defect (fixed)

py26-numpy fails during 'port upgrade'

Reported by: ssteinerX@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: nerdling (Jeremy Lavergne), hmgaudecker@…, ssteinerX@…, michaelld (Michael Dickens)
Port: py26-numpy

Description (last modified by jmroot (Joshua Root))

After hours of chugging through upgrading all my ports (it's been a while), py26-numpy fails as per the enclosed file.

I ran the py26 activation with:

sudo port install python_select sudo python_select python26

to make sure the right python was selected, but there seems to be a cascade of mis-targeting along the way and attempts to port uninstall keeps leading back through a seemingly infinite number of references to dependencies that have to be uninstalled first:

(~)# port uninstall py26-numpy
--->  Unable to uninstall py26-numpy 1.4.0_0, the following ports depend on it:
--->      py26-cairo
--->      py26-matplotlib
Error: port uninstall failed: Please uninstall the ports that depend on py26-numpy first.
(~)# sudo port uninstall py26-numpy
--->  Unable to uninstall py26-numpy 1.4.0_0, the following ports depend on it:
--->      py26-cairo
--->      py26-matplotlib
Error: port uninstall failed: Please uninstall the ports that depend on py26-numpy first.
(~)# sudo port uninstall py26-cairo py26-matplotlib py26-numpy
--->  Unable to uninstall py26-cairo 1.8.8_0, the following ports depend on it:
--->      py26-gtk
Error: port uninstall failed: Please uninstall the ports that depend on py26-cairo first.
(~)# sudo port uninstall py26-gtk py26-cairo py26-matplotlib py26-numpy 
--->  Unable to uninstall py26-gtk 2.16.0_0, the following ports depend on it:
--->      py26-pygtksourceview
Error: port uninstall failed: Please uninstall the ports that depend on py26-gtk first.

and so on...

If the python_select dance had to be done before the other builds, the process should have either done it, or stopped to allow it before continuing or maybe py26-numpy just should have been rebuilt first.

This is my first attempt to install a new, larger package (gimp) and so far, I'm just going in circles trying to upgrade all of the out of date ports, which won't upgrade so I can't install gimp and so on.

Attachments (3)

main.log (22.5 KB) - added by ssteinerX@… 14 years ago.
The build failure log
main.2.log (274.9 KB) - added by hmgaudecker@… 14 years ago.
Similar error log (no universal build).
main.3.log (19.6 KB) - added by hmgaudecker@… 14 years ago.
Error log for universal build.

Download all attachments as: .zip

Change History (21)

Changed 14 years ago by ssteinerX@…

Attachment: main.log added

The build failure log

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: py26-numpy removed
Owner: changed from macports-tickets@… to mcalhoun@…
Port: py26-numpy added

Please remember to preview and use WikiFormatting, put the name of the port in the Port field, and cc the maintainer.

comment:2 Changed 14 years ago by ssteinerX@…

Sorry about that, 'far as I can tell, I can't edit even bugs I report or I would have fixed that.

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

Cc: snc@… added

Preview button :-)

Anyways, what's the result of uname -a on your machine?

comment:4 Changed 14 years ago by ssteinerX@…

uname -a

Darwin xxx.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 i386

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

That's strange; I swear I saw x86_64 somewhere in your build log. Hmm. Do you have MacPorts set to install i386 or x86_64? Check out /opt/local/etc/macports/macports.conf for build_arch

comment:6 Changed 14 years ago by hmgaudecker@…

I have exactly the same problem on a clean install -- deleted the /opt/ folder, installed MacPorts 1.9.1 on Snow Leopard, 32-bit kernel (same as above), Mac Pro with Quad-Core Intel Xeon (64-bit capable). Tried leaving build_arch at default, setting it to x86_64, x86_64 i386, all the same (haven't tried only i386, though).

Doing the same on a MacBook Pro with Intel Core 2 Duo (64-bit capable), same software, works perfectly when setting "build_arch x86_64 i386" (have not tried anything else).

Installing everything with the universal option throws a different error, see second log.

Changed 14 years ago by hmgaudecker@…

Attachment: main.2.log added

Similar error log (no universal build).

Changed 14 years ago by hmgaudecker@…

Attachment: main.3.log added

Error log for universal build.

comment:7 Changed 14 years ago by hmgaudecker@…

Cc: hmgaudecker@… added

Cc Me!

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

Only one value should be supplied to build_arch:

build_arch

The machine architecture to try to build for in normal use

Regular architectures include: ppc, i386, ppc64, x86_64

Default (10.6): x86_64 or i386 depending on hardware

Default (10.5 and earlier): i386 or ppc depending on hardware

comment:9 in reply to:  8 ; Changed 14 years ago by hmgaudecker@…

Well, then ignore that I used both in one of the tries. I tried without changing the default (build_arch not set at all) and x86_64, all the same ... Using only i386 is not really an option (should it be?).

I thought I read somewhere that you could set both. If not, it'll be interesting to see what it did on the MacBook. Will check tomorrow. Is there an easy way to find out whether numpy is installed in 64 or 32 bit mode?

BTW, the trouble seems to start when /usr/bin/gfortran/ is invoked. Is that intended, as opposed to the MacPorts version (i.e. the one supplied with gcc44)?

comment:10 in reply to:  9 Changed 14 years ago by nerdling (Jeremy Lavergne)

Replying to hmgaudecker@…:

Using only i386 is not really an option (should it be?).

It should be an option.

Is there an easy way to find out whether numpy is installed in 64 or 32 bit mode?

Run the file command on something it built (e.g., file /opt/local/bin/my_program)

comment:11 in reply to:  9 Changed 14 years ago by nerdling (Jeremy Lavergne)

Replying to hmgaudecker@…: Is there an easy way to find out whether numpy is installed in 64 or 32 bit mode? You can see how MacPorts believes it is installed by using the following:

port -v installed py26-numpy

comment:12 Changed 14 years ago by hmgaudecker@…

Thanks! On the Intel Core 2 Duo everything got installed nicely in 64-bit mode, it seems:

py26-numpy @1.4.1_1+gcc44 (active) platform='darwin 10' archs='x86_64'

On the MacPro I now tried:

  • installing py26-numpy in 64-bit mode on top of the dependencies being universal -> same error as the first two.
  • installing py26-numpy in 32-bit mode on top of the dependencies being universal (SuiteSparse doesn't have a universal variant, so uninstalled it and reinstalled in 32-bit mode) -> fails for the opposite problem, essentially (I can attach the log file if desired).
  • nuking /opt/, installing everything in 32-bit mode from scratch -> gcc44 fails because it doesn't find the right version of mpfr.h, although it seemingly got installed correctly before

I'm lost. Back to Python 2.5 ?

comment:13 Changed 14 years ago by ssteinerX@…

Cc: ssteinerX@… added

Cc Me!

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

Cc: michaelld@… added

Cc Me!

comment:15 Changed 14 years ago by ssteinerX@…

---> Building py26-numpy Error: Target org.macports.build returned: shell command failed Log for py26-numpy is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-numpy/main.log Error: Unable to upgrade port: 1 To report a bug, see <http://guide.macports.org/#project.tickets>

Still...3 months later...

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

There are multiple issues going on in the way numpy determines which compilers to use. You have /usr/bin/gfortran installed, which is non-standard by any OSX install. You might consider removing it, though there also might be a good reason why it is there (it wasn't installed by MacPorts).

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. The current version of this diff has issues with f2py, but those will be worked out soon -- so, while it's not finished it will hopefully take care of this ticket's issue.

comment:17 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.

comment:18 Changed 14 years ago by ssteinerX@…

Didn't work when I tried port upgrade outdated.

Did work when I just followed the steps above to install just py26-numpy, it worked fine.

Then port upgrade outdated worked after py26-numpy was all set even (finally) installing gimp which was where I think this all started...

Thanks!

S

Note: See TracTickets for help on using tickets.