Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#57415 closed defect (fixed)

mpi portgroup: should not offer gcc variants that won't work

Reported by: SebKeen Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: seanfarley (Sean Farley), dstrubbe (David Strubbe), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), mamoll (Mark Moll)
Port: hdf5, py-mpi4py

Description (last modified by jmroot (Joshua Root))

Hi,

I just tried to install a new port, and had to update mac port to version 2.5.4, and also Xcode to version 10. The port fails to update because of dependencies related to gcc49 and message that the compiler is not supported for Xcode 9.0 and higher. Thus, I tried to port install gcc9, and this again fails because of a dependency on hdf5-18 @1.8.17+cxx+gcc49+hl.

Here is the log:

bash-3.2$ sudo port install gcc9 
--->  Computing dependencies for gcc9
--->  Cleaning gcc9
--->  Scanning binaries for linking errors
--->  Found 9 broken files, matching files to ports
--->  Found 5 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 hdf5-18 @1.8.17+cxx+gcc49+hl
 cdo @1.7.2+szip
 ncview @2.1.1
 wgrib2 @2.0.5
 grads @2.0.2
Continue? [Y/n]: y
--->  hdf5-18 is replaced by hdf5
--->  Fetching distfiles for gcc49
Error: building gcc49 is not supported with Xcode 9 or greater
Error: Failed to fetch gcc49: unsupported platform
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Error: Problem while installing gcc49
Error: rev-upgrade failed: Error rebuilding hdf5-18
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

I hope someone can point in the right direction.

Noel

Change History (6)

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

Description: modified (diff)
Keywords: hdf5 removed
Owner: set to mamoll
Port: hdf5 added; gcc9 removed
Status: newassigned
Summary: gcc9 fails to install on High Sierra Xcode10hdf5 should not offer gcc variants that won't work

You installed gcc9 successfully; the failure was in rebuilding hdf5-18, which was found to be broken by rev-upgrade (which runs automatically after each installation and checks all installed ports). hdf5-18 has been replaced by hdf5, so hdf5 was built with the same variants that hdf5-18 was previously installed with, but the gcc49 variant no longer works with your new Xcode version.

You can fix this by simply uninstalling hdf5-18 and installing hdf5 with some newer gcc variant. However it seems like hdf5 shouldn't offer the variant in the first place when it won't work.

comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Should it really be the responsibility of every port that offers gcc variants to know which gcc versions are supported on which systems? The gcc ports already know this information, and thus the correct information was already displayed to the user.

The hdf5 port doesn't define these variants itself; it looks like it uses the mpi portgroup to do so. The compilers portgroup also exists which does something similar. If we really want these compiler variants not to be declared on systems where they won't work, that logic should be in the portgroups, not in the individual portfiles.

comment:3 Changed 5 years ago by jmroot (Joshua Root)

Cc: seanfarley dstrubbe MarcusCalhoun-Lopez mamoll added
Owner: mamoll deleted
Port: py-mpi4py added
Summary: hdf5 should not offer gcc variants that won't workmpi portgroup: should not offer gcc variants that won't work

Additionally, the portgroup adds variants in some cases that depend on ports that simply don't exist. For example:

% port lint py37-mpi4py +gcc49
--->  Verifying Portfile for py37-mpi4py
Error: Unknown dependency: mpich-gcc49
--->  1 errors and 0 warnings found.

% port lint py37-mpi4py +clang37
--->  Verifying Portfile for py37-mpi4py
Error: Unknown dependency: mpich-clang37
--->  1 errors and 0 warnings found.

comment:4 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: assignedclosed

In dcc2ab5d0ae8bfbd6b6a476b73386a99a34d5256/macports-ports (master):

mpi pg: only allow compiler versions that work

Fixes: #57415

comment:5 in reply to:  3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jmroot:

Additionally, the portgroup adds variants in some cases that depend on ports that simply don't exist.

Well that's another matter. I don't think anyone expected ports just to disappear on certain OS versions. Certainly our mirroring script doesn't expect that. See #59309.

comment:6 Changed 4 years ago by jmroot (Joshua Root)

In dcc2ab5d0ae8bfbd6b6a476b73386a99a34d5256/macports-ports (dar, master, py38-reproject, revert-6945-rust-1.43.0, wireshark):

mpi pg: only allow compiler versions that work

Fixes: #57415

Note: See TracTickets for help on using tickets.