google / ngx_brotli

NGINX module for Brotli compression
BSD 2-Clause "Simplified" License
2.1k stars 216 forks source link

Still "make[1]: Nothing to be done for 'modules'" after PR #153

Closed germebl closed 1 year ago

germebl commented 1 year ago

After the merge to master of this PR the issue is still the same as here.

When trying to compile for dynamically loading, the following error appears:

make -f objs/Makefile modules
make[1]: Entering directory '/opt/nginx-1.24.0'
make[1]: Nothing to be done for 'modules'.
make[1]: Leaving directory '/opt/nginx-1.24.0'
wyattoday commented 1 year ago

See the updated read me. The brotli dependency needs to be built first. The nginx “config files” are too simple to automate that.

hence a new separate step.

mitap13 commented 1 year ago
cannot find -lbrotlienc: No such file or directory
cannot find -lbrotlicommon: No such file or directory

I am also still getting the errors below when trying to dynamically add the module. There isn't any update on dynamically loading part of the readme. Am I missing something?

wyattoday commented 1 year ago

Just use the static modules. They’re faster and smaller.

or, if you’re determined to use the dynamic modules, build brotli first (see the static modules instructions)

germebl commented 1 year ago

or, if you’re determined to use the dynamic modules, build brotli first (see the static modules instructions)

that doesnt work. I've builded brotli first and then headed to dynamically loading and the issue is still the same: make[1]: Nothing to be done for 'modules on make modules.

cowsay1 commented 1 year ago

Everything works for me (building as dynamic module)

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

The only guess is that you don't have cmake and you didn't notice it. If no - full log please.

germebl commented 1 year ago

I think I had a typo somewhere. Now it actually works properly. Thank you.