[MacPorts] #74406: gmsh at 4.15.0 +accelerate +gfortran fails to link/test on Apple Silicon; bundled contrib libraries fix test failures

MacPorts noreply at macports.org
Mon Sep 7 21:01:50 UTC 2026


#74406: gmsh at 4.15.0 +accelerate +gfortran fails to link/test on Apple Silicon;
bundled contrib libraries fix test failures
-------------------------------+-------------------------
 Reporter:  captainproton1971  |      Owner:  (none)
     Type:  defect             |     Status:  new
 Priority:  Normal             |  Milestone:
Component:  ports              |    Version:
 Keywords:                     |       Port:  gmsh at 4.15.0
-------------------------------+-------------------------
 **Environment**:

 * macOS 26.6.2 / Darwin 25.6.0
 * Apple Silicon arm64
 * MacPorts 2.12.6
 * Xcode / CLT 26.6
 * Gmsh tested with `+accelerate+gfortran`

 There appear to be two issues with the current `science/gmsh` Portfile.

 First, the stock Portfile passes `BLAS_LAPACK_LIBRARIES` through the
 `linear_algebra` PortGroup, but Gmsh 4.15.x defaults to Eigen enabled and
 direct BLAS/LAPACK disabled. As a result, CMake reports that
 `BLAS_LAPACK_LIBRARIES` is unused, and the shared Gmsh library fails to
 link on arm64 with unresolved BLAS symbols including:


 {{{
 _daxpy_
 _dnrm2_
 _dtrsv_
 }}}


 Adding:

 {{{
 -DENABLE_EIGEN=OFF
 -DENABLE_BLAS_LAPACK=ON
 }}}

 makes configuration detect:

 {{{
 Blas[custom]
 Lapack[custom]
 }}}

 and allows the build to complete using Accelerate.

 However, with the current:

 {{{
 -DENABLE_SYSTEM_CONTRIB=ON
 }}}

 the Gmsh test suite reproducibly fails 4 of 131 tests:

 {{{
 82  tutorials/t12.geo   Bus error
 83  tutorials/t13.geo   SEGFAULT
 103 t12_cpp             Bus error
 122 x2_cpp              Subprocess killed
 }}}

 I reproduced the same four failures with both Gmsh 4.15.0 and 4.15.2.

 For 4.15.2, changing only:

 {{{
 -DENABLE_SYSTEM_CONTRIB=ON
 }}}

 to:
 {{{
 -DENABLE_SYSTEM_CONTRIB=OFF
 }}}

 while retaining:

 {{{
 -DENABLE_EIGEN=OFF
 -DENABLE_BLAS_LAPACK=ON
 -DENABLE_GETDP=OFF
 }}}

 causes all 131 tests to pass.

 The configuration then uses bundled versions of several contrib libraries,
 including:

 {{{
 ALGLIB[contrib]
 ANN[contrib]
 Gmm[contrib]
 MathEx[contrib]
 Metis[contrib]
 Voro++[contrib]
 }}}

 while still using:

 {{{
 Blas[custom]
 Lapack[custom]
 }}}

 through Accelerate.

 The difference is particularly dramatic for `x2_cpp`: with
 `SYSTEM_CONTRIB=ON` it runs for about 88 seconds before being killed; with
 `SYSTEM_CONTRIB=OFF` it passes in about 0.67 seconds.

 The official upstream Gmsh 4.15.2 MacOSARM binary also successfully runs
 the corresponding `t12.geo` and `t13.geo` cases on the same machine, so
 this appears to be associated with the MacPorts build/dependency
 configuration rather than an Apple Silicon incompatibility in Gmsh itself.

 I have not yet isolated which individual system contrib library causes the
 failures. GMM may be worth investigating because the failing tests
 exercise compound/discrete-surface parametrization, but
 `ENABLE_SYSTEM_CONTRIB=OFF` changes several dependencies at once, so I do
 not want to attribute the problem to a specific library without further
 testing.

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


More information about the macports-tickets mailing list