Join the community today
Register Now

Nginx nginx + lua compile fails without stream module

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by atomi, Sep 29, 2026 at 5:24 AM.

  1. atomi

    atomi Member

    43
    11
    8
    Jul 14, 2018
    Ratings:
    +29
    Local Time:
    12:03 PM
    1.31.x
    10.6
    It seems that if you have disabled stream module in persistent config NGINX_STREAM='n' then lua compile seems to failing. If I remove that line from config then lua and nginx compile finishes.
    • CentOS Version: AlmaLinux 9
    • Centmin Mod Version Installed: 140.00beta01.b381
    • Nginx Version Installed: Tested with 1.31.6 and 1.30.5
    • When was last time updated Centmin Mod code base ? : Just before the compile
    • Persistent Config: Plenty, but I think here are the related lines
      Code (Text):
      ORESTY_LUANGINX='y'
      NGXDYNAMIC_LUA='y'
      NGINX_STREAM='n'
      

    Here is the part from log what hopefully shows the error:
    Code (Text):
    ccache /opt/rh/gcc-toolset-15/root/usr/bin/gcc -c -I/usr/local/nginx-dep/include/luajit-2.1 -I/usr/local/nginx-dep/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/opt/openssl-quic/include -I/usr/local/zlib-cf/include -I/usr/local/nginx-dep/include -m64 -march=native -DTCP_FASTOPEN=23  -fPIC -g -O3 -fstack-protector-strong -fuse-ld=mold --param=ssp-buffer-size=4 -Wformat -Wno-pointer-sign  -Wp,-D_FORTIFY_SOURCE=2 -std=gnu17 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR  -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I ../stream-lua-nginx-module-0.0.14/src/api -I ../ngx_devel_kit-0.3.2/objs -I objs/addon/ndk -I ../ngx_devel_kit-0.3.2/src -I ../ngx_devel_kit-0.3.2/objs -I objs/addon/ndk -I /usr/local/nginx-dep/include/luajit-2.1 -I ../lua-nginx-module-0.10.26/src/api -I ../zlib-cloudflare-1.4.0 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/http/v3 -I ../ngx_devel_kit-0.3.2/src -I /usr/local/nginx-dep/include/luajit-2.1 \
        -o objs/addon/src/ngx_stream_lua_api.o \
        ../stream-lua-nginx-module-0.0.14/src/ngx_stream_lua_api.c
    ccache /opt/rh/gcc-toolset-15/root/usr/bin/gcc -c -I/usr/local/nginx-dep/include/luajit-2.1 -I/usr/local/nginx-dep/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/opt/openssl-quic/include -I/usr/local/zlib-cf/include -I/usr/local/nginx-dep/include -m64 -march=native -DTCP_FASTOPEN=23  -fPIC -g -O3 -fstack-protector-strong -fuse-ld=mold --param=ssp-buffer-size=4 -Wformat -Wno-pointer-sign  -Wp,-D_FORTIFY_SOURCE=2 -std=gnu17 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR  -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I ../stream-lua-nginx-module-0.0.14/src/api -I ../ngx_devel_kit-0.3.2/objs -I objs/addon/ndk -I ../ngx_devel_kit-0.3.2/src -I ../ngx_devel_kit-0.3.2/objs -I objs/addon/ndk -I /usr/local/nginx-dep/include/luajit-2.1 -I ../lua-nginx-module-0.10.26/src/api -I ../zlib-cloudflare-1.4.0 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/http/v3 -I ../ngx_devel_kit-0.3.2/src -I /usr/local/nginx-dep/include/luajit-2.1 \
        -o objs/addon/src/ngx_stream_lua_request.o \
        ../stream-lua-nginx-module-0.0.14/src/ngx_stream_lua_request.c
    In file included from ../stream-lua-nginx-module-0.0.14/src/ngx_stream_lua_api.c:21:
    ../stream-lua-nginx-module-0.0.14/src/ngx_stream_lua_common.h:24:10: fatal error: ngx_stream.h: No such file or directory
       24 | #include <ngx_stream.h>
          |          ^~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [objs/Makefile:1834: objs/addon/src/ngx_stream_lua_api.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    ../stream-lua-nginx-module-0.0.14/src/ngx_stream_lua_request.c:9:10: fatal error: ngx_stream.h: No such file or directory
        9 | #include <ngx_stream.h>
          |          ^~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [objs/Makefile:1841: objs/addon/src/ngx_stream_lua_request.o] Error 1
    make[1]: Leaving directory '/svr-setup/nginx-1.30.5'
    make: *** [Makefile:10: build] Error 2
    
    real    0m44.587s
    user    1m6.312s
    sys    0m20.982s
    
    Mon Sep 28 07:27:02 PM BST 2026
    Error: 2, Nginx make failed
    


     
  2. eva2000

    eva2000 Administrator Staff Member

    59,870
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    7:03 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Thanks for bug report :)

    This is fixed in 140.00beta01, 132.00stable and 141.00beta01. The Lua stream module is now skipped automatically when NGINX_STREAM='n' or ORESTY_LUASTREAM='n', and HTTP Lua support (lua-nginx-module) stays enabled. You can keep NGINX_STREAM='n' in your persistent config.

    Run cmupdate, then re-run centmin.sh menu option 4

    Let me know if this fixes it :)