You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libzstd.a(zstd_compress.o): relocation R_X86_64_PC32 against symbol ZSTD_copySequencesToSeqStoreExplicitBlockDelim can not be used when making a shared object; recompile with -fPIC
#37
sudo apt install libzstd-dev
git clone https://github.com/tokers/zstd-nginx-module
wget https://nginx.org/download/nginx-1.27.1.tar.gz
tar xvf nginx-1.27.1.tar.gz
cd nginx-1.27.1
./configure --with-compat --add-dynamic-module=../zstd-nginx-module
make modules
make -f objs/Makefile modules
make[1]: Entering directory 'nginx-1.27.1'
cc -o objs/ngx_http_zstd_filter_module.so \
objs/addon/filter/ngx_http_zstd_filter_module.o \
objs/ngx_http_zstd_filter_module_modules.o \
-l:libzstd.a -l:libzstd.a -l:libzstd.a \
-shared
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libzstd.a(zstd_compress.o): warning: relocation against `ZSTD_copySequencesToSeqStoreNoBlockDelim' in read-only section `.text'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libzstd.a(zstd_compress.o): relocation R_X86_64_PC32 against symbol `ZSTD_copySequencesToSeqStoreExplicitBlockDelim' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:1527: objs/ngx_http_zstd_filter_module.so] Error 1
make[1]: Leaving directory 'nginx-1.27.1'
make: *** [Makefile:16: modules] Error 2
The text was updated successfully, but these errors were encountered:
I also encountered this problem on a new installed Ubuntu 24.04, but it can be successfully compiled on Ubuntu 22.04, so I copied the compiled files over from there and it looks like no problem.
sudo apt install libzstd-dev git clone https://github.com/tokers/zstd-nginx-module wget https://nginx.org/download/nginx-1.27.1.tar.gz tar xvf nginx-1.27.1.tar.gz cd nginx-1.27.1 ./configure --with-compat --add-dynamic-module=../zstd-nginx-module make modules
The text was updated successfully, but these errors were encountered: