fortran-lang / minpack

Modernized Minpack: for solving nonlinear equations and nonlinear least squares problems
https://fortran-lang.github.io/minpack/
Other
90 stars 18 forks source link

C bindings broken on MacOS/Arm64 with GFortran 11 #54

Closed awvwgk closed 2 years ago

awvwgk commented 2 years ago

The C bindings pass a nested function as callback to allow the C API to carry along user data via an opaque pointer (void*). This mechanism is also used in the Python API to propagate exceptions storing the small object in a handle and pass it as void* to the Minpack C API.

This issue has been fixed for GCC 12, see https://github.com/iains/gcc-darwin-arm64/issues/26.

Potential workaround available in #30

awvwgk commented 2 years ago

Anyone around with a MacOS/Arm64 machine to test whether this is fixed with GCC 12?

cc @certik @Nicholaswogan

Nicholaswogan commented 2 years ago

Ya it is fixed with gfortran 11.3 (current homebrew version). Gfortran 12.1 also works.

awvwgk commented 2 years ago

Thanks, than we can close this issue as resolved.