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 error on aarch64 :unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17' #66

Open
fubingting opened this issue Nov 19, 2024 · 2 comments

Comments

@fubingting
Copy link

platform:aarch64
version:2.6.0
cmd :
autoconf
./configure CFLAGS="-fPIC"
make
error log:

/home/spack/lib/spack/env/gcc/gcc -shared -rdynamic -Wl,-soname,libjlog.so.2 -o libjlog.so jlog.lo jlog_hash.lo jlog_io.lo jlog_compress.lo -fPIC -Wall -Wno-int-to-pointer-cast -Werror -D_GNU_SOURCE -D_REENTRANT  -lpthread
/usr/bin/ld: jlog.lo: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: jlog.lo(.text+0x315c): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
/usr/bin/ld: final link failed: Bad value

In version 2.5.4, the compilation is successful when the -fPIC option is used. In version 2.6.0, the preceding error is reported.

@esproul
Copy link
Member

esproul commented Dec 4, 2024

@fubingting what OS/distro were you running when the error occurred?

@fubingting
Copy link
Author

@fubingting what OS/distro were you running when the error occurred?

centos8.2

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

2 participants