Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65150 closed defect (fixed)

nginx @1.21.6+lua: undefined symbols

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.7.99
Keywords: Cc: Schamschula (Marius Schamschula)
Port: nginx

Description

Building with the +lua variant fails if the pcre2 port is installed:

sudo port -n build nginx +lua -fancyindex -flv -http2 -mp4 -secure_link -ssl -stream
:info:build Undefined symbols for architecture x86_64:
:info:build   "_pcre_assign_jit_stack", referenced from:
:info:build       _ngx_http_lua_ngx_re_gmatch in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ffi_compile_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_match_helper in ngx_http_lua_regex.o
:info:build   "_pcre_compile", referenced from:
:info:build       _ngx_http_lua_regex_compile in ngx_http_lua_regex.o
:info:build   "_pcre_dfa_exec", referenced from:
:info:build       _ngx_http_lua_ffi_exec_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_match_helper in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_gmatch_iterator in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_sub_helper in ngx_http_lua_regex.o
:info:build   "_pcre_exec", referenced from:
:info:build       _ngx_http_lua_ffi_exec_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_match_helper in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_gmatch_iterator in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_sub_helper in ngx_http_lua_regex.o
:info:build   "_pcre_free", referenced from:
:info:build       _ngx_http_lua_pcre_malloc_init in ngx_http_lua_pcrefix.o
:info:build       _ngx_http_lua_pcre_malloc_done in ngx_http_lua_pcrefix.o
:info:build   "_pcre_free_study", referenced from:
:info:build       _ngx_http_lua_ngx_re_gmatch in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ffi_compile_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ffi_destroy_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_match_helper in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_gmatch_cleanup in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_gmatch_iterator in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_sub_helper in ngx_http_lua_regex.o
:info:build       ...
:info:build   "_pcre_fullinfo", referenced from:
:info:build       _ngx_http_lua_ffi_compile_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_regex_compile in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_match_helper in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_gmatch_iterator in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_sub_helper in ngx_http_lua_regex.o
:info:build   "_pcre_jit_stack_alloc", referenced from:
:info:build       _ngx_http_lua_ffi_set_jit_stack_size in ngx_http_lua_regex.o
:info:build   "_pcre_jit_stack_free", referenced from:
:info:build       _ngx_http_lua_ffi_set_jit_stack_size in ngx_http_lua_regex.o
:info:build   "_pcre_malloc", referenced from:
:info:build       _ngx_http_lua_pcre_malloc_init in ngx_http_lua_pcrefix.o
:info:build       _ngx_http_lua_pcre_malloc_done in ngx_http_lua_pcrefix.o
:info:build      (maybe you meant: _ngx_http_lua_pcre_malloc_init, _ngx_http_lua_pcre_malloc_done )
:info:build   "_pcre_study", referenced from:
:info:build       _ngx_http_lua_ngx_re_gmatch in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ffi_compile_regex in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_match_helper in ngx_http_lua_regex.o
:info:build       _ngx_http_lua_ngx_re_sub_helper in ngx_http_lua_regex.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[1]: *** [objs/nginx] Error 1

Attachments (1)

main.log.bz2 (7.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 2 years ago.

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log.bz2 added

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: Schamschula added
Owner: set to neverpanic
Status: newassigned
Summary: nginx +lua: undefined symbolsnginx @1.21.6+lua: undefined symbols

comment:2 Changed 2 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

In b43fd96d1c1f09ae3c11c39e77218d38eba8296e/macports-ports (master):

nginx: Fix build failure with the +lua variant

The lua module doesn't support PCRE2, but nginx does. Attempting to link
them both doesn't seem to work very well. Use PCRE1 for both instead.

Closes: #65150

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

In bf80dad3ce605bd1ba19e553b3745cfb7827252b/macports-ports (master):

nginx: Make variants work again

The fix for #65150 had the unintended
consequence that the configure arguments from all variants were ignored.

In Tcl, "#" only starts a comment at the beginning of a line, so the "#
pcre2 breaks the lua module" comment was added to the configure args
literally. Configure args for the variants were added after that, but
because the shell recognizes "#" as a comment character anywhere in the
line, all those added configure args were ignored.

Note: See TracTickets for help on using tickets.