[MacPorts] #74407: getdp +gmsh variant silently builds without Gmsh support

MacPorts noreply at macports.org
Mon Sep 7 21:08:19 UTC 2026


#74407: getdp +gmsh variant silently builds without Gmsh support
-------------------------------+--------------------
 Reporter:  captainproton1971  |      Owner:  (none)
     Type:  defect             |     Status:  new
 Priority:  Normal             |  Milestone:
Component:  ports              |    Version:
 Keywords:                     |       Port:
-------------------------------+--------------------
 = Description =

 The `+gmsh` variant of `getdp` does not appear to actually enable Gmsh
 support, even though the build succeeds and MacPorts records a dependency
 on `gmsh`.

 This is particularly relevant because `+gmsh` is currently a default
 variant for `getdp`.

 The GetDP Portfile contains:

 {{{
 variant gmsh description {Enable Gmsh functions (for field interpolation)}
 {
 depends_lib-append port:gmsh
 configure.args-replace -DENABLE_GMSH=OFF
 -DENABLE_GMSH=ON
 }

 default_variants +gmsh
 }}}

 However, GetDP 3.3.0's CMake configuration requires both `libgmsh` and the
 private Gmsh header `gmsh/GmshGlobal.h` before Gmsh support is actually
 enabled:

 {{{
 if(ENABLE_GMSH)
 find_library(GMSH_LIB gmsh PATH_SUFFIXES lib)

 # Currently GetDP uses the internal Gmsh developer API; this will be fixed

 # as we move to the stable API.

 find_path(GMSH_INC "gmsh/GmshGlobal.h" PATH_SUFFIXES include)
 if(GMSH_LIB AND GMSH_INC)
 list(APPEND EXTERNAL_LIBRARIES ${GMSH_LIB})
 list(APPEND EXTERNAL_INCLUDES ${GMSH_INC} ${GMSH_INC}/gmsh)
 set_config_option(HAVE_GMSH "Gmsh")
 endif()
 endif()
 }}}

 The MacPorts `gmsh` installation does not provide this header.

 = Environment =

 {{{
 macOS 26.6.2 / Darwin 25.6.0
 arm64 / Apple Silicon
 MacPorts 2.12.6

 getdp @3.3.0_5+accelerate+gfortran+gmsh+python38
 gmsh @4.15.2_0+accelerate+gfortran
 }}}

 The Gmsh port in this test was locally bumped from the current MacPorts
 4.15.0 Portfile to upstream 4.15.2 (as part of addressing
 [https://trac.macports.org/ticket/74406]. The relevant packaging behavior
 is unchanged: the Gmsh Portfile does not enable/install the private Gmsh
 developer API.

 = Reproduction =

 Install GetDP with the Gmsh variant:

 {{{
 $ sudo port install getdp +accelerate +gfortran +gmsh +python38
 }}}

 The installation succeeds, and MacPorts records the dependency:

 {{{
 $ port installed gmsh getdp
 The following ports are currently installed:
 getdp @3.3.0_5+accelerate+gfortran+gmsh+python38 (active)
 gmsh @4.15.2_0+accelerate+gfortran (active)

 $ port dependents gmsh
 getdp depends on gmsh
 }}}

 But GetDP reports no Gmsh support:

 {{{
 $ getdp -info

 Version          : 3.3.0
 License          : GNU General Public License
 Build OS         : MacOSX
 Build options    : 64Bit Arpack[system] Blas[custom] Gsl Kernel
 Lapack[custom] PeWe Python Sparskit
 Packaged by      : macports
 }}}

 In particular, `Gmsh` is absent from `Build options`.

 `libgetdp` is also not linked against `libgmsh`:

 {{{
 $ otool -L /opt/local/lib/libgetdp.3.3.dylib | grep -i gmsh

 }}}

 (no output)

 The header required by GetDP's CMake detection is not installed:

 {{{
 $ ls -l /opt/local/include/gmsh/GmshGlobal.h
 ls: /opt/local/include/gmsh/GmshGlobal.h: No such file or directory

 $ port contents gmsh | grep GmshGlobal

 }}}

 (no output)

 = Expected behavior =

 Installing `getdp +gmsh` should either:

 * actually enable the requested Gmsh functionality, with `Gmsh` appearing
 in `getdp -info` and the appropriate Gmsh library linkage; or
 * fail configuration with an informative error if the required Gmsh
 developer API is unavailable.

 At present the variant succeeds silently while the requested feature is
 not enabled.

 Since `+gmsh` is a default variant, a normal GetDP installation can
 therefore acquire a dependency on Gmsh without actually providing the Gmsh
 functionality that dependency is intended to enable.

 = Possible resolution =

 I have not attempted to prescribe a particular fix.

 GetDP 3.3.0 explicitly notes that its Gmsh integration currently uses
 Gmsh's internal developer API and that it is intended eventually to move
 to the stable API.

 Possible packaging approaches might therefore include:

 * arranging for a Gmsh build providing the private headers when GetDP's
 `+gmsh` functionality is requested;
 * patching/updating GetDP to use an available public Gmsh API, if
 feasible; or
 * disabling/removing the `+gmsh` default variant until its dependencies
 can actually satisfy GetDP's feature detection.

 The important issue is that the current variant silently succeeds without
 enabling the feature it advertises.

 = References =

 Current MacPorts GetDP Portfile:

 [https://raw.githubusercontent.com/macports/macports-
 ports/master/science/getdp/Portfile]

 GetDP CMake configuration showing the `GmshGlobal.h` requirement:

 [https://fossies.org/linux/getdp/CMakeLists.txt]

-- 
Ticket URL: <https://trac.macports.org/ticket/74407>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list