Open dertin opened 6 years ago
I was able to get this working by manually editing the Makefile to output the ld
command.
@@ -7,7 +7,7 @@ ifeq ($(TARGET), sunos)
CFLAGS += -D_PTHREADS -D_POSIX_C_SOURCE=200112L
LIBS += -lsocket
else ifeq ($(TARGET), darwin)
- LDFLAGS += -pagezero_size 10000 -image_base 100000000
+ LDFLAGS += -pagezero_size 10000 -image_base 100000000 -v
Now running make
shows that this is the command which fails:
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -image_base 100000000 -macosx_version_min 10.13.0 -pagezero_size 10000 -o wrk -Lobj/lib -L/usr/local/opt/openssl/lib obj/wrk.o obj/net.o obj/ssl.o obj/aprintf.o obj/stats.o obj/script.o obj/units.o obj/ae.o obj/zmalloc.o obj/http_parser.o obj/bytecode.o obj/version.o -lluajit-5.1 -lpthread -lm -lcrypto -lssl -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.osx.a
I rearranged the two -L
lines, so that the openssl library path was before the local obj/lib path.
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -image_base 100000000 -macosx_version_min 10.13.0 -pagezero_size 10000 -o wrk -L/usr/local/opt/openssl/lib -Lobj/lib obj/wrk.o obj/net.o obj/ssl.o obj/aprintf.o obj/stats.o obj/script.o obj/units.o obj/ae.o obj/zmalloc.o obj/http_parser.o obj/bytecode.o obj/version.o -lluajit-5.1 -lpthread -lm -lcrypto -lssl -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.osx.a
This command successfully runs, and creates the working wrk
executable.
@robwil can show the final patch? Thanks!
System Version: macOS 10.13.4 (17E199) Kernel Version: Darwin 17.5.0 Openssl 1.0.2o_1