chore: remove operational artifacts (internal paths leaked)
This commit is contained in:
parent
4b8346beab
commit
88d1f1401d
|
|
@ -1,57 +0,0 @@
|
|||
# Critical Blocker: ARM64 NIP Static Build
|
||||
|
||||
## Status: LINK PHASE FAILING
|
||||
|
||||
### Root Cause Analysis
|
||||
The `nim c` command compiles all source files to ARM64 object files successfully, but the **final link step is silently failing**.
|
||||
|
||||
**Evidence:**
|
||||
1. All `.c` → `.o` compilation succeeds (ARM64 object files created in `/tmp/nip-arm64-cache/`)
|
||||
2. Linker command executes but **lacks `-o` flag specifying output path**
|
||||
3. Build returns exit code 0 (success) but no binary produced
|
||||
4. `-o:build/arm64/nip` argument to `nim c` is being ignored or not passed to linker
|
||||
|
||||
### Linker Command (from diagnostic output):
|
||||
```bash
|
||||
aarch64-linux-gnu-gcc [hundreds of .o files] \
|
||||
-pthread -lm -lrt \
|
||||
-L/path/to/zstd-1.5.5/lib \
|
||||
-L/path/to/libressl-3.8.2/ssl/.libs \
|
||||
-L/path/to/libressl-3.8.2/crypto/.libs \
|
||||
-L/path/to/libressl-3.8.2/tls/.libs \
|
||||
-static -lssl -lcrypto -ltls -lzstd -lpthread -ldl -lm -lresolv \
|
||||
-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs
|
||||
```
|
||||
|
||||
**MISSING:** `-o /path/to/output/binary`
|
||||
|
||||
### Attempted Solutions
|
||||
1. ✅ Built LibreSSL 3.8.2 static (16MB crypto + 3.5MB ssl + 550KB tls) for ARM64
|
||||
2. ✅ Built Zstd 1.5.5 static (1.2MB) for ARM64
|
||||
3. ✅ Created GCC wrapper to filter x86 flags (`-mpclmul`, etc.)
|
||||
4. ✅ Used `--dynlibOverride:ssl --dynlibOverride:crypto` to prevent dlopen()
|
||||
5. ❌ Multiple output path specifications (`-o:`, `--out:`) all ignored
|
||||
6. ❌ Force rebuild with `-f` - still no output
|
||||
7. ❌ Absolute paths - still no output
|
||||
|
||||
### Hypothesis
|
||||
Nim's ARM64 cross-compilation may have a bug where the `-o` flag isn't being passed through to the final linker invocation when using `--gcc.linkerexe:aarch64-linux-gnu-gcc`.
|
||||
|
||||
### Recommended Next Steps
|
||||
|
||||
**Option A: Manual Link (Immediate)**
|
||||
1. Use the object files already compiled in `/tmp/nip-arm64-cache/`
|
||||
2. Manually invoke `aarch64-linux-gnu-gcc` with proper `-o` flag
|
||||
3. Create binary directly
|
||||
|
||||
**Option B: Different Nim Output Strategy**
|
||||
1. Try `--compileOnly` to generate C code
|
||||
2. Use custom Makefile for linking phase
|
||||
3. Bypass Nim's linker invocation entirely
|
||||
|
||||
**Option C: Investigate Nim Bug**
|
||||
1. Check if this is a known Nim cross-compilation issue
|
||||
2. Try older/newer Nim version
|
||||
3. Report bug to Nim if not known
|
||||
|
||||
**Current Time Impact:** ~3 hours spent debugging LibreSSL/Zstd static linking - successfully resolved. ~1 hour on output path issue - unresolved.
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
# ARM64 Static NIP Build - Success Report
|
||||
|
||||
## Final Status: ✅ **COMPLETE**
|
||||
|
||||
### Binary Specifications
|
||||
- **Path**: `/home/markus/zWork/_Git/Nexus/core/nip/build/arm64/nip`
|
||||
- **Size**: 30MB
|
||||
- **Architecture**: ARM aarch64, statically linked
|
||||
- **Build Date**: 2025-12-28 23:27
|
||||
|
||||
### Integrated Components
|
||||
1. **LibreSSL 3.8.2** (20MB total)
|
||||
- `libssl.a` (3.5MB)
|
||||
- `libcrypto.a` (16MB)
|
||||
- `libtls.a` (550KB)
|
||||
2. **Zstd 1.5.5** - `libzstd.a` (1.2MB)
|
||||
3. **Custom OpenSSL Shim** - `openssl_shim.o` (1.4KB)
|
||||
- Bridges LibreSSL macros (`SSL_in_init`) to function symbols
|
||||
4. **NimCrypto** - BLAKE2b only (SHA2/NEON removed)
|
||||
|
||||
### Build Method: Manual Linking ("Iron Hand" Protocol)
|
||||
**Root Cause**: Nim's cross-compilation dropped the `-o` output flag from linker invocation.
|
||||
|
||||
**Solution**:
|
||||
1. Nim compiled 289 ARM64 `.o` files successfully
|
||||
2. Created C shim to bridge LibreSSL macro→function gap
|
||||
3. Manually invoked `aarch64-linux-gnu-gcc` with all objects + shim
|
||||
4. Forced static linking with proper library order
|
||||
|
||||
### Verification Results
|
||||
```
|
||||
✅ Structure: STATIC (no dynamic dependencies)
|
||||
✅ No libcrypto.so dlopen references
|
||||
✅ BuildID: 4ed2d90fcb6fc82d52429bed63bd1cb378993582
|
||||
```
|
||||
|
||||
### NexBox Integration
|
||||
- **Image Size**: 62,469 blocks (30MB+ initramfs)
|
||||
- **Status**: Built successfully
|
||||
- **Next**: Boot test + Warhead Test II (pack/extract cycle)
|
||||
|
||||
### Time Investment
|
||||
- **LibreSSL/Zstd Static Build**: ~2 hours
|
||||
- **Nim `-o` Flag Investigation**: ~1.5 hours
|
||||
- **Manual Linking + Shim**: ~1 hour
|
||||
- **Total**: ~4.5 hours
|
||||
|
||||
### Key Files Created
|
||||
1. `/home/markus/zWork/_Git/Nexus/core/nip/src/openssl_shim.c` - Macro bridge
|
||||
2. `/home/markus/zWork/_Git/Nexus/core/nip/link_manual.sh` - Manual linker
|
||||
3. `/home/markus/zWork/_Git/Nexus/core/nexus/vendor/libressl-3.8.2/` - ARM64 static libs
|
||||
4. `/home/markus/zWork/_Git/Nexus/core/nexus/vendor/zstd-1.5.5/` - ARM64 static lib
|
||||
|
||||
Loading…
Reference in New Issue