Skip to content

Conversation

@msva
Copy link

@msva msva commented Mar 26, 2017

// ping @agentzh, just in case 😸

@defanator
Copy link

@msva this PR is quite outdated and can't be applied to current master. Care to provide the fix?

@i2dcarrasco
Copy link

i2dcarrasco commented Sep 4, 2019

Hello,

How I can provide a fix for this?. I've modified my config to be compiled as dynamic module and looks like is working, but I'm not really a programmer and I don't know how to do it. Also the fix is very similar to this one (maybe just changing one line will work).

index f524267..7f52aa0 100644
--- a/config
+++ b/config
@@ -228,7 +228,7 @@ fi
 # ----------------------------------------
 
 ngx_addon_name=ngx_stream_lua_module
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
+STREAM_LUA_SRCS="$STREAM_LUA_SRCS \
                 $ngx_addon_dir/src/ngx_stream_lua_api.c \
                 $ngx_addon_dir/src/ngx_stream_lua_request.c \
                 $ngx_addon_dir/src/ngx_stream_lua_module.c \
@@ -274,7 +274,7 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
                 $ngx_addon_dir/src/ngx_stream_lua_input_filters.c \
                 "
 
-NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
+STREAM_LUA_DEPS="$STREAM_LUA_DEPS \
                 $ngx_addon_dir/src/ddebug.h \
                 $ngx_addon_dir/src/api/ngx_stream_lua_api.h \
                 $ngx_addon_dir/src/ngx_stream_lua_request.h \
@@ -316,7 +316,6 @@ NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
                 $ngx_addon_dir/src/ngx_stream_lua_input_filters.h \
                 "
 
-STREAM_MODULES="$STREAM_MODULES $ngx_addon_name"
 
 # ----------------------------------------
 
@@ -424,7 +423,23 @@ USE_SHA1=YES
 #NGX_DTRACE_PROVIDERS="$NGX_DTRACE_PROVIDERS $ngx_addon_dir/dtrace/ngx_lua_provider.d"
 #NGX_TAPSET_SRCS="$NGX_TAPSET_SRCS $ngx_addon_dir/tapset/ngx_lua.stp"
 
-CORE_INCS="$CORE_INCS $ngx_addon_dir/src/api"
-
 #CFLAGS=$"$CFLAGS -DLUA_DEFAULT_PATH='\"/usr/local/openresty/lualib/?.lua\"'"
 #CFLAGS=$"$CFLAGS -DLUA_DEFAULT_CPATH='\"/usr/local/openresty/lualib/?.so\"'"
+
+if test -n "$ngx_module_link"; then
+    ngx_module_type=STREAM
+    ngx_module_name="$ngx_addon_name"
+    ngx_module_deps="$STREAM_LUA_DEPS"
+    ngx_module_srcs="$STREAM_LUA_SRCS"
+
+    . auto/module
+else
+    STREAM_MODULES="$STREAM_MODULES $ngx_addon_name"
+    NGX_ADDON_SRCS="$NGX_ADDON_SRCS $STREAM_LUA_SRCS"
+    NGX_ADDON_DEPS="$NGX_ADDON_DEPS $STREAM_LUA_DEPS"
+
+    CORE_INCS="$CORE_INCS $ngx_module_incs"
+    CORE_LIBS="$CORE_LIBS $ngx_module_libs"
+fi
+
+CORE_INCS="$CORE_INCS $ngx_addon_dir/src/api"

Greetings!

@zhuizhuhaomeng
Copy link
Contributor

This PR didn't rebase to the latest master.

@msva
Copy link
Author

msva commented Feb 22, 2025

This PR didn't rebase to the latest master.

Well, I pressed corresponding button (resolve conflicts with master) in GH interface, and resolved conflicts 🤷

Maybe github got out of mind and did something wrong...

Okay then, I'll try to manually rebase tomorrow or next week

@zhuizhuhaomeng
Copy link
Contributor

The latest master branch support building as dynamic module.
I don't think this PR is needed.

@msva
Copy link
Author

msva commented Feb 23, 2025

ok then 👍

@msva msva closed this Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants