Open svillemot opened 7 months ago
The problem seems to come from method _find_library_real
of class CLikeCompiler
(from which the class FortranCompiler
is derived). That method calls method output_is_64bit
, which only works with C and C++ compilers (because it generates C code for testing).
Yup, looks like no one ever implemented the sizeof
, cross_sizeof
, or output_is_64bit
checks for Fortran. Neither of these look super hard to fix if you know Fortran (I don't), since it should be as simple as copying the CLike implementations, and replacing the C code with Fortran code. I'd be happy to review patches if someone wrote them
Consider the following minimal
meson.build
:(where
blas
can be replaced by any library with both a static.a
and a dynamic.so
version)If one tries to setup the project with
prefer_static=true
:Then it fails because meson feeds C code (instead of Fortran code) to the Fortran compiler. Here is the excerpt from
meson-log.txt
:The problem does not manifest with
-Dprefer_static=false
.Tested with meson 1.3.1-1 from Debian unstable amd64.