You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/13 21:21:22 UTC
[GitHub] [pulsar] Y-Tian opened a new issue #8251: Can't build or get the pulsar-client-go module
Y-Tian opened a new issue #8251:
URL: https://github.com/apache/pulsar/issues/8251
**Describe the bug**
Can't import or go-get the pulsar-client-go module to my go application.
**To Reproduce**
Steps to reproduce the behavior:
1. `import ("github.com/apache/pulsar/pulsar-client-go/pulsar")`
2. build the binary `CGO_ENABLED=0 GOOS=linux go build .`
**Expected behavior**
Expected to see no issues during the build, but instead ran into:
```
Step 8/14 : RUN CGO_ENABLED=0 GOOS=linux go build ./core/*
---> Running in 03166c9fc6a2
# github.com/apache/pulsar/pulsar-client-go/pulsar
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/client.go:29:9: undefined: newClient
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/client.go:37:9: undefined: newAuthenticationToken
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/client.go:42:9: undefined: newAuthenticationTokenSupplier
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/client.go:47:9: undefined: newAuthenticationTLS
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/client.go:52:9: undefined: newAuthenticationAthenz
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/message.go:88:9: undefined: deserializeMessageId
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/message.go:93:30: undefined: earliestMessageID
/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/message.go:96:28: undefined: latestMessageID
The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux go build ./core/*' returned a non-zero code: 2
```
**Additional Context**
Running go-get doesn't work either:
```
go get -u github.com/apache/pulsar/pulsar-client-go/pulsar
go: finding github.com/apache/pulsar/pulsar-client-go latest
go: finding golang.org/x/sys latest
# github.com/apache/pulsar/pulsar-client-go/pulsar
In file included from /home/tony/go/pkg/mod/github.com/apache/pulsar/pulsar-client-go@v0.0.0-20201013171758-edf09443e288/pulsar/c_client.go:24:
./c_go_pulsar.h:22:10: fatal error: pulsar/c/client.h: No such file or directory
22 | #include <pulsar/c/client.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] flowchartsman commented on issue #8251: Can't build or go-get the pulsar-client-go module
Posted by GitBox <gi...@apache.org>.
flowchartsman commented on issue #8251:
URL: https://github.com/apache/pulsar/issues/8251#issuecomment-708068658
You appear to be attempting to build a module which requires CGo while explicitly disabling it with `CGO_ENABLED=0` You may be looking for `github.com/apache/pulsar-client-go`, which is pure-go, though it apparently does not have feature parity yet, so caveat emptor.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org