Tevic edited a comment on issue #3680: go static build error URL: https://github.com/apache/pulsar/issues/3680#issuecomment-468556225 I've figure out a workaround: 1.install the requirements for build cpp client 2.build cpp client, finally make install 3.download curl source build and install, with specific build flags: ``` ./configure --disable-shared --enable-static --disable-ldap --disable-sspi make make install ``` 4.build your go code use command like this: ``` CGO_CPPFLAGS="-I/usr/local/include -I/usr/include" CGO_LDFLAGS="-L/usr/local/lib -L/usr/lib -lcurl -lssl -lcrypto -lcrypto -lz -lpulsar -lstdc++ -lboost_system -lboost_regex -lprotobuf -ldl" go build -ldflags '-extldflags "-static"' hello.go ``` It is quite complex and is there any simple method?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
