-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Odd flang OpenMP Linking Behavior #113487
Comments
Note: C doesn't seem to be affected:
|
I think you're a victim of this: #112202. We need libatomic for some atomic operations. With the PR, Flang now recognizes this and automatically adds -latomic to the link line, when OpenMP is active and if it was configured to use the GCC runtime. If you setup Flang to work with the Clang C runtime, then the atomic operations should be included there and libatomic should not be needed. Flang uses -latomic and then relies on the default search path in the environment for libraries. BTW, before the PR, you would have seen a linker error barfing at missing symbols, when you have used certain atomic operations, e.g. CAS atomics. |
PS: Please try setting If not, please post the full output of |
Sadly, doesn't seem to help:
This is interesting. I mean, I see in there:
It just seems hellbent on finding it in Also, learned that apparently there is a |
Just quickly between meetings: It's the other way round. It's I'll have a look at the other things when I have a free minute today. Thanks for sharing the output! |
Well then. Time to scour my system for things (Makefiles, etc.) that have been looking for And thanks for looking. For now I can sort of "shove" CMake to be happy with:
Not portable, but I can keep going for now. |
All,
Last month, I built
flang-new
and I was able to build OpenMP code:However, I built
flang-new
as of yesterday and:Now, I do have
libatomic.so.1.2.0
and it was around when I builtflang-new
with GCC 12.1.0 but it's the GCC 12 one:and I have that in my
LD_LIBRARY_PATH
:but it is not in
/usr/lib64
:So if I build pointing to that:
My question is: why does
flang-new
seem to thinklibatomic
is in/usr/lib64
? The build couldn't have seen it there since it didn't exist there during the build. And it's not likeldd
wants it there:The text was updated successfully, but these errors were encountered: