diff --git a/Dockerfile.stage b/Dockerfile.stage index 8eaa8cd..d81509e 100644 --- a/Dockerfile.stage +++ b/Dockerfile.stage @@ -28,7 +28,10 @@ COPY runtime/el_runtime.c runtime/el_runtime.h ./ # Pre-compile el_runtime as a separate cached layer. # el_runtime.c changes rarely; main.c changes every run. # Splitting this out means el_runtime.o is cached across builds when only main.c changes. -RUN cc -O2 -c el_runtime.c -I. -o el_runtime.o +# -DHAVE_CURL: the staged el_runtime.c (from el.git) guards the OTLP observability +# section (emit_metric, emit_log, trace_span_*) behind #ifdef HAVE_CURL. +# libcurl IS installed above, so define HAVE_CURL to enable those functions. +RUN cc -O2 -DHAVE_CURL -c el_runtime.c -I. -o el_runtime.o # ── Build neuron-web ────────────────────────────────────────────────────────── # @@ -44,15 +47,12 @@ RUN cc -O2 -rdynamic \ -lcurl -lpthread -ldl -lm -lssl -lcrypto # ── Build soul-demo ─────────────────────────────────────────────────────────── -# Compile soul-demo.c with el_runtime.c directly (not el_runtime.o) so that -# all runtime symbols — including emit_metric, emit_log, trace_span_* — are -# always resolved from the staged source rather than a cached object file. COPY dist/soul-demo.c ./ COPY dist/vessel_stubs.c ./ RUN cc -O2 -rdynamic \ -o soul-demo \ - soul-demo.c vessel_stubs.c el_runtime.c \ + soul-demo.c vessel_stubs.c el_runtime.o \ -lcurl -lpthread -ldl -lm -lssl -lcrypto # ── Stage 2: runtime image ────────────────────────────────────────────────────