Merge pull request 'fix: -DHAVE_CURL for el_runtime OTLP — resolves emit_metric linker error' (#8) from fix/have-curl-define into stage
Stage — Build, push & deploy to marketing-stage / deploy-stage (push) Successful in 3m12s
Stage — Build, push & deploy to marketing-stage / deploy-stage (push) Successful in 3m12s
This commit was merged in pull request #8.
This commit is contained in:
+5
-5
@@ -28,7 +28,10 @@ COPY runtime/el_runtime.c runtime/el_runtime.h ./
|
|||||||
# Pre-compile el_runtime as a separate cached layer.
|
# Pre-compile el_runtime as a separate cached layer.
|
||||||
# el_runtime.c changes rarely; main.c changes every run.
|
# 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.
|
# 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 ──────────────────────────────────────────────────────────
|
# ── Build neuron-web ──────────────────────────────────────────────────────────
|
||||||
#
|
#
|
||||||
@@ -44,15 +47,12 @@ RUN cc -O2 -rdynamic \
|
|||||||
-lcurl -lpthread -ldl -lm -lssl -lcrypto
|
-lcurl -lpthread -ldl -lm -lssl -lcrypto
|
||||||
|
|
||||||
# ── Build soul-demo ───────────────────────────────────────────────────────────
|
# ── 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/soul-demo.c ./
|
||||||
COPY dist/vessel_stubs.c ./
|
COPY dist/vessel_stubs.c ./
|
||||||
|
|
||||||
RUN cc -O2 -rdynamic \
|
RUN cc -O2 -rdynamic \
|
||||||
-o soul-demo \
|
-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
|
-lcurl -lpthread -ldl -lm -lssl -lcrypto
|
||||||
|
|
||||||
# ── Stage 2: runtime image ────────────────────────────────────────────────────
|
# ── Stage 2: runtime image ────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user