Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#55991 closed enhancement (fixed)

esmf: Add clang variants

Reported by: platipodium (Carsten Lemmen) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: esmf

Description

The following seems wrong to me

port install clang-5.0 openmpi-clang50
port clean esmf

port install esmf +clang50 +openmpi
--->  Computing dependencies for esmf
The following dependencies will be installed:  openmpi-gcc7

Why does esmf have gcc7 as dependency when I request clang50?

Change History (11)

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

Owner: set to tenomoto
Status: newassigned
Summary: Mistakenly (?) install openmpi-gcc7 with requested variants +openmpi +clang50esmf: Mistakenly (?) install openmpi-gcc7 with requested variants +openmpi +clang50

When I run port variants esmf I do not see a variant called "clang50".

comment:2 Changed 6 years ago by platipodium (Carsten Lemmen)

Yes you're right. My fault (and messing with local port file)

Nonetheless, missing support for clang is an issue. Please change

defect -> enhancement
title -> Add support for clang

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

Summary: esmf: Mistakenly (?) install openmpi-gcc7 with requested variants +openmpi +clang50esmf: Add clang variants
Type: defectenhancement

The port deliberately disables the clang variants, but it's been that way since the port was added, so I don't know why it does that.

comment:4 Changed 6 years ago by platipodium (Carsten Lemmen)

I have been successfully running esmf with clang and openmpi (source install, not macports) for several years, so should not be a problem.

comment:5 Changed 6 years ago by platipodium (Carsten Lemmen)

Variants are inherited from the netcdf-fortran port, which does not have a clang variant. So this needs to be fixed in the dependent port first.

comment:6 Changed 6 years ago by platipodium (Carsten Lemmen)

See #55998

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

Can you explain why offering these variants here would be desired? Ports usually do not offer variants for choosing a version of clang; MacPorts base chooses for you.

comment:8 Changed 6 years ago by platipodium (Carsten Lemmen)

There is no need for a specific version of clang. I am fine with ports choosing this for me. But currently, clang is expressedly *excluded*. This is a defect, as there is a designated version of ESMF (denoted gfortranclang) that compiles the C++ part of ESMF with clang and the fortran part with gfortran. This is currently not possible with mac ports.

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

I think that's what the gfortran variant is supposed to do. But this port disables that too, and I don't know why it does that either.

comment:10 Changed 6 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: assignedclosed

In 7e652088b400a90e046e00897769e3a0c59f1848/macports-ports:

esmf: update to 7.1.0r. add gfortran variant.

Closes: #55991

comment:11 Changed 6 years ago by platipodium (Carsten Lemmen)

Thanks for the updated to ESMF 7.1.0r that was long-awaited (upstream).

Indeed, with variant gfortran, the cxx compiler used with openmpi is now used by ESMF despite wrong naming of ESMF_COMPILER variable

ESMF_CXXCOMPILER=/opt/local/bin/mpicxx-openmpi-mp
ESMF_COMPILER: gfortran
/opt/local/bin/mpicxx-openmpi-mp --version

So while this de facto address my request, it is still very confusing for the user (seeing ESMF_COMPILER=gfortran when she expects ESMF_COMPILER=gfortranclang). I don't know of adverse effects upstream, but there might be some ...

I would like to see a changed variant nomenclature (separately choosing one of gcc/clang as c compiler and one of gfortran/g95 as f compiler) and a correct representation in the upstream variable ESMF_COMPILER

Note: See TracTickets for help on using tickets.