fix: soul-demo emit_metric linker error — rebuild from source, compile with el_runtime.c #7

Merged
will.anderson merged 1 commits from fix/soul-demo-emit-metric into stage 2026-05-07 02:30:48 +00:00
Owner

Problem

Stage CI failing with:

/usr/bin/ld: soul-demo.c:(.text+0x4eee): undefined reference to 'emit_metric'
/usr/bin/ld: soul-demo.c:(.text+0x4365): undefined reference to 'emit_log'
/usr/bin/ld: soul-demo.c:(.text+0x43a3): undefined reference to 'trace_span_start'

The committed soul-demo.c called OTLP observability functions (emit_metric, emit_log, trace_span_start/end) that weren't resolving from el_runtime.o at link time.

Fix

1. Rebuild soul-demo.c from source using current elc

  • Fresh compilation from soul-demo.el using the current El compiler
  • Fixes a double-wrapped el_from_float() compiler bug from the old version
  • Removes the unix_timestamp function (would conflict with el_runtime.c)
  • Same logic and behaviour as before

2. Dockerfile.stage: compile soul-demo with el_runtime.c directly

Changed:

cc -O2 -rdynamic -o soul-demo soul-demo.c vessel_stubs.c el_runtime.o ...

To:

cc -O2 -rdynamic -o soul-demo soul-demo.c vessel_stubs.c el_runtime.c ...

Compiling el_runtime.c as a source file (not a pre-compiled object) ensures all symbols including emit_metric, emit_log, trace_span_* are always resolved from the freshly staged source, bypassing any Docker layer cache divergence on el_runtime.o.

## Problem Stage CI failing with: ``` /usr/bin/ld: soul-demo.c:(.text+0x4eee): undefined reference to 'emit_metric' /usr/bin/ld: soul-demo.c:(.text+0x4365): undefined reference to 'emit_log' /usr/bin/ld: soul-demo.c:(.text+0x43a3): undefined reference to 'trace_span_start' ``` The committed `soul-demo.c` called OTLP observability functions (`emit_metric`, `emit_log`, `trace_span_start/end`) that weren't resolving from `el_runtime.o` at link time. ## Fix **1. Rebuild soul-demo.c from source using current elc** - Fresh compilation from `soul-demo.el` using the current El compiler - Fixes a double-wrapped `el_from_float()` compiler bug from the old version - Removes the `unix_timestamp` function (would conflict with el_runtime.c) - Same logic and behaviour as before **2. Dockerfile.stage: compile soul-demo with `el_runtime.c` directly** Changed: ``` cc -O2 -rdynamic -o soul-demo soul-demo.c vessel_stubs.c el_runtime.o ... ``` To: ``` cc -O2 -rdynamic -o soul-demo soul-demo.c vessel_stubs.c el_runtime.c ... ``` Compiling el_runtime.c as a source file (not a pre-compiled object) ensures all symbols including `emit_metric`, `emit_log`, `trace_span_*` are always resolved from the freshly staged source, bypassing any Docker layer cache divergence on `el_runtime.o`.
will.anderson added 1 commit 2026-05-07 02:30:39 +00:00
soul-demo.c was previously an older compiled artifact that triggered an
undefined reference to emit_metric/emit_log/trace_span_* at link time in CI.

Two fixes:
1. Rebuild soul-demo.c from soul-demo.el using current elc — cleaner
   codegen (no double-wrapped el_from_float), same logic, unix_timestamp
   collision with el_runtime.c removed.
2. Dockerfile.stage: compile soul-demo against el_runtime.c directly
   (not el_runtime.o) so all runtime symbols are always resolved from the
   staged source, bypassing any Docker layer cache divergence on el_runtime.o.
will.anderson merged commit 843b6e07a7 into stage 2026-05-07 02:30:48 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron-web#7