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

build problem on riscv64: undefined reference to `__atomic_fetch_or_1 #1283

Closed
novomesk opened this issue Mar 26, 2022 · 2 comments
Closed

Comments

@novomesk
Copy link
Contributor

Hello,
On Gentoo Linux on riscv64 architecture, we have problems to build libjxl.a

/usr/lib/gcc/riscv64-unknown-linux-gnu/11.2.1/../../../../riscv64-unknown-linux-gnu/bin/ld: lib/libjxl.a(dec_group_border.cc.o): in function `.L0 ':
dec_group_border.cc:(.text+0x158): undefined reference to `__atomic_fetch_and_1'

Complete build log:
build.log.txt

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Mar 27, 2022
Due to there is no 1, 2byte atomic instruction in 64bit RISC-V hardware,
the software layer have to emulate relavant function in atomic library

Let's explicitly pass -pthread here to work around pthread builtin since
glibc version 2.34
as the "-pthread" option will pull in libatomic for machines like RISC-V

Closes: https://bugs.gentoo.org/836125
Upstream: libjxl/libjxl#1283
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yixun Lan <dlan@gentoo.org>
@malaterre
Copy link
Contributor

#1128

@jonsneyers
Copy link
Member

Closing, should be resolved. Please reopen if needed.

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

No branches or pull requests

3 participants