Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#15865 closed defect (invalid)

py25-numpy build error

Reported by: nelson.uhan@… Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: blb@…, macports@…
Port:

Description

I get the following error when trying to install py25-numpy:

~ > sudo port install py25-numpy
--->  Fetching py25-numpy
--->  Attempting to fetch numpy-1.1.0.tar.gz from http://downloads.sourceforge.net/numpy
--->  Verifying checksum(s) for py25-numpy
--->  Extracting py25-numpy
--->  Applying patches to py25-numpy
--->  Configuring py25-numpy
--->  Building py25-numpy with target build
--->  Staging py25-numpy into destroot
Error: Target org.macports.destroot returned: error renaming "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/destroot/opt/local/bin/f2py": no such file or directory
Error: Status 1 encountered during processing.

Sorry, I don't have more detailed output. I tried commenting out the post-destroot commands, which seemed to do the trick. In the current portfile:

post-destroot {
  move ${destroot}${prefix}/bin/f2py ${destroot}${prefix}/bin/f2py2.5
}

Attachments (1)

py25-numpy.problem.txt (11.9 KB) - added by redbeard+macport@… 11 years ago.
Result of sudo port -d install py25-numpy

Download all attachments as: .zip

Change History (21)

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

Milestone: Port Bugs
Owner: changed from macports-tickets@… to ram@…

Assigning to maintainer.

comment:2 Changed 11 years ago by paulbeard@…

Aha, I have been seeing the same bug. I'll use the suggested solution for now.

The MacPorts installation is not outdated so it was not updated
--->  Fetching metacity
--->  Verifying checksum(s) for metacity
--->  Extracting metacity
--->  Configuring metacity
--->  Building metacity with target all
--->  Staging metacity into destroot
--->  Unable to uninstall metacity 2.21.2_0, the following ports depend on it:
--->    gnome-python-desktop
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating metacity @2.21.2_0
--->  Uninstalling metacity @2.21.2_0
--->  Installing metacity @2.21.2_0
--->  Activating metacity @2.21.2_0
--->  Cleaning metacity
--->  Staging py25-numpy into destroot
Error: Target org.macports.destroot returned: error renaming "/opt/local/var/macports/build/_opt_local_trunk_dports_python_py25-numpy/work/destroot/opt/local/bin/f2py" to "/opt/local/var/macports/build/_opt_local_trunk_dports_python_py25-numpy/work/destroot/opt/local/bin/f2py2.5": file already exists
Error: Unable to upgrade port: 1

comment:3 Changed 11 years ago by skymoo (Adam Mercer)

Works for me:

[ram@cizin ~]$ sudo port install py25-numpy
--->  Fetching py25-numpy
--->  Verifying checksum(s) for py25-numpy
--->  Extracting py25-numpy
--->  Applying patches to py25-numpy
--->  Configuring py25-numpy
--->  Building py25-numpy with target build
--->  Staging py25-numpy into destroot
--->  Installing py25-numpy @1.1.0_1
--->  Activating py25-numpy @1.1.0_1
--->  Cleaning py25-numpy
[ram@cizin ~]$ 

What platform?

comment:4 in reply to:  2 Changed 11 years ago by skymoo (Adam Mercer)

Replying to paulbeard@gmail.com:

Aha, I have been seeing the same bug. I'll use the suggested solution for now.

Doesn't look like a "solution" to me (unless I'm missing something), as the install still fails and what does metacity have to do with this numpy issue?

comment:5 Changed 11 years ago by nelson.uhan@…

Sorry for omitting that information earlier... Mac OS X 10.5.4, MacPorts 1.6.0.

Tried compiling numpy on a clean install of MacPorts (i.e. delete /opt/local, install MacPorts fresh from dmg), and had no problems this time around.

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

Resolution: worksforme
Status: newclosed

comment:7 Changed 11 years ago by nigel@…

Resolution: worksforme
Status: closedreopened

I have an identical problem to the one described in the ticket. ...../opt/local/bin/f2py": no such file or directory OSX 10.5.4 MacPorts 1.6.0 Xcode 3.0 1 week old MacPorts gnucash being installed after a number of other installations including wx

comment:8 Changed 11 years ago by skymoo (Adam Mercer)

I cannot reproduce this problem and the OP has said that it now works for him. Please attach the full build log, i.e. the output of

$ sudo port -d install py25-numpy

Changed 11 years ago by redbeard+macport@…

Attachment: py25-numpy.problem.txt added

Result of sudo port -d install py25-numpy

comment:9 Changed 11 years ago by redbeard+macport@…

Encountering the same problem -- Mac OS X 10.5.4 (Build 9E17) with MacPorts 1.600, Xcode 3.1 Beta, see attachment above for full log. I will now attempt removing /opt/local and reinstalling MacPorts fresh as suggested above.

comment:10 Changed 11 years ago by blb@…

Cc: blb@… added

To those for whom this is failing, how is fftw-3 installed on your machine (use port installed fftw-3)? The default install of that appears to not require any sort of fortran compiler, so perhaps without one installed, f2py isn't built?

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

Replying to blb@macports.org:

To those for whom this is failing, how is fftw-3 installed on your machine (use port installed fftw-3)? The default install of that appears to not require any sort of fortran compiler, so perhaps without one installed, f2py isn't built?

Ignore that, that isn't the issue.

The issue is in numpy/f2py/setup.py, in generate_f2py_py it generates the name for f2py with:

        f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:]

so if python2.5 is being used, 2.5 is appended to it; if just python, no version is appended. Sounds like the post-destroot should check to see if it's already installed as f2py2.5 and if so, do nothing, otherwise rename it.

The big question is why some don't append 2.5? My older version which is currently installed (1.0.4) installed fine, but trying to build 1.1.0 hit this same issue; could be related to the fact that I have an older python25 (2.5.2_2) installed? Or perhaps using python_select, which I don't have installed?

comment:12 Changed 11 years ago by skymoo (Adam Mercer)

Thanks for tracking this down, I'll get a patch together

comment:13 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

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

I don't understand how this can be causing the problem, as the python binary used in defined in the python25 port group is ${prefix}/bin/python2.5, so the build should never be using just python.

I can't reproduce this problem with python25-2.5.2_5 and py25-numpy-1.1.0_1, with or without python_select installed. Looking through the ChangeLog for the python25 port 2.5.2_3 was when the port was modified to be a Framework build, I think that this problem is due to you using an old python25 port.

Can you ensure you're python25 is up to date and try again?

comment:15 Changed 11 years ago by skymoo (Adam Mercer)

There still seems to be a problem somewhere as python interpreter set for f2py is #!/usr/bin/env Python which is clearly wrong.

comment:16 in reply to:  14 Changed 11 years ago by blb@…

Replying to ram@macports.org:

Can you ensure you're python25 is up to date and try again?

FYI in my case, a newer python25 (with patches from tickets #9831 and #16111) worked fine, no issues with f2py at all.

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

Resolution: invalid
Status: reopenedclosed

caused by old python25 port

comment:18 Changed 11 years ago by macports@…

Is the python25 port updated with the patches from #9831 and #16111 yet?

comment:19 Changed 11 years ago by skymoo (Adam Mercer)

Not not, but py25-numpy builds without issue using the latest (2.5.2_5) python25

comment:20 Changed 10 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.