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

编译 snappy java 1.0.4.1 出现 error #567

Open
jinchengcheng opened this issue Mar 8, 2024 · 1 comment
Open

编译 snappy java 1.0.4.1 出现 error #567

jinchengcheng opened this issue Mar 8, 2024 · 1 comment

Comments

@jinchengcheng
Copy link

在麒麟v10 arm系统上编译snappy java 1.0.4.1,尝试了gcc7,gcc9,gcc10,出现如下错误:
g++ -I/usr/local/jdk/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -Ilib/include -I"/usr/local/jdk/include/linux" -Itarget/snappy-1.0.4 -fPIC -o target/snappy-1.0.4-Default/libsnappyjava.so target/snappy-1.0.4-Default/snappy-sinksource.o target/snappy-1.0.4-Default/snappy-stubs-internal.o target/snappy-1.0.4-Default/snappy.o target/snappy-1.0.4-Default/SnappyNative.o -shared -static
/usr/bin/ld: /lib/../lib64/libc.a(setjmp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol __pointer_chk_guard_local' which may bind externally can not be used when making a shared object; recompile with -fPIC /lib/../lib64/libc.a(setjmp.o): in function __sigsetjmp':
(.text+0x34): dangerous relocation: unsupported relocation
/usr/bin/ld: /lib/../lib64/libc.a(setjmp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol __pointer_chk_guard_local' which may bind externally can not be used when making a shared object; recompile with -fPIC (.text+0x5c): dangerous relocation: unsupported relocation /usr/bin/ld: /lib/../lib64/libc.a(__longjmp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol __pointer_chk_guard_local' which may bind externally can not be used when making a shared object; recompile with -fPIC
/lib/../lib64/libc.a(__longjmp.o): in function __longjmp': (.text+0x18): dangerous relocation: unsupported relocation /usr/bin/ld: /lib/../lib64/libc.a(__longjmp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol __pointer_chk_guard_local' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text+0x3c): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make: *** [Makefile:52: target/snappy-1.0.4-Default/libsnappyjava.so] Error 1

@stelemate
Copy link

Makefile:
LINKFLAGS:=-shared -fPIC
$(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
$(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -L/usr/lib64 -lc
$(STRIP) $@

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