From 9513c43950d169187f29a6b5e2b8a7a6b2d0391e Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Thu, 9 Jan 2025 14:49:44 +0000 Subject: [PATCH] Add `argp-standalone` as a build dependency when building in macosx Signed-off-by: Ricardo Dias --- .github/workflows/ci.yml | 3 +++ src/Makefile | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df3eaa19056..da9937bc187 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,9 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: test + run: | + brew install argp-standalone - name: make # Build with additional upcoming features run: make -j3 all-with-unit-tests SERVER_CFLAGS='-Werror' USE_FAST_FLOAT=yes diff --git a/src/Makefile b/src/Makefile index e52f4f08d30..eace7aea7c0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -181,6 +181,11 @@ else # Homebrew x86/ppc uses /usr/local as HOMEBREW_PREFIX OPENSSL_PREFIX?=/usr/local/opt/openssl endif + # GNU libc argp library needs to be installed with homebrew: + # `brew install argp-standalone` + FINAL_LIBS+= -largp + FINAL_LDFLAGS+= -L/opt/homebrew/lib + FINAL_CFLAGS+= -Iopt/homebrew/include else ifeq ($(uname_S),AIX) # AIX @@ -526,7 +531,7 @@ $(ENGINE_CLI_NAME): $(ENGINE_CLI_OBJ) # valkey-benchmark $(ENGINE_BENCHMARK_NAME): $(ENGINE_BENCHMARK_OBJ) - $(SERVER_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) $(TLS_CLIENT_LIBS) + $(SERVER_LD) $(FINAL_CFLAGS) $(FINAL_LDFLAGS) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) $(TLS_CLIENT_LIBS) DEP = $(ENGINE_SERVER_OBJ:%.o=%.d) $(ENGINE_CLI_OBJ:%.o=%.d) $(ENGINE_BENCHMARK_OBJ:%.o=%.d) -include $(DEP)