Brotli 1.1.0 NginX #484

Closed
opened 2026-01-29 20:44:41 +00:00 by claunia · 3 comments
Owner

Originally created by @emperorsathis on GitHub (Sep 20, 2023).

Hi, I think the new Brotli version breaks the makefile configure settings. I run the following command to install Brotli on my webserver.

cd /tmp

sudo dnf install git pcre-devel -y

curl -LO http://nginx.org/download/nginx-1.25.2.tar.gz
tar xzvf nginx-1.25.2.tar.gz
cd nginx-1.25.2
sudo git clone https://github.com/google/ngx_brotli --recursive --branch 1.0.9
sudo ./configure --with-compat --add-dynamic-module=/tmp/nginx-1.25.2/ngx_brotli

sudo make modules

I get this error instead:

cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-deprecated-declarations -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I /tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/include -I objs -I src/http -I src/http/modules
-o objs/addon/filter/ngx_http_brotli_filter_module.o
/tmp/nginx-1.25.2/ngx_brotli/filter/ngx_http_brotli_filter_module.c
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-deprecated-declarations -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I /tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/include -I objs -I src/http -I src/http/modules
-o objs/ngx_http_brotli_filter_module_modules.o
objs/ngx_http_brotli_filter_module_modules.c
cc -o objs/ngx_http_brotli_filter_module.so
objs/addon/filter/ngx_http_brotli_filter_module.o
objs/ngx_http_brotli_filter_module_modules.o
-L/tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/../out -lbrotlienc -lbrotlicommon -lm
-shared
/usr/bin/ld: cannot find -lbrotlienc: No such file or directory
/usr/bin/ld: cannot find -lbrotlicommon: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:1219: objs/ngx_http_brotli_filter_module.so] Error 1
make[1]: Leaving directory '/tmp/nginx-1.25.2'
make: *** [Makefile:16: modules] Error 2

This worked with Brotli 1.0.9

Thanks!

Originally created by @emperorsathis on GitHub (Sep 20, 2023). Hi, I think the new Brotli version breaks the makefile configure settings. I run the following command to install Brotli on my webserver. cd /tmp sudo dnf install git pcre-devel -y curl -LO http://nginx.org/download/nginx-1.25.2.tar.gz tar xzvf nginx-1.25.2.tar.gz cd nginx-1.25.2 sudo git clone https://github.com/google/ngx_brotli --recursive --branch 1.0.9 sudo ./configure --with-compat --add-dynamic-module=/tmp/nginx-1.25.2/ngx_brotli sudo make modules I get this error instead: cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-deprecated-declarations -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I /tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/include -I objs -I src/http -I src/http/modules \ -o objs/addon/filter/ngx_http_brotli_filter_module.o \ /tmp/nginx-1.25.2/ngx_brotli/filter/ngx_http_brotli_filter_module.c cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-deprecated-declarations -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I /tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/include -I objs -I src/http -I src/http/modules \ -o objs/ngx_http_brotli_filter_module_modules.o \ objs/ngx_http_brotli_filter_module_modules.c cc -o objs/ngx_http_brotli_filter_module.so \ objs/addon/filter/ngx_http_brotli_filter_module.o \ objs/ngx_http_brotli_filter_module_modules.o \ -L/tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/../out -lbrotlienc -lbrotlicommon -lm \ -shared /usr/bin/ld: cannot find -lbrotlienc: No such file or directory /usr/bin/ld: cannot find -lbrotlicommon: No such file or directory collect2: error: ld returned 1 exit status make[1]: *** [objs/Makefile:1219: objs/ngx_http_brotli_filter_module.so] Error 1 make[1]: Leaving directory '/tmp/nginx-1.25.2' make: *** [Makefile:16: modules] Error 2 This worked with Brotli 1.0.9 Thanks!
Author
Owner

@ryanellis commented on GitHub (Sep 21, 2023):

Also experiencing the same issue with Ubuntu 22.04 Nginx 1.18; and Ubuntu 20.04

@ryanellis commented on GitHub (Sep 21, 2023): Also experiencing the same issue with Ubuntu 22.04 Nginx 1.18; and Ubuntu 20.04
Author
Owner

@emperorsathis commented on GitHub (Sep 21, 2023):

Also experiencing the same issue with Ubuntu 22.04 Nginx 1.18; and Ubuntu 20.04

How do I fix this?

Or what's the git clone command for version 1.0.9 instead of the latest version?

@emperorsathis commented on GitHub (Sep 21, 2023): > Also experiencing the same issue with Ubuntu 22.04 Nginx 1.18; and Ubuntu 20.04 How do I fix this? Or what's the git clone command for version 1.0.9 instead of the latest version?
Author
Owner

@emperorsathis commented on GitHub (Sep 21, 2023):

This command worked, be sure to be in root first running it.

git clone --recurse-submodules -j8 https://github.com/google/ngx_brotli
cd ngx_brotli/deps/brotli
mkdir out && cd out
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..
cmake --build . --config Release --target brotlienc
cd ../../../..

./configure --with-compat --add-dynamic-module=/tmp/nginx-1.25.2/ngx_brotli
make modules

Thanks!

@emperorsathis commented on GitHub (Sep 21, 2023): This command worked, be sure to be in root first running it. git clone --recurse-submodules -j8 https://github.com/google/ngx_brotli cd ngx_brotli/deps/brotli mkdir out && cd out cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. cmake --build . --config Release --target brotlienc cd ../../../.. ./configure --with-compat --add-dynamic-module=/tmp/nginx-1.25.2/ngx_brotli make modules Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#484