build: switch to autoreconf -W no-error + add macOS homebrew link dirs

Two CI fixes for v5.9.25-fork-detection run #471:

1. Windows Qt + daemon: build-libtor.sh ran ./autogen.sh which calls
   autoreconf with -W all,error. autoconf 2.73 (in MSYS2) added a new
   warning when AC_CHECK_FUNCS/AC_CHECK_HEADERS is called without a
   literal argument; under -W all,error this becomes a hard failure.
   Linux runners don't hit this because Ubuntu 22.04 ships autoconf 2.71.
   Fix: call 'autoreconf -i -f -W no-error' directly, skipping autogen.sh.

2. macOS Qt: -levent / -lssl / -lssl / -lz failed to resolve because
   Homebrew's /opt/homebrew/opt/{libevent,openssl@3,zlib}/lib paths
   aren't on the default linker search path. Configure step passes the
   include/lib paths to CMake but target_link_libraries uses bare -l,
   so the linker needs an explicit -L. Add target_link_directories
   under APPLE to inject the Homebrew lib dirs.

Both uncommitted worktree changes were in flight; this commit lands them.
This commit is contained in:
Krystie
2026-06-25 00:26:59 -07:00
parent 407355afb0
commit e07a90d7d1
2 changed files with 13 additions and 3 deletions
+10
View File
@@ -181,6 +181,16 @@ if(USE_TOR_EMBEDDED)
# OpenSSL objects that duplicate the DLL import lib already linked above.
# These GNU ld options are not supported on macOS (which uses lld) —
# guard with NOT APPLE so the build still works on macOS.
# On macOS, the libevent/openssl/zlib install paths are not on the
# default linker search path. Pull them in from the standard
# homebrew locations so -levent / -lssl / -lssl etc. resolve.
if(APPLE)
target_link_directories(triangles_common PUBLIC
/opt/homebrew/opt/libevent/lib
/opt/homebrew/opt/openssl@3/lib
/opt/homebrew/opt/zlib/lib
)
endif()
if(NOT APPLE)
target_link_libraries(triangles_common PUBLIC
-Wl,--allow-multiple-definition
+3 -3
View File
@@ -11,9 +11,9 @@ fi
cd "$TOR_SRC_DIR"
if [[ ! -x "./configure" ]]; then
echo "Running autogen.sh"
./autogen.sh
if [[ ! -x "./configure" ]] || [[ "${AUTORECONF_FORCE:-0}" == "1" ]]; then
echo "Running autoreconf with -W no-error (autogen.sh -W all,error is too strict for autoconf 2.73+)"
autoreconf -i -f -W no-error
fi
echo "Configuring Tor static library build from: $TOR_SRC_DIR"