Tevic commented 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 -tags 
netgo -ldflags '-extldflags "-static"' hello.go
   
   ```

----------------------------------------------------------------
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

Reply via email to