aloof-appointment-30987
01/16/2023, 4:50 PMconfluent-kafka-go
I'm having trouble building a go module that requires <http://github.com/confluentinc/confluent-kafka-go|github.com/confluentinc/confluent-kafka-go>
I'm using pants_version = "2.15.0rc1"
I have a single go.mod
file defined at the repos root.
When I attempt to run the go app
./pants run apps/go/greeter_en:greeter_en
I get the following error:
Engine traceback:
in `run` goal
in Package Go binary - apps/go/greeter_en:greeter_en
in Compile with Go - apps/go/greeter_en:go-package
in Compile with Go - <http://optios.com/pantsbuild/example-golang/libraries/go/greeter|optios.com/pantsbuild/example-golang/libraries/go/greeter>
in Compile with Go - <http://github.com/confluentinc/confluent-kafka-go/kafka|github.com/confluentinc/confluent-kafka-go/kafka>
ProcessExecutionFailure: Process 'Generate Go and C files from CGo files.' failed with exit code 1.
stdout:
stderr:
In file included from /private/var/folders/_d/zt8y2x055597l63bhdztp82c0000gn/T/pants-sandbox-Pjctus/gopath/pkg/mod/github.com/confluentinc/confluent-kafka-go@v1.9.2/kafka/00version.go:24:
gopath/pkg/mod/github.com/confluentinc/confluent-kafka-go@v1.9.2/kafka/select_rdkafka.h:26:10: fatal error: 'librdkafka_vendor/rdkafka.h' file not found
#include "librdkafka_vendor/rdkafka.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I can build and run the app using go tools.
from the repos root:
go mod tidy
cd apps/go/greeter_en
go build .
./greeter_en
The attached project demonstrates the above behavior.fast-nail-55400
01/16/2023, 5:22 PMfast-nail-55400
01/16/2023, 5:22 PMfast-nail-55400
01/16/2023, 5:23 PMaloof-appointment-30987
01/16/2023, 5:39 PMaloof-appointment-30987
01/16/2023, 5:59 PM