Add MUSL static binary build system using Alpine Docker
- Create Dockerfile.alpine-musl for truly portable static binaries - Update build_static.sh to use Docker with sudo fallback - Fix source code portability issues for MUSL: * Add missing headers in config.c, dm_admin.c * Remove glibc-specific headers in nip009.c, subscriptions.c - Update nostr_core_lib submodule with fortification fix - Add comprehensive documentation in docs/musl_static_build.md Binary characteristics: - Size: 7.6MB (vs 12MB+ for glibc static) - Dependencies: Zero (truly portable) - Compatibility: Any Linux distribution - Build time: ~2 minutes with Docker caching Resolves fortification symbol issues (__snprintf_chk, __fprintf_chk) that prevented MUSL static linking.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <cjson/cJSON.h>
|
||||
#include <libwebsockets.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user