Additional note about CGO_ENABLED=0:
Upstream explicitly disabled CGO starting from 2.0. See the following commit: https://github.com/1Panel-dev/1Panel/pull/10891/commits/6e98d2a9c75bdaf0d827c14077421e921531224b
Commit message: "build(Makefile): disable CGO for static build"
This change adds CGO_ENABLED=0 to multiple build targets to ensure static linking across platforms, improving binary portability and runtime stability.
In my local build tests, if CGO_ENABLED is not explicitly set to 0, the compiled binaries consistently fail at runtime with linker-related errors.
Therefore, setting CGO_ENABLED=0 is not optional anymore, but a required build condition for 1Panel >= 2.0.
Pinned Comments
voxan24 commented on 2025-10-28 20:21 (UTC)
Hey, i don't speak a word of CN, please write in english i'm sorry about that :c