Loading packaging/build-nspawn.sh +7 −15 Original line number Diff line number Diff line Loading @@ -121,17 +121,14 @@ ensure_kernel_headers() { cp -a /usr/include/linux /usr/local/musl/include/ cp -a /usr/include/asm-generic /usr/local/musl/include/ # Find arch-specific asm headers using dpkg ASM_DIR=$(dpkg -L linux-libc-dev | grep "/asm$" | head -1) if [ -n "$ASM_DIR" ] && [ -d "$ASM_DIR" ]; then # Find asm headers by locating asm/types.h directly ASM_TYPES=$(find /usr/include -name types.h -path "*/asm/*" 2>/dev/null | head -1) if [ -n "$ASM_TYPES" ]; then ASM_DIR=$(dirname "$ASM_TYPES") echo "Found asm headers at: $ASM_DIR" cp -a "$ASM_DIR" /usr/local/musl/include/ elif [ -d /usr/include/x86_64-linux-gnu/asm ]; then cp -a /usr/include/x86_64-linux-gnu/asm /usr/local/musl/include/ elif [ -d /usr/include/asm ]; then cp -a /usr/include/asm /usr/local/musl/include/ else echo "WARNING: No asm headers found, generating from asm-generic" echo "WARNING: No asm/types.h found, generating asm/ from asm-generic/" mkdir -p /usr/local/musl/include/asm for f in /usr/local/musl/include/asm-generic/*.h; do name=$(basename "$f") Loading @@ -139,13 +136,8 @@ ensure_kernel_headers() { done fi # Verify critical header exists if [ ! -f /usr/local/musl/include/asm/types.h ]; then echo "ERROR: asm/types.h still missing after install!" echo "Contents of linux-libc-dev:" dpkg -L linux-libc-dev | grep asm | head -20 exit 1 fi # Verify ls -la /usr/local/musl/include/asm/types.h || { echo "FATAL: asm/types.h not found"; exit 1; } echo "==> Kernel headers installed (asm/types.h verified)" ' } Loading Loading
packaging/build-nspawn.sh +7 −15 Original line number Diff line number Diff line Loading @@ -121,17 +121,14 @@ ensure_kernel_headers() { cp -a /usr/include/linux /usr/local/musl/include/ cp -a /usr/include/asm-generic /usr/local/musl/include/ # Find arch-specific asm headers using dpkg ASM_DIR=$(dpkg -L linux-libc-dev | grep "/asm$" | head -1) if [ -n "$ASM_DIR" ] && [ -d "$ASM_DIR" ]; then # Find asm headers by locating asm/types.h directly ASM_TYPES=$(find /usr/include -name types.h -path "*/asm/*" 2>/dev/null | head -1) if [ -n "$ASM_TYPES" ]; then ASM_DIR=$(dirname "$ASM_TYPES") echo "Found asm headers at: $ASM_DIR" cp -a "$ASM_DIR" /usr/local/musl/include/ elif [ -d /usr/include/x86_64-linux-gnu/asm ]; then cp -a /usr/include/x86_64-linux-gnu/asm /usr/local/musl/include/ elif [ -d /usr/include/asm ]; then cp -a /usr/include/asm /usr/local/musl/include/ else echo "WARNING: No asm headers found, generating from asm-generic" echo "WARNING: No asm/types.h found, generating asm/ from asm-generic/" mkdir -p /usr/local/musl/include/asm for f in /usr/local/musl/include/asm-generic/*.h; do name=$(basename "$f") Loading @@ -139,13 +136,8 @@ ensure_kernel_headers() { done fi # Verify critical header exists if [ ! -f /usr/local/musl/include/asm/types.h ]; then echo "ERROR: asm/types.h still missing after install!" echo "Contents of linux-libc-dev:" dpkg -L linux-libc-dev | grep asm | head -20 exit 1 fi # Verify ls -la /usr/local/musl/include/asm/types.h || { echo "FATAL: asm/types.h not found"; exit 1; } echo "==> Kernel headers installed (asm/types.h verified)" ' } Loading