Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We depend on pthread but are not explicitly adding it to the cgo LDFLAGS.
It used to work well because most linkers add stub implementations for old pthread functions when pthread is not linked. Unfortunately,
pthread_setspecific
was (correctly) added in #122, and that function is not normally stubbed, producing a link error under some unusual Go build configurations (Go links to pthread by default when using cgo).See for example https://dev.azure.com/dnceng-public/public/_build/results?buildId=610701&view=logs&j=83130289-bc24-5ceb-b14e-d37ab0e8c945&t=77a3104e-0b46-5a5f-bd95-f1acb3049de6&l=634.
This PR adds the missing
pthread
entry in the#cgo LDFLAGS
directive.