fix: -DHAVE_CURL for el_runtime OTLP — resolves emit_metric linker error #8

Merged
will.anderson merged 1 commits from fix/have-curl-define into stage 2026-05-07 02:35:34 +00:00
Owner

Root cause

The staged el_runtime.c (from el.git) wraps the entire OTLP observability section behind #ifdef HAVE_CURL:

#ifdef HAVE_CURL
/* OTLP/HTTP observability — logs, traces, metrics */
... emit_log, emit_metric, trace_span_start, trace_span_end ...
#endif

The Dockerfile compiled el_runtime.c without -DHAVE_CURL, so those symbols were silently compiled out. The linker then couldn't find them.

Fix

Add -DHAVE_CURL to the cc -O2 -c el_runtime.c step. libcurl IS available (installed via libcurl4-openssl-dev), so this correctly enables the OTLP code path.

Also reverts the soul-demo compile to use el_runtime.o (the cached compiled object) now that it will contain the correct symbols.

## Root cause The staged `el_runtime.c` (from el.git) wraps the entire OTLP observability section behind `#ifdef HAVE_CURL`: ```c #ifdef HAVE_CURL /* OTLP/HTTP observability — logs, traces, metrics */ ... emit_log, emit_metric, trace_span_start, trace_span_end ... #endif ``` The Dockerfile compiled el_runtime.c without `-DHAVE_CURL`, so those symbols were silently compiled out. The linker then couldn't find them. ## Fix Add `-DHAVE_CURL` to the `cc -O2 -c el_runtime.c` step. libcurl IS available (installed via `libcurl4-openssl-dev`), so this correctly enables the OTLP code path. Also reverts the soul-demo compile to use `el_runtime.o` (the cached compiled object) now that it will contain the correct symbols.
will.anderson added 1 commit 2026-05-07 02:35:27 +00:00
Root cause: the staged el_runtime.c (from el.git) wraps the entire OTLP
observability section (emit_metric, emit_log, trace_span_start/end) in
#ifdef HAVE_CURL. Without -DHAVE_CURL, those symbols are compiled out,
causing the undefined reference linker errors.

libcurl IS available (installed via libcurl4-openssl-dev), so -DHAVE_CURL
correctly enables the OTLP code path.

Also reverts the soul-demo compile to use el_runtime.o (the pre-compiled
cached object) now that the object will contain the correct symbols.
will.anderson merged commit 1cf2ef8835 into stage 2026-05-07 02:35:34 +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#8