Opened 3 years ago

Closed 3 years ago

#63295 closed defect (fixed)

mod_security2 @2.9.4: build fails due to multiple undefined symbols for architecture x86_64

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: bigsur Cc: Schamschula (Marius Schamschula)
Port: mod_security2

Description

There are a lot of these:

/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/clang -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -I/opt/local/include -I/opt/local/include/apache2 -I/opt/local/include -DWITH_CURL_SSLVERSION_TLSv1_2 -DWITH_CURL -I/opt/local/include/libxml2 -DWITH_LUA -I/opt/local/include/lua-5.1 -DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500  -DREQUEST_EARLY                    -DWITH_REMOTE_RULES -I/opt/local/include -DWITH_YAJL -I/opt/local/include/yajl -DWITH_SSDEEP -I/opt/local/include -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64  -I/opt/local/include/apr-1 -I/opt/local/include -module -avoid-version -lpthread -L/opt/local/lib/db48 -L/opt/local/lib   -ldb-4.8   -lexpat -liconv -I/opt/local/include/libxml2 -L/opt/local/lib/lua-5.1 -L/opt/local/lib -L/opt/local/lib -lfuzzy -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -o mod_security2.la -rpath /opt/local/lib mod_security2_la-acmp.lo mod_security2_la-apache2_config.lo mod_security2_la-apache2_io.lo mod_security2_la-apache2_util.lo libinjection/mod_security2_la-libinjection_html5.lo libinjection/mod_security2_la-libinjection_sqli.lo libinjection/mod_security2_la-libinjection_xss.lo mod_security2_la-mod_security2.lo mod_security2_la-modsecurity.lo mod_security2_la-msc_status_engine.lo mod_security2_la-msc_crypt.lo mod_security2_la-msc_geo.lo mod_security2_la-msc_gsb.lo mod_security2_la-msc_json.lo mod_security2_la-msc_logging.lo mod_security2_la-msc_lua.lo mod_security2_la-msc_multipart.lo mod_security2_la-msc_parsers.lo mod_security2_la-msc_pcre.lo mod_security2_la-msc_release.lo mod_security2_la-msc_remote_rules.lo mod_security2_la-msc_reqbody.lo mod_security2_la-msc_tree.lo mod_security2_la-msc_unicode.lo mod_security2_la-msc_util.lo mod_security2_la-msc_xml.lo mod_security2_la-persist_dbm.lo mod_security2_la-re_actions.lo mod_security2_la-re.lo mod_security2_la-re_operators.lo mod_security2_la-re_tfns.lo mod_security2_la-re_variables.lo -L/opt/local/lib -R/opt/local/lib -lapr-1 -L/opt/local/lib -R/opt/local/lib -laprutil-1 -L/opt/local/lib -lcurl -I/opt/local/include/libxml2 -L/opt/local/lib -lxml2 -L/opt/local/lib -lz -L/opt/local/lib -llzma -lpthread -liconv -L/opt/local/lib -licui18n -licuuc -licudata -lm -llua-5.1 -lm -L/opt/local/lib -lpcre -lyajl 
libtool: link: /usr/bin/clang  -o .libs/mod_security2.so -bundle  .libs/mod_security2_la-acmp.o .libs/mod_security2_la-apache2_config.o .libs/mod_security2_la-apache2_io.o .libs/mod_security2_la-apache2_util.o libinjection/.libs/mod_security2_la-libinjection_html5.o libinjection/.libs/mod_security2_la-libinjection_sqli.o libinjection/.libs/mod_security2_la-libinjection_xss.o .libs/mod_security2_la-mod_security2.o .libs/mod_security2_la-modsecurity.o .libs/mod_security2_la-msc_status_engine.o .libs/mod_security2_la-msc_crypt.o .libs/mod_security2_la-msc_geo.o .libs/mod_security2_la-msc_gsb.o .libs/mod_security2_la-msc_json.o .libs/mod_security2_la-msc_logging.o .libs/mod_security2_la-msc_lua.o .libs/mod_security2_la-msc_multipart.o .libs/mod_security2_la-msc_parsers.o .libs/mod_security2_la-msc_pcre.o .libs/mod_security2_la-msc_release.o .libs/mod_security2_la-msc_remote_rules.o .libs/mod_security2_la-msc_reqbody.o .libs/mod_security2_la-msc_tree.o .libs/mod_security2_la-msc_unicode.o .libs/mod_security2_la-msc_util.o .libs/mod_security2_la-msc_xml.o .libs/mod_security2_la-persist_dbm.o .libs/mod_security2_la-re_actions.o .libs/mod_security2_la-re.o .libs/mod_security2_la-re_operators.o .libs/mod_security2_la-re_tfns.o .libs/mod_security2_la-re_variables.o   -L/opt/local/lib/db48 -L/opt/local/lib -ldb-4.8 -lexpat -L/opt/local/lib/lua-5.1 -lfuzzy -lapr-1 -laprutil-1 -lcurl -lxml2 -lz -llzma -lpthread -liconv -licui18n -licuuc -licudata -llua-5.1 -lm -lpcre -lyajl  -Os -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64  
ld: warning: dylib (/opt/local/lib/libfuzzy.dylib) was built for newer macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/db48/libdb-4.8.dylib) was built for newer macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libicui18n.dylib) was built for newer macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libicuuc.dylib) was built for newer macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libicudata.dylib) was built for newer macOS version (11.2) than being linked (11.0)
Undefined symbols for architecture x86_64:
  "_ap_add_cgi_vars", referenced from:
      _apache2_exec in mod_security2_la-apache2_util.o
  "_ap_add_common_vars", referenced from:
      _apache2_exec in mod_security2_la-apache2_util.o
  "_ap_add_input_filter", referenced from:
      _hook_insert_filter in mod_security2_la-mod_security2.o
  "_ap_add_output_filter", referenced from:
      _hook_insert_filter in mod_security2_la-mod_security2.o
      _hook_insert_error_filter in mod_security2_la-mod_security2.o
  "_ap_add_version_component", referenced from:
      _hook_post_config in mod_security2_la-mod_security2.o
  "_ap_bucket_error_create", referenced from:
      _send_error_bucket in mod_security2_la-apache2_util.o
  "_ap_create_environment", referenced from:
      _apache2_exec in mod_security2_la-apache2_util.o
  "_ap_find_linked_module", referenced from:
      _perform_interception in mod_security2_la-mod_security2.o
      _var_remote_addr_generate in mod_security2_la-re_variables.o
  "_ap_get_brigade", referenced from:
      _input_filter in mod_security2_la-apache2_io.o
      _read_request_body in mod_security2_la-apache2_io.o
  "_ap_get_remote_host", referenced from:
      _var_remote_host_generate in mod_security2_la-re_variables.o
  "_ap_get_scoreboard_worker", referenced from:
      _hook_connection_early in mod_security2_la-mod_security2.o
  "_ap_get_scoreboard_worker_from_indexes", referenced from:
      _hook_connection_early in mod_security2_la-mod_security2.o
  "_ap_get_server_banner", referenced from:
      _hook_post_config in mod_security2_la-mod_security2.o
  "_ap_get_server_name", referenced from:
      _internal_log_ex in mod_security2_la-apache2_util.o
      _create_tx_context in mod_security2_la-mod_security2.o
  "_ap_get_status_line", referenced from:
      _output_filter in mod_security2_la-apache2_io.o
      _send_error_bucket in mod_security2_la-apache2_util.o
      _hook_log_transaction in mod_security2_la-mod_security2.o
  "_ap_getword_conf", referenced from:
      _msc_remote_invoke_cmd in mod_security2_la-msc_remote_rules.o
      _msc_remote_add_rules_from_uri in mod_security2_la-msc_remote_rules.o
  "_ap_hook_child_init", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_error_log", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_fixups", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_insert_error_filter", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_insert_filter", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_log_transaction", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_post_config", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_post_read_request", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_pre_config", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_hook_process_connection", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_log_cerror_", referenced from:
      _hook_connection_early in mod_security2_la-mod_security2.o
  "_ap_log_error_", referenced from:
      _input_filter in mod_security2_la-apache2_io.o
      _output_filter in mod_security2_la-apache2_io.o
      _hook_pre_config in mod_security2_la-mod_security2.o
      _hook_post_config in mod_security2_la-mod_security2.o
      _create_tx_context in mod_security2_la-mod_security2.o
      _msc_status_engine_call in mod_security2_la-msc_status_engine.o
      _update_rule_target_ex in mod_security2_la-re.o
      ...
  "_ap_log_perror_", referenced from:
      _cmd_default_action in mod_security2_la-apache2_config.o
      _cmd_read_state_limit in mod_security2_la-apache2_config.o
      _cmd_write_state_limit in mod_security2_la-apache2_config.o
  "_ap_log_rerror_", referenced from:
      _internal_log_ex in mod_security2_la-apache2_util.o
  "_ap_mpm_query", referenced from:
      _hook_post_config in mod_security2_la-mod_security2.o
  "_ap_open_piped_log", referenced from:
      _cmd_audit_log in mod_security2_la-apache2_config.o
      _cmd_audit_log2 in mod_security2_la-apache2_config.o
      _cmd_guardian_log in mod_security2_la-apache2_config.o
  "_ap_pass_brigade", referenced from:
      _output_filter in mod_security2_la-apache2_io.o
      _send_of_brigade in mod_security2_la-apache2_io.o
      _send_error_bucket in mod_security2_la-apache2_util.o
  "_ap_piped_log_write_fd", referenced from:
      _cmd_audit_log in mod_security2_la-apache2_config.o
      _cmd_audit_log2 in mod_security2_la-apache2_config.o
      _cmd_guardian_log in mod_security2_la-apache2_config.o
  "_ap_pregcomp", referenced from:
      _msre_op_rsub_param_init in mod_security2_la-re_operators.o
      _msre_op_rsub_execute in mod_security2_la-re_operators.o
  "_ap_random_pick", referenced from:
      _modsecurity_process_phase in mod_security2_la-modsecurity.o
  "_ap_regexec", referenced from:
      _msre_op_rsub_execute in mod_security2_la-re_operators.o
  "_ap_register_input_filter", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_register_output_filter", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_remove_input_filter", referenced from:
      _input_filter in mod_security2_la-apache2_io.o
  "_ap_remove_output_filter", referenced from:
      _output_filter in mod_security2_la-apache2_io.o
  "_ap_save_brigade", referenced from:
      _output_filter in mod_security2_la-apache2_io.o
  "_ap_server_config_defines", referenced from:
      _register_hooks in mod_security2_la-mod_security2.o
  "_ap_server_root_relative", referenced from:
      _cmd_audit_log in mod_security2_la-apache2_config.o
      _cmd_audit_log2 in mod_security2_la-apache2_config.o
      _cmd_audit_log_storage_dir in mod_security2_la-apache2_config.o
      _cmd_data_dir in mod_security2_la-apache2_config.o
      _cmd_debug_log in mod_security2_la-apache2_config.o
      _cmd_guardian_log in mod_security2_la-apache2_config.o
      _cmd_tmp_dir in mod_security2_la-apache2_config.o
      ...
  "_ap_unixd_set_global_mutex_perms", referenced from:
      _modsecurity_init in mod_security2_la-modsecurity.o
  "_core_module", referenced from:
      _perform_interception in mod_security2_la-mod_security2.o
  "_luaL_loadfilex", referenced from:
      _lua_compile in mod_security2_la-msc_lua.o
  "_luaL_setfuncs", referenced from:
      _lua_execute in mod_security2_la-msc_lua.o
  "_lua_getglobal", referenced from:
      _lua_execute in mod_security2_la-msc_lua.o
      _l_log in mod_security2_la-msc_lua.o
      _l_getvar in mod_security2_la-msc_lua.o
      _l_getvars in mod_security2_la-msc_lua.o
      _l_setvar in mod_security2_la-msc_lua.o
  "_lua_pcallk", referenced from:
      _lua_execute in mod_security2_la-msc_lua.o
  "_lua_rawlen", referenced from:
      _resolve_tfns in mod_security2_la-msc_lua.o
  "_lua_setglobal", referenced from:
      _lua_execute in mod_security2_la-msc_lua.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [mod_security2.la] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_security2/mod_security2/work/modsecurity-2.9.4/apache2'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_security2/mod_security2/work/modsecurity-2.9.4/apache2'
make: *** [all-recursive] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_security2/mod_security2/work/modsecurity-2.9.4'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_security2/mod_security2/work/modsecurity-2.9.4" && /usr/bin/make -j16 -w all 
Exit code: 2
Error: Failed to build mod_security2: command execution failed
DEBUG: Error code: CHILDSTATUS 89861 2

I'm on Big Sur with Xcode 12.5.1, btw.

Change History (2)

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

Keywords: bigsur added
Owner: set to ryandesign
Status: newaccepted

The portion of the log you pasted shows an invocation of libtool and does not show the use of the flag -undefined so this is probably the well-known macOS 11+ libtool bug.

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

Resolution: fixed
Status: acceptedclosed

In 9affa8ff6f0ed8803b7d49a784f64206e1ffef82/macports-ports (master):

mod_security2: Fix the macOS 11+ libtool bug

Closes: #63295

Note: See TracTickets for help on using tickets.