-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build ADIOS2 with clang/gfortran #3253
Comments
Probably we need more information here. Maybe run "make VERBOSE=1" so we can see what is being compiled when this happens? |
I attach the complete configure and build output from Spack: |
@chuckatkins I don't see anything wrong in the cmake spec, but the build seems to be applying CMake_Fortran_FLAGS to C++ compilations when building the adios2_fortran bindings library (which is a mix of C++ and Fortran source). Possible cmake problem? |
I have since encountered a very similar problem in But what about this line in your target_compile_definitions(adios2_fortran PRIVATE "$<$<COMPILE_LANGUAGE:Fortran>:ADIOS2_HAVE_MPI_F>") Doesn't this declare |
I can't speak as authoritatively as others might, but i think the answer is that that line just adds -DADIOS2_HAVE_MPI_F to the command line for fortran compiles done in building adios2_fortran dependencies. I don't think it declares all the dependencies of adios2_fortran to be fortran source. CMake should infer what is fortran and what is C++ from the filename, unless you override that with something like: "set_source_files_properties(hello-world.f PROPERTIES LANGUAGE Fortran)" |
I am building ADIOS2 2.8.1 via Spack using clang @14.0.5 as C/C++ compiler and gfortran @11.1 as Fortran compiler. This fails when compiling the Fortran interface. The problem is that the flag
-fallow-argument-mismatch
is passed toclang++
, which fails.Note that I have configured ADIOS2 with MPItrampoline as MPI implementation. This library adds the flags
-fallow-argument-mismatch
and-fcray-pointers
to the Fortran flags. I do not think that this is relevant because many of ADIOS2 C/C++ source files have been successfully compiled at this time, without using these flags.I notice that
bindings/Fortran/CMakeLists.txt
definesadios2_fortran
as a list of Fortran source codes, although some of these files are instead C++ files.The text was updated successfully, but these errors were encountered: