🐛 fix: GLIBC version too low and linux default platform#21
Merged
SigureMo merged 1 commit intoPFCCLab:mainfrom Jul 16, 2025
Merged
🐛 fix: GLIBC version too low and linux default platform#21SigureMo merged 1 commit intoPFCCLab:mainfrom
GLIBC version too low and linux default platform#21SigureMo merged 1 commit intoPFCCLab:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
Fix build configuration to resolve GLIBC compatibility and default Linux wheel issues while reducing binary size.
- Updated Python platform mapping for Linux to manylinux_2_17 instead of musllinux_1_2.
- Disabled CGO and switched from
make buildto directgo buildwith-ldflags -s -wto shrink the binary by ~48%. - Removed
makedependency and added Git commit hash embedding in the build metadata.
Comments suppressed due to low confidence (1)
hatch_build.py:112
- [nitpick] Consider adding unit tests or a mocking strategy to verify that the Git commit hash is correctly retrieved and embedded, and to handle cases where
git rev-parsecould fail or return an empty string.
commit_hash = subprocess.run(
| "go", | ||
| "build", | ||
| "-ldflags", | ||
| f"-s -w -X 'main.version={version}' -X 'main.commit={commit_hash}'", |
There was a problem hiding this comment.
The single quotes around main.version and main.commit in the -X flags will be passed literally to the Go linker. Either remove the inner quotes or split the flags into separate arguments (e.g., -X, main.version=...) so the linker receives -X main.version=... correctly.
Suggested change
| f"-s -w -X 'main.version={version}' -X 'main.commit={commit_hash}'", | |
| f"-s -w -X main.version={version} -X main.commit={commit_hash}", |
SigureMo
approved these changes
Jul 16, 2025
GLIBC version too low and linux default platformGLIBC version too low and linux default platform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat
fix
GLIBC版本过低导致的问题(可能)is not a supported wheel on this platform.问题(仅限 Linux)