Link the protobuf stuff statically.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 29 Aug 2016 22:08:50 +0000 (00:08 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Nov 2018 10:17:41 +0000 (11:17 +0100)
src/Makefile

index 1a64e3d..525a01e 100644 (file)
@@ -550,7 +550,7 @@ GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)`
 %.pb.h %.pb.cc: %.proto
        $(PROTOC) -I $(PROTOS_PATH) --cpp_out=. $<
 
-LDFLAGS += -lprotobuf -lgrpc++_unsecure -lgrpc_unsecure -lgrpc
+LDFLAGS += -Wl,-Bstatic -Wl,-\( -lprotobuf -lgrpc++_unsecure -lgrpc_unsecure -lgrpc -lz -Wl,-\) -Wl,-Bdynamic -ldl
 
 client: $(CLIOBJS)
        $(CXX) -o $@ $(CLIOBJS) $(LDFLAGS)