kjdev / php-ext-zstd

Zstd Extension for PHP
MIT License
201 stars 27 forks source link

Dangerous reloaction #67

Closed jurisuk closed 4 months ago

jurisuk commented 4 months ago

When compiling from source using system library, upon make, I get this fatal error:

/usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libzstd.a(zstd_compress.o): in function `ZSTD_compressSequences':
zstd_compress.c:(.text+0x10abc): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libzstd.a(zstd_compress.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `ZSTD_copySequencesToSeqStoreNoBlockDelim' which may bind externally can not be used when making a shared object; recompile with -fPIC
zstd_compress.c:(.text+0x10c64): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libzstd.a(zstd_compress.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `ZSTD_copySequencesToSeqStoreExplicitBlockDelim' which may bind externally can not be used when making a shared object; recompile with -fPIC
zstd_compress.c:(.text+0x10c78): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libzstd.a(zstd_compress.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `ZSTD_copySequencesToSeqStoreExplicitBlockDelim' which may bind externally can not be used when making a shared object; recompile with -fPIC
zstd_compress.c:(.text+0x1116c): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make: *** [Makefile:215: zstd.la] Error 1
jurisuk commented 4 months ago

Oops. I see it. recompile with -fPIC Thanks.