Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues when using latest version #1437

Closed
qrpike opened this issue Jul 26, 2019 · 6 comments
Closed

Build issues when using latest version #1437

qrpike opened this issue Jul 26, 2019 · 6 comments

Comments

@qrpike
Copy link

qrpike commented Jul 26, 2019

Sarama Version:
v1.23.0
Kafka Version:
Go Version:
1.12

Problem Description

We use Drone for building out applications, we have been using v1.19.0 for the longest time without any issues.

As soon as we try using the latest ( 1.23.0 ) when we try to start the application, we get:

standard_init_linux.go:190: exec user process caused "no such file or directory"

If we revert back to 1.19.0 it works fine.

We are using:

CGO_ENABLED=1 GOOS=linux go build -a -tags netgo -ldflags '-w' .

As the build command.

We are placing the binary into golang:1.12.4-alpine container.

@qrpike
Copy link
Author

qrpike commented Aug 5, 2019

Bump. Any help would be greatly appreciated.

@d1egoaz
Copy link
Contributor

d1egoaz commented Aug 21, 2019

does this also happen with v1.20... and up?
would be possible for you to look what's the file this log is complaining about:
standard_init_linux.go:190: exec user process caused "no such file or directory"

Starting Sarama v1.20.0, some initial and apparently incomplete support was added for Zstd
https://github.com/Shopify/sarama/releases/tag/v1.20.0
#1170
https://github.com/DataDog/zstd is just a wrapper using cgo, so, this is not pure go code.

but this doesn't seems that's your problem

@qrpike
Copy link
Author

qrpike commented Aug 22, 2019

Yes, this only seems to happen when I have CGO_ENABLED=1 if I set that to 0 it seems to build fine. ( like you said, Zstd library is a go wrapper of a C library )

We use Drone for builds, and it builds in docker image: golang:1.12.7 but the generated binary is placed into a golang:1.12.7-alpine container for deployment. Which works fine as long as there are no C libraries being built.

TLDR; I believe it is the Zstd pkg

@d1egoaz
Copy link
Contributor

d1egoaz commented Aug 22, 2019

Huh, it was this c dependency at the end 😞

So, you only have 3 options now right?

  • disable cgo
  • install zstd dependency
  • write a pure go zstd package (I was taking a look at this this week, seems there a few WIP, but not sure if they are ready to replace the datadog wrapper)

Let us know if we can give you additional help here.

I’d like in the future to remove any no pure go dependency form this code base.

@qrpike
Copy link
Author

qrpike commented Aug 22, 2019

I agree 100% having a pure go package is always really nice. I hope there is a implementation of Zstd in Go soon, we are using it in some places and the C deps make it cumbersome for building/deploying/portability.

I appreciate the help! I'll keep an eye on the zstd topic

@d1egoaz
Copy link
Contributor

d1egoaz commented Aug 22, 2019

I'm going to close the issue, if you still need more help, feel free to re-open it or create a new one.

@d1egoaz d1egoaz closed this as completed Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants