Comments (11)
Are you attempting to cross-compile it on osx?
That's not currently supported, I suggest you build it on a linux machine.
from confluent-kafka-go.
Poop, debian jesse only has librdkafka-dev 0.8.5-2, but we need 0.9.2+.
from confluent-kafka-go.
You sure do!
from confluent-kafka-go.
Hmm, with librdkafka-0.9.3 and a Docker environment, go build
says:
# export GOOS=linux
# export GOARCH=amd64
# go build
# github.datapipe.net/platform/brushpass/vendor/github.com/confluentinc/confluent-kafka-go/kafka
../../vendor/github.com/confluentinc/confluent-kafka-go/kafka/producer.go: In function 'do_produce':
../../vendor/github.com/confluentinc/confluent-kafka-go/kafka/producer.go:46:9: error: 'RD_KAFKA_V_END' undeclared (first use in this function)
RD_KAFKA_V_END);
^
../../vendor/github.com/confluentinc/confluent-kafka-go/kafka/producer.go:46:9: note: each undeclared identifier is reported only once for each function it appears in
# dpkg --list librdkafka-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=======================================-========================-========================-===================================================================================
ii librdkafka-dev:amd64 0.9.3-1 amd64 library implementing the Apache Kafka protocol (development headers)
Is there a possibility that librdkafka 0.9.3 breaks kafka-go?
from confluent-kafka-go.
That was an error in the Go client that was fixed recently:
80d7f30
Upgrade the client to latest master and it should work
from confluent-kafka-go.
Cheers, that patch is helpful.
Which git ref should we use to obtain librdkafka source, since v0.9.4 isn't tagged yet?
from confluent-kafka-go.
If you want a stable release you'll need to wait for 0.9.4 (probably within a month), otherwise be brave and use master (for development, PoC)
from confluent-kafka-go.
Note: Docker users can cross-compile to Linux by mounting source directory into a container, installing librdkafka-dev and Go, and compiling with go build --ldflags '-extldflags "-static"'
. This produces a Linux binary in the host directory, like ./cmd/<app>/<app>
. Or simply go build
, if dynamic linking is okay for some project.
Mac cGo binaries could theoretically be cross-compiled from non-Mac hosts by a Darwin virtual machine, though no idea what installing gcc / Xcode is like for Darwin.
If someone could produce a minimal Windows Vagrant box, that would help to make build bots.
Finally, if one day confluent-kafka-go replaced librdkafka with pure Go code, then cross-compilation would be as easy as tweaking the GOOS
, GOARCH
environment variables.
from confluent-kafka-go.
@mcandre Does this mean that go build -tags static
didn't work for you?
from confluent-kafka-go.
@edenhill go build
can't target GOOS=linux
from a Mac host when C dependencies are involved.
from confluent-kafka-go.
I'm facing same problem now.
skbaid$ make release OS=linux ARCH=amd64 VERSION=2.00.18
GOPATH=/Users/skbaid/GoglandProjects/abc-service-adapter GOARCH="amd64" GOOS="linux"
go build -ldflags "-w -s -X main.Version=2.00.18 -X main.Name=abc-service-adapter" -o bin/abc-service-adapter src/abc/main.go
go build github.com/confluentinc/confluent-kafka-go/kafka: build constraints exclude all Go files in /Users/skbaid/GoglandProjects/abc-service-adapter/src/github.com/confluentinc/confluent-kafka-go/kafka
make: *** [release] Error 1
has anyone found solution for this ?
from confluent-kafka-go.
Related Issues (20)
- [schema registry] - unsupported protocol scheme HOT 1
- admin.AlterConsumerGroupOffsets not working for existing consumer group with multiple topics HOT 8
- runc package is not updated in the go.mod file HOT 4
- pprof shows cpu usage hotspot
- flame graph shows hotspot for reading from producer events
- Extremely slow protobuf deserialization and serialization for schema registry HOT 5
- malformed DWARF TagVariable entry HOT 5
- [Knowledge gathering question] How does librdkafka creates and sends batches over the network to the broker? HOT 2
- Do we really need the `default case` in the consumer for loop
- Can't statically build binary with vendored library on arm64 musl HOT 2
- Multiple schema registry URLs does not seem to be supported
- Serialisation poor performance due to a lack of schema caching HOT 1
- Work with go gin error HOT 5
- Build and run binary return code 137 HOT 3
- What's the difference between `producer.Events()` chan and `deliverChan` HOT 2
- Add error handling for SubscribeTopics function call in consumer_example.go
- High memory usage with the `kafka.consumer`
- Increased memory usage with GetMetadata call
- Build fails on arm64 architecture HOT 1
- Feature Request: Support to specify `RecordNameStrategy`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from confluent-kafka-go.