-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation fails on macos big sur #108
Comments
I was preparing a PR for |
Oh sorry for the noise, the line before last spoiled it. I had already luajit from macports which took precedence in the includes, I fixed it by giving precedence to the local sources. A leave the patch here in case somebody will have the same issue From 58e1adbc9e08988d219a04abb73f1c23cb9e10a7 Mon Sep 17 00:00:00 2001
From: Marcello Seri <[email protected]>
Date: Thu, 22 Apr 2021 09:42:11 +0200
Subject: [PATCH] Update Makefile to give precedence to local sources
Signed-off-by: Marcello Seri <[email protected]>
---
Makefile | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index a537a68..e25d7e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,20 @@
-CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT
+FLAGS := -std=c99 -Wall -O2 -D_REENTRANT
LIBS := -lpthread -lm -lcrypto -lssl
TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
+SRC := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \
+ ae.c zmalloc.c http_parser.c tinymt64.c hdr_histogram.c
+BIN := wrk
+
+ODIR := obj
+OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
+
+LDIR = deps/luajit/src
+LIBS := -lluajit $(LIBS)
+CFLAGS += -I$(LDIR)
+LDFLAGS += -L$(LDIR)
+
ifeq ($(TARGET), sunos)
CFLAGS += -D_PTHREADS -D_POSIX_C_SOURCE=200112L
LIBS += -lsocket
@@ -11,8 +23,8 @@ else ifeq ($(TARGET), darwin)
# is not set then it's forced to 10.4, which breaks compile on Mojave.
export MACOSX_DEPLOYMENT_TARGET = $(shell sw_vers -productVersion)
LDFLAGS += -pagezero_size 10000 -image_base 100000000
- LIBS += -L/usr/local/opt/openssl/lib
- CFLAGS += -I/usr/local/include -I/usr/local/opt/openssl/include
+ LIBS += -L/opt/local/lib
+ CFLAGS += -I/usr/local/include -I/opt/local/include
else ifeq ($(TARGET), linux)
CFLAGS += -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE
LIBS += -ldl
@@ -22,18 +34,6 @@ else ifeq ($(TARGET), freebsd)
LDFLAGS += -Wl,-E
endif
-SRC := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \
- ae.c zmalloc.c http_parser.c tinymt64.c hdr_histogram.c
-BIN := wrk
-
-ODIR := obj
-OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
-
-LDIR = deps/luajit/src
-LIBS := -lluajit $(LIBS)
-CFLAGS += -I$(LDIR)
-LDFLAGS += -L$(LDIR)
-
all: $(BIN)
clean:
--
2.24.3 (Apple Git-128) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can see the failure below:
The last issue,
implicit declaration of function 'gettimeofday' is invalid in C99
can be fixed adding#include <sys/time.h>
, butI don't know howI was not able to find an immediate fix the other failures.The text was updated successfully, but these errors were encountered: