Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 192b277229 | |||
| e2e8f0a1e6 | |||
| f0454650a2 | |||
| c199a13a7f | |||
| 64c1789fcc |
@@ -94,16 +94,23 @@ jobs:
|
||||
# entirely: elb on Linux would OOM the runner (elc uses 24GB+ virtual memory
|
||||
# on a 16GB host) and we always restore from the repo's soul.c anyway.
|
||||
mkdir -p dist
|
||||
cc -O2 -DHAVE_CURL \
|
||||
# -rdynamic: the el runtime resolves the HTTP request handler (and the
|
||||
# tool handlers) by NAME via dlsym(RTLD_DEFAULT, "handle_request").
|
||||
# macOS exports these symbols freely, but glibc/Linux only makes symbols
|
||||
# visible to dlsym if they are in the dynamic symbol table — so without
|
||||
# -rdynamic the stripped Linux binary boots but returns "el-runtime: no
|
||||
# http handler registered" for EVERY route (i.e. a soul that serves
|
||||
# nothing). Same reason the Windows build links -Wl,--export-all-symbols.
|
||||
cc -O2 -DHAVE_CURL -rdynamic \
|
||||
-I$RUNTIME \
|
||||
dist/soul.c \
|
||||
$RUNTIME/el_runtime.c \
|
||||
-lssl -lcrypto -lcurl -lpthread -lm \
|
||||
-o dist/neuron
|
||||
|
||||
# Strip debug symbols and non-essential symbol table entries.
|
||||
# -s removes the symbol table + relocation info (max size reduction).
|
||||
# Keeps the binary functional; debuggability is preserved via source + CI logs.
|
||||
# -s strips .symtab + debug for size. .dynsym (which -rdynamic populated
|
||||
# with the dlsym-resolved handlers) is preserved, so the handler still
|
||||
# resolves after stripping.
|
||||
strip -s dist/neuron
|
||||
ls -lh dist/neuron
|
||||
|
||||
|
||||
@@ -113,9 +113,16 @@ KNOWN_PENDING=(
|
||||
)
|
||||
|
||||
# --- boot the soul -----------------------------------------------------------
|
||||
# Preserve the ambient environment (PATH, LD_LIBRARY_PATH, TMPDIR) so the
|
||||
# dynamically-linked soul finds its libs on any runner — using `env -i` here
|
||||
# stripped the library path on the Linux CI runner and the soul never booted.
|
||||
# Isolation is still guaranteed by UNSETTING the live-service vars (so it can
|
||||
# never reach the real engram/axon or make an LLM call) and by pointing HOME +
|
||||
# the snapshot at throwaway paths and the axon at a dead port.
|
||||
echo "== booting soul: $SOUL on port $PORT (throwaway HOME=$THROW_HOME) =="
|
||||
env -i \
|
||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin" \
|
||||
env \
|
||||
-u ENGRAM_URL -u ENGRAM_API_KEY -u SOUL_ENGRAM_URL \
|
||||
-u ANTHROPIC_API_KEY -u NEURON_LLM_API_KEY -u SOUL_IDENTITY \
|
||||
HOME="$THROW_HOME" \
|
||||
NEURON_PORT="$PORT" \
|
||||
SOUL_CGI_ID="ntn-contract-$$" \
|
||||
|
||||
Reference in New Issue
Block a user