Skip to content

Commit

Permalink
Add argp-standalone as a build dependency when building in macosx
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Dias <[email protected]>
  • Loading branch information
rjd15372 committed Jan 9, 2025
1 parent ac868bd commit 9513c43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9513c43

Please sign in to comment.