Opened 5 years ago

Closed 3 years ago

#50453 closed defect (fixed)

Failed to build py27-pymc

Reported by: sankha.mukherjee@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: reneeotten (Renee Otten), michaelld (Michael Dickens)
Port: py-pymc

Description (last modified by ryandesign (Ryan Schmidt))

I was updating my ports when I meth with this error ...

Sankha-desktop:~ user$ sudo port upgrade outdated 
--->  Computing dependencies for py27-pymc
--->  Fetching distfiles for py27-pymc
Error: Install port:py27-numpy +gcc48
Error: org.macports.fetch for port py27-pymc returned: port:py27-numpy +gcc48 not installed
Please see the log file for port py27-pymc for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pymc/py27-pymc/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

So I tried several things ...

  1. sudo port install py27-pymc +gcc47 --> No luck

2.

    port clean py27-pymc
    sudo port -v install py27-pymc +gcc48

--> No Luck

Here is the full log ... attachment:main.log

Attachments (1)

main.log (52.2 KB) - added by sankha.mukherjee@… 5 years ago.
this is the complete log

Download all attachments as: .zip

Change History (16)

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

Keywords: numpy removed
Port: py-pymc added; py27-pymc removed

In the future, please Cc the port maintainers (port info --maintainers py27-pymc), if any. Also, attach the complete main.log file instead of pasting the contents into the description.

comment:2 in reply to:  1 Changed 5 years ago by sankha.mukherjee@…

Replying to mf2k@…:

In the future, please Cc the port maintainers (port info --maintainers py27-pymc), if any. Also, attach the complete main.log file instead of pasting the contents into the description.

Sorry about that. This is my first ticket.

Changed 5 years ago by sankha.mukherjee@…

Attachment: main.log added

this is the complete log

comment:3 Changed 5 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)

It looks like the error message tells you how to resolve the problem:

Install port:py27-numpy +gcc48

comment:4 Changed 5 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)

comment:5 in reply to:  4 ; Changed 5 years ago by sankha.mukherjee@…

Replying to ryandesign@…:

Actually that is the first thing I tried. I got a result saying that

Sankha-desktop:~ user$ sudo port clean py27-numpy
Sankha-desktop:~ user$ sudo port install py27-numpy +gcc48
Password:
--->  Computing dependencies for py27-numpy
--->  Fetching archive for py27-numpy
--->  Attempting to fetch py27-numpy-1.10.4_0.darwin_15.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/py27-numpy
--->  Attempting to fetch py27-numpy-1.10.4_0.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/py27-numpy
--->  Attempting to fetch py27-numpy-1.10.4_0.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/py27-numpy
--->  Fetching distfiles for py27-numpy
Error: org.macports.fetch for port py27-numpy returned: must set at least one Fortran variant
Please see the log file for port py27-numpy for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-numpy/py27-numpy/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-numpy failed

I even went so far as to completely uninstall ((( numpy ))) and reinstall it. I had to sudo port py27-numpy +gfortran after uninstalling py27-numpy and only that was able to install the numpy!

Last edited 5 years ago by sankha.mukherjee@… (previous) (diff)

comment:6 in reply to:  5 Changed 5 years ago by sankha.mukherjee@…

Replying to sankha.mukherjee@…:

Replying to ryandesign@…:

Actually that is the first thing I tried. I got a result saying that

Sankha-desktop:~ user$ sudo port clean py27-numpy
Sankha-desktop:~ user$ sudo port install py27-numpy +gcc48
Password:
--->  Computing dependencies for py27-numpy
--->  Fetching archive for py27-numpy
--->  Attempting to fetch py27-numpy-1.10.4_0.darwin_15.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/py27-numpy
--->  Attempting to fetch py27-numpy-1.10.4_0.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/py27-numpy
--->  Attempting to fetch py27-numpy-1.10.4_0.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/py27-numpy
--->  Fetching distfiles for py27-numpy
Error: org.macports.fetch for port py27-numpy returned: must set at least one Fortran variant
Please see the log file for port py27-numpy for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-numpy/py27-numpy/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-numpy failed

I even went so far as to completely uninstall ((( numpy ))) and reinstall it. I had to sudo port py27-numpy +gfortran after uninstalling py27-numpy and only that was able to install the numpy!

In the meantime, I have actually uninstalled pymc and continued with the ports update.

comment:7 Changed 3 years ago by reneeotten <reneeotten@…>

In d7122da37e17f65ea873d2d25524a4656749afa3/macports-ports (master):

py-pymc: update to 2.3.7, add size

See: #50453
I suppose one could close 2-years old abovementioned ticket; right now
it seems to build.

comment:8 in reply to:  7 Changed 3 years ago by ryandesign (Ryan Schmidt)

Cc: reneeotten michaelld added

Replying to reneeotten <reneeotten@…>:

In d7122da37e17f65ea873d2d25524a4656749afa3/macports-ports (master):

I suppose one could close 2-years old abovementioned ticket; right now
it seems to build.

The ticket should not be closed because the problem has not been resolved:

$ sudo port install py-pymc +gcc48
--->  Computing dependencies for py-pymc
--->  Dependencies to be installed: py27-pymc
--->  Fetching archive for py27-pymc
--->  Attempting to fetch py27-pymc-2.3.7_0+gcc48.darwin_16.x86_64.tbz2 from https://packages.macports.org/py27-pymc
--->  Fetching distfiles for py27-pymc
Error: Install port:py27-numpy +gcc48
Error: Failed to fetch py27-pymc: port:py27-numpy +gcc48 not installed
Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-ports-svn-trunk_python_py-pymc/py27-pymc/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py-pymc failed

The problem is that py-pymc requires that the same compiler variant is used for py-numpy, but py-pymc has compiler variants that are not present in py-numpy:

$ port variants py27-numpy py27-pymc
py27-numpy has the variants:
(-)atlas: Use MacPorts ATLAS Libraries
     * conflicts with openblas
   clang37: Build using the MacPorts clang 3.7 compiler
     * conflicts with gcc49 gcc5 gcc6 gcc7
   gcc49: Build using the MacPorts gcc 4.9 compiler
     * conflicts with clang37 gcc5 gcc6 gcc7 gfortran gfortran
   gcc5: Build using the MacPorts gcc 5 compiler
     * conflicts with clang37 gcc49 gcc6 gcc7 gfortran gfortran
   gcc6: Build using the MacPorts gcc 6 compiler
     * conflicts with clang37 gcc49 gcc5 gcc7 gfortran gfortran
   gcc7: Build using the MacPorts gcc 7 compiler
     * conflicts with clang37 gcc49 gcc5 gcc6 gfortran gfortran
[+]gfortran: Build using the MacPorts gcc 7 Fortran compiler
     * conflicts with gcc49 gcc5 gcc6 gcc7
   openblas: Use MacPorts OpenBLAS Libraries
     * conflicts with atlas
   universal: Build for multiple architectures
py27-pymc has the variants:
   g95: Build using the g95 Fortran compiler
     * conflicts with gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 gcc7
   gcc44: Build using the MacPorts gcc 4.4 compiler
     * conflicts with g95 g95 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 gcc7
   gcc45: Build using the MacPorts gcc 4.5 compiler
     * conflicts with g95 g95 gcc44 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 gcc7
   gcc46: Build using the MacPorts gcc 4.6 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc47 gcc48 gcc49 gcc5 gcc6 gcc7
   gcc47: Build using the MacPorts gcc 4.7 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc46 gcc48 gcc49 gcc5 gcc6 gcc7
   gcc48: Build using the MacPorts gcc 4.8 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc46 gcc47 gcc49 gcc5 gcc6 gcc7
   gcc49: Build using the MacPorts gcc 4.9 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc46 gcc47 gcc48 gcc5 gcc6 gcc7
   gcc5: Build using the MacPorts gcc 5 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc6 gcc7
   gcc6: Build using the MacPorts gcc 6 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc7
[+]gcc7: Build using the MacPorts gcc 7 compiler
     * conflicts with g95 g95 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6
   universal: Build for multiple architectures

Either add some compiler variants to py-numpy, or remove some from py-pymc. Michael, do you have a preference?

comment:9 Changed 3 years ago by reneeotten (Renee Otten)

Ryan, that's why I only linked to this ticket in the PR and didn't close it as I wasn't sure if that would be appropriate... I now see where the problem comes from (I clearly need to read a bit more on the compiler business and how MacPorts handles that). I was under the impression that 2 years ago the issue was specifically with gcc48 (the default compiler back then?) and didn't consider that anyone would still want to use that compiler these days. It did build fine with the default options (i.e., gcc7). Would you typically test all the different variants to make sure they work? In any case, I have no problem with removing all the non-supported variants and keeping only the ones that are present in py-numpy. That is done with the compilers.setup line, correct? Just let me know if/what you want me to change!

comment:10 Changed 3 years ago by michaelld (Michael Dickens)

My preference is to reduce variants where possible. Fewer options makes it easier to debug issues. So, removing from py27-pymc seems to me like the correct way to go here.

comment:11 Changed 3 years ago by michaelld (Michael Dickens)

@reneeotten: yes, you use the compilers.setup line; I think that's all that's needed here. Please feel free to match up the selections & issue a PR.

comment:12 Changed 3 years ago by reneeotten (Renee Otten)

Michael, I have matched the compilers.setup line from py-numpy. Before submitting a PR I would like to check one more thing with you. Looking at the Portfile for py-numpy I also noticed the following code snippet:

if {${name} ne ${subport}} {
    # the python PortGroup puts compiler names in build.env and destroot.env
    # for this to be done correctly, the following must be located before python.versions
    pre-build    { set_compilers }
    pre-destroot { set_compilers }
}

From the comment it suggests to me that this needs to be done when using the python PortGroup? To be honest, I don't really understand what that's doing, but also don't see that in any other python Portfile... Am I correct to assume that this is specific for the numpy port only and I don't need to do this? Thanks!

comment:13 Changed 3 years ago by michaelld (Michael Dickens)

Yeah you don't need to worry about the "set_compilers" stuff; that's NumPy Portfile specific.

You might look at the compilers 1.0 PortGroup to see if there is a C/C++ equivalent to "require_fortran" (found in "compilers.setup"), if what you want is the same-same compiler variant down to C and C++ compilers (not just Fortran).

comment:14 Changed 3 years ago by pmetzger (Perry E. Metzger)

michaelld and others, could you look at https://github.com/macports/macports-ports/pull/1734 and make sure it is correct?

comment:15 Changed 3 years ago by reneeotten <reneeotten@…>

Resolution: fixed
Status: newclosed

In 25c1a3bdc71160102d9fc2cd5e99ada3952534e7/macports-ports (master):

py-pymc: use same compiler variants as in py-numpy

Closes: #50453

Note: See TracTickets for help on using tickets.