From aa6c354d5856f6000980e0f06adeea6fc6955384 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Tue, 5 May 2026 09:09:55 -0500 Subject: [PATCH] ci: fix elc link flags (libcurl install + gcc ordering) --- .gitea/workflows/dev.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index aa1cbb7..dad8e89 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -40,11 +40,10 @@ jobs: run: | set -euo pipefail - # Ensure build tools are available (ci-base may not have gcc) - if ! command -v cc >/dev/null 2>&1; then - apt-get update -qq - apt-get install -y -qq gcc libcurl4-openssl-dev libssl-dev - fi + # Install curl dev libs — needed to link elc.c. + # ci-base has gcc but not libcurl4-openssl-dev. + apt-get update -qq + apt-get install -y -qq libcurl4-openssl-dev libssl-dev DEST="${{ github.workspace }}/../foundation-el" @@ -56,13 +55,13 @@ jobs: # Compile elc.c (committed C source of the El compiler) for linux/amd64. # The darwin arm64 binary at lang/dist/platform/elc can't run on linux. - # elc.c is the same compiler source but in C — compile it natively here. + # Note: -lcurl -lpthread must come AFTER source files on gcc/linux. cc -std=c11 -O2 \ -I "$DEST/lang/el-compiler/runtime" \ - -lcurl -lpthread \ -o "$DEST/lang/dist/platform/elc" \ "$DEST/lang/dist/platform/elc.c" \ - "$DEST/lang/el-compiler/runtime/el_runtime.c" + "$DEST/lang/el-compiler/runtime/el_runtime.c" \ + -lcurl -lpthread chmod +x "$DEST/lang/dist/platform/elc" echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV"