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

Add -lssp to windows builds since zstd and zlib are built with stack protection #1184

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This is a feature release.
This is necessary to update test dependencies with security vulnerabilities.
Code using the library will still work with Go 1.17.
(#1136, @rzeijde).
* Windows builds are linked to `libssp` in addition to other libraries, since
the bundled zstd and zlib are built with `-fstack-protector`, and not linking
causes build failures. (#1184).

confluent-kafka-go is based on librdkafka v2.4.0, see the
[librdkafka v2.4.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.4.0)
Expand Down
2 changes: 1 addition & 1 deletion kafka/build_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package kafka

// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA -DLIBRDKAFKA_STATICLIB
// #cgo LDFLAGS: ${SRCDIR}/librdkafka_vendor/librdkafka_windows.a -lws2_32 -lsecur32 -lcrypt32
// #cgo LDFLAGS: ${SRCDIR}/librdkafka_vendor/librdkafka_windows.a -lws2_32 -lsecur32 -lcrypt32 -lssp
import "C"

// LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client
Expand Down