#6208·proxysql

TAP build and isolated test infra fail on arm64 build containers and macOS hosts

Author: renecannaoCreated Sep 17, 2026Updated Sep 17, 2026

Summary

Four independent problems stop the TAP tests from being built and run on an arm64 (aarch64) Linux build container or from a macOS host with Docker Desktop. CI runs on x86_64 Linux and hits none of them. Each needed a local workaround while working on #5905.

1. libtap.so fails to link on aarch64: vendored curl is not built with -fPIC

/usr/bin/ld: .../deps/curl/curl/lib/.libs/libcurl.a(libcurl_la-cfilters.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `Curl_cf_def_cntrl' which may bind externally can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:107: libtap.so] Error 1

deps/Makefile passes CFLAGS=-fPIC as an environment variable to curl's make. The Makefile generated by configure assigns CFLAGS itself, so the value is ignored and libcurl.a contains non-PIC objects. x86_64 tolerates this when linking libtap.so; aarch64 does not.

2. TAP test link requires the system libzstd

/usr/bin/ld: cannot find -lzstd: No such file or directory

On Linux, test/tap/tests/Makefile, test/tap/tests/unit/Makefile and test/deps/cluster_simulator/Makefile link -Wl,-Bdynamic -lzstd, which needs the distribution's libzstd-dev. The proxysql/packaging:build-* images do not ship it, while the proxysql binary already links the vendored deps/zstd/zstd/lib/libzstd.a.

3. SKIP_CLUSTER_START=1 times out on macOS hosts

>>> Starting ProxySQL container: proxysql.dev-... (cluster nodes: 0)
Waiting for proxysql.dev-...:6032 .. Ready.
Waiting for proxy-node1 (port 6042) .............................. TIMEOUT (node 1)

Host-side infra scripts loop with $(seq 1 "${NUM_NODES}"). GNU seq 1 0 prints nothing, but BSD seq on macOS counts down and prints 1 0.

4. Re-running start-proxysql-isolated.bash aborts on macOS hosts

chmod: changing permissions of './pgsql-sockets/.s.PGSQL.5432': Invalid argument

The script runs chmod -R 777 over ci_infra_logs/<INFRA_ID> in a helper container. That directory holds the PostgreSQL socket shared with the backend, and Docker Desktop file sharing rejects chmod on a socket. With set -e the script exits. This breaks the documented way to swap in a rebuilt binary without tearing down the backends.

Environment

  • Host: macOS (arm64), Docker Desktop 29.7.2, linux/arm64 VM
  • Build image: proxysql/packaging:build-debian12-v4.0.0
  • Branch: v3.0 (594ed7cd3)

Not included

test/tap/groups/test_makefile_dependencies.py fails 3 checks when run directly on macOS, because the system GNU Make 3.81 does not support the private target-specific modifier. It passes with GNU Make 4.3, and run-ci-lint.bash runs it on Linux in CI, so no change is proposed for that.