Skip to content
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

Linker issue on mipsel and armel architectures #515

Closed
pgrt opened this issue Jun 10, 2022 · 7 comments
Closed

Linker issue on mipsel and armel architectures #515

pgrt opened this issue Jun 10, 2022 · 7 comments
Labels

Comments

@pgrt
Copy link

pgrt commented Jun 10, 2022

Hello,

In Debian, the build is failing on armel and mipsel with messages like
/usr/bin/ld: /usr/include/c++/11/bits/atomic_base.h:488: undefined reference to `__atomic_load_8'

I could solve this with the attached patch. Yet the issue is not showing up on other architectures: maybe you won't want to take it into account.

Best,
Pierre

linker_flags_for_armel_mipsel.txt

@pgrt pgrt added the bug label Jun 10, 2022
@bluescarni
Copy link
Member

@pgrt thanks for the report and apologies for the delay.

This seems the kind of things that would be better done on a case-by-case basis, rather than hard-coding it in the build system. Could you try to see if you can manage to achieve the same effect by using environment variables instead?

@bluescarni
Copy link
Member

I mean something like CFLAGS, CXXFLAGS, LDFLAGS and similar.

@pgrt
Copy link
Author

pgrt commented Sep 21, 2022

Hello,

No worry about the delay, really!
Thanks for the suggestions, I will give it a try very soon and have you informed!

Best,
Pierre

@pgrt
Copy link
Author

pgrt commented Sep 24, 2022

Hello again,
As you suggested, adding
-Wl,--push-state,--no-as-needed,-latomic,--pop-state
to LDFLAGS allows to build successfully on mipsel, without patching the CMakeLists.txt!

Best,
Pierre

@bluescarni
Copy link
Member

Hello again, As you suggested, adding -Wl,--push-state,--no-as-needed,-latomic,--pop-state to LDFLAGS allows to build successfully on mipsel, without patching the CMakeLists.txt!

Best, Pierre

Great to hear, I'll close the issue report then.

@josch
Copy link

josch commented Jul 22, 2024

Hi @pgrt -- I recently got to the bottom of the same undefined __atomic_load_8 linking error in vcmi which, like pagmo, also uses libtbb. Maybe pagmo, which also is a CMake project experiences the same issue? I reported it here: uxlfoundation/oneTBB#1454

@pgrt
Copy link
Author

pgrt commented Jul 23, 2024

HI @josch and thanks for having me informed! I saw your report and the discussions that held afterwards. let's see if a solution can come from libtbb then;

Best wishes,
Pierre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants