makefile broken #487

Open
opened 2026-01-29 20:44:45 +00:00 by claunia · 7 comments
Owner

Originally created by @albgen on GitHub (Oct 25, 2023).

hi,

just tried to compile the new nginx 1.25.3 with brotli but cannot

make -f objs/Makefile modules make[1]: Entering directory /usr/src/nginx-1.25.3'
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 ../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
../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 ../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../ngx_brotli/deps/brotli/c/../out -lbrotlienc -lbrotlicommon -lm
-shared
/usr/bin/ld: cannot find -lbrotlienc
/usr/bin/ld: cannot find -lbrotlicommon

collect2: error: ld returned 1 exit status
make[1]: *** [objs/ngx_http_brotli_filter_module.so] Error 1
make[1]: Leaving directory /usr/src/nginx-1.25.3'

Originally created by @albgen on GitHub (Oct 25, 2023). hi, just tried to compile the new nginx 1.25.3 with brotli but cannot `make -f objs/Makefile modules make[1]: Entering directory `/usr/src/nginx-1.25.3' 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 ../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 \ ../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 ../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../ngx_brotli/deps/brotli/c/../out -lbrotlienc -lbrotlicommon -lm \ -shared **/usr/bin/ld: cannot find -lbrotlienc /usr/bin/ld: cannot find -lbrotlicommon** collect2: error: ld returned 1 exit status make[1]: *** [objs/ngx_http_brotli_filter_module.so] Error 1 make[1]: Leaving directory `/usr/src/nginx-1.25.3' `
Author
Owner

@kkumar326 commented on GitHub (Oct 28, 2023):

I'm also getting the same error. Did you find any workaround @albgen ?

@kkumar326 commented on GitHub (Oct 28, 2023): I'm also getting the same error. Did you find any workaround @albgen ?
Author
Owner

@albgen commented on GitHub (Oct 28, 2023):

It was faster sokution for me to use gzip so currently i have removed brotli from the nginx config

@albgen commented on GitHub (Oct 28, 2023): It was faster sokution for me to use gzip so currently i have removed brotli from the nginx config
Author
Owner

@vjick7 commented on GitHub (Oct 31, 2023):

The same problem. Does anyone find the solution?

@vjick7 commented on GitHub (Oct 31, 2023): The same problem. Does anyone find the solution?
Author
Owner

@kkumar326 commented on GitHub (Oct 31, 2023):

@vjick7 not yet. one way is to build by undoing new commits. it seems like it broke recently only so this might work.

@kkumar326 commented on GitHub (Oct 31, 2023): @vjick7 not yet. one way is to build by undoing new commits. it seems like it broke recently only so this might work.
Author
Owner

@vjick7 commented on GitHub (Oct 31, 2023):

I found out how to fix this issue.
Just run by instruction of https://github.com/google/ngx_brotli.

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

After that you can use dpkg-buildpackage -b -uc -us.

@vjick7 commented on GitHub (Oct 31, 2023): I found out how to fix this issue. Just run by instruction of https://github.com/google/ngx_brotli. 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 After that you can use dpkg-buildpackage -b -uc -us.
Author
Owner

@wyattoday commented on GitHub (Dec 14, 2023):

@vjick7

Yes, as I wrote in the readme. Better to link the actual source than to copy & paste it in a random issue or forum post. "Why?" you ask? So the canonical source can be referenced and updated when things inevitable change in the future.

@wyattoday commented on GitHub (Dec 14, 2023): @vjick7 [Yes, as I wrote in the readme.](https://github.com/google/ngx_brotli#installation) Better to link the actual source than to copy & paste it in a random issue or forum post. "Why?" you ask? So the canonical source can be referenced and updated when things inevitable change in the future.
Author
Owner

@pexcn commented on GitHub (Mar 18, 2024):

Temporary solution:

ln -s "$(find /usr/lib -type f -name "libbrotlienc*")" /usr/lib/libbrotlienc.so
ln -s "$(find /usr/lib -type f -name "libbrotlicommon*")" /usr/lib/libbrotlicommon.so
@pexcn commented on GitHub (Mar 18, 2024): Temporary solution: ```sh ln -s "$(find /usr/lib -type f -name "libbrotlienc*")" /usr/lib/libbrotlienc.so ln -s "$(find /usr/lib -type f -name "libbrotlicommon*")" /usr/lib/libbrotlicommon.so ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#487