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 · 5 comments
Closed

Linker issue on mipsel and armel architectures #515

pgrt opened this issue Jun 10, 2022 · 5 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.

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

2 participants