-
Notifications
You must be signed in to change notification settings - Fork 578
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
CMake Fortran compiler detection fails #3694
Comments
@trilinos/framework How recent does Ninja need to be in order to work with Fortran? I remember this being an issue. @teamblubee Do you need Trilinos to have Fortran support? If not, you could just turn it off: |
Hi @mhoemmen I would like to make sure that the fortran compiler does work as it's newly open sourced and this is more testing as well as making sure that FreeBSD has fortran compiler that works with the native toolchain. I was just doing some more testing and it seems that it's the -E flag at the end that causes the compilation to fail. /usr/local/bin/flang -cpp -O -O2 -pipe -I/usr/local/include -I/usr/local/flang/include -I/usr/local/llvm60/include -I/usr/local/llvm60/lib/clang/6.0.1/include -fstack-protector -fno-strict-aliasing -E test.f -o hi just prints out the fortran sample code while removing the -E flag /usr/local/bin/flang -cpp -O -O2 -pipe -I/usr/local/include -I/usr/local/flang/include -I/usr/local/llvm60/include -I/usr/local/llvm60/lib/clang/6.0.1/include -fstack-protector -fno-strict-aliasing test.f -o hi creates a valid executable. I think this is an upstream CMAKE issue and not Trilinos issue. |
@teamblubee Does this work if you don't use Ninja and instead use the default back-end? This could be a Ninja + Fortran issue. |
Yes, building with -GUnix Makefiles works just fine; But I don't think that has anything to do with the Trilinos project, unless they'd be interested in looking into it further. quick edit |
Thanks for the info! I'll just pass this along to @trilinos/framework and see if there's a work-around. Good to know that you're using the updated Ninja. |
The -E is just asking for all the preprocessing to be done instead of a compile. The actual err is a file not found issue from the dependency system
I'm not sure why that would happen. |
@teamblubee @mhoemmen @prwolfe Can this issue be closed based on @prwolfe 's comment? |
yes please, it was solved upstream with cmake. |
@trilinos/
Expectations
Current Behavior
I am trying to use the Ninja generator to compile Trilinos using the newly open source Fortran compiler; Flang: https://github.com/flang-compiler/flang
The cmake test fails
but if I manually run the program and test it works
creating test program with the same contents of the above cmake command
save that as test.f
flang test.f
running
Possible Solution
properly detect flang compiler?
Your Environment
./configure -GNinja;
I already have the Kitware ninja fork that supports fortran.
Additional Information
The text was updated successfully, but these errors were encountered: