编译 snappy java 1.0.4.1 出现 error

Aperta
#567 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, java
Ambito
build-system

Direzione di ricerca

The report identifies a native build failure while linking libsnappyjava.so from target/snappy-1.0.4-Default on Kylin V10 ARM, with GCC 7, 9, and 10. Start by reading the Makefile rule at line 52 and examining why the link command uses -static; reproduce the build on the reported platform. Done means the shared library builds successfully without the relocation errors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

在麒麟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

Lingua principale
Java
Stelle
1.1k
Fork
261
Merge medio
2m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xerial/snappy-java

Tutte le issue di xerial/snappy-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.