Christoph Junghans

Results 55 comments of Christoph Junghans

With `flang` the error was: `undefined reference to '_gfortran_st_write'`, so a linking issue. With `flang-new` the error is: `error: code-generation is not available yet` @AlexisPerry any ideas?

`libgfortran.so.5` lives in `/usr/lib64`, which I thought is a default path, but let's try.

> Could you try FC="flang -L/path-to-gfortran-libs"? That didn't work either!

It seems the error happens during CMake's compiler check, so I think this is https://gitlab.kitware.com/cmake/cmake/-/issues/17346 again (cmake not liking spaces in `FC`), so let's try to split this into two...

> It looks to me like this workaround works for some setups but not others, specifically fedora clang++ builds. From what I can tell, it looks like the environment variable...

Ok, the splitting worked, but now we are back to: ``` [100%] Linking CXX executable example /usr/bin/ld: CMakeFiles/example.dir/foo.f.o: in function `print_fortran_': flang_unparsed_file_bf4473059c12_0.f90:(.text+0x3f): undefined reference to `_gfortran_st_write' /usr/bin/ld: flang_unparsed_file_bf4473059c12_0.f90:(.text+0x58): undefined reference...

Update: the issue is that the `example` executable is mixing C++ and F90 code and hence cmake is using `CXX` for linking, which then doesn't automatically add `-lgfortran`. That is...

Now it fails with: ``` [100%] Linking Fortran executable example /usr/bin/ld: CMakeFiles/example.dir/cmake_example.cpp.o: in function `Kokkos::Impl::OpenMPExec::get_thread_data() const': cmake_example.cpp:(.text._ZNK6Kokkos4Impl10OpenMPExec15get_thread_dataEv[_ZNK6Kokkos4Impl10OpenMPExec15get_thread_dataEv]+0x15): undefined reference to `omp_get_level' /usr/bin/ld: cmake_example.cpp:(.text._ZNK6Kokkos4Impl10OpenMPExec15get_thread_dataEv[_ZNK6Kokkos4Impl10OpenMPExec15get_thread_dataEv]+0x1e): undefined reference to `omp_get_thread_num' ``` which means...

Update: the missing libomp linkage goes wrong somewhere in the guts of Tribits, I think I fixed it now, but only the CI will know. Hence CC'ing @bartlettroscoe I still...

With #4105 merged, let's try again.