gfortran: Only one '-J' option allowed
when attempting to build a CMake-based dependency?
#13015
Unanswered
golmschenk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I've been attempting to move a project from CMake to Meson, but I'm encountering an issue depending on an external CMake project. In particular, I’ve been attempting to use Meson’s CMake module to build the Fortran stdlib (https://github.com/fortran-lang/stdlib) as a CMake-based dependency. I run into an issue where the compiler (gfortran) ends up being called in an invalid way (with multiple
-J
options). I’m wondering if there’s just some Meson configuration I need to change. Or if there’s some part of the fortran_stdlib’s CMake configuration that makes it incompatible with Meson’s CMake module. Or something else.As a minimal example of this issue, I created a repository of an example that can be found here: https://github.com/golmschenk/meson_fortran_stdlib. However, it’s just two small files. The
meson.build
which looks like:And the
.wrap
file in thesubprojects
directory which explains to Meson where to find the fortran_stdlib source files:The resulting error during the build looks like:
with minor differences if I’m building it on another machine (this build was on macOS, but I encounter the same issue on a Linux machine). I also tried disabling testing for the build to see if it was only occurring for test files, but a similar error occurs later in such as case.
A while ago, I asked a similar question on the Fortran Discourse (https://fortran-lang.discourse.group/t/building-the-fortran-stdlib-with-meson/5942), but did not receive any responses. It's certainly possible this may be a fortran_stdlib issue and not a Meson issue, but I'm hoping someone on the Meson side will have seen something similar and be able to point me in the right direction.
If anyone has any suggestions of how I might be able to resolve this, I would greatly appreciate the help! Thank you for your time!
Beta Was this translation helpful? Give feedback.
All reactions