Skip to content

fix: set LD_LIBRARY_PATH for smoke test to use ingot libraries - #34

Merged
skipbit merged 3 commits into
mainfrom
fix-smoke-test-ld-path
Mar 22, 2026
Merged

fix: set LD_LIBRARY_PATH for smoke test to use ingot libraries#34
skipbit merged 3 commits into
mainfrom
fix-smoke-test-ld-path

Conversation

@skipbit

@skipbit skipbit commented Mar 22, 2026

Copy link
Copy Markdown
Owner

Summary

Fix smoke test failure caused by GLIBCXX version mismatch when running
in a container with older libstdc++ than the one built by the ingot.

Problem

GCC 15.2.0 builds a newer libstdc++.so (GLIBCXX_3.4.32+). When the
smoke test compiles and runs a hello world program, the binary links
against the ingot's libstdc++. At runtime, the dynamic linker finds
the container's older libstdc++ (ubuntu:20.04 = GLIBCXX_3.4.28) instead,
causing GLIBCXX_3.4.32 not found.

Fix

Set LD_LIBRARY_PATH (Linux) and DYLD_LIBRARY_PATH (macOS) to include
the ingot's lib/ and lib64/ directories during smoke test execution.

Test plan

  • Re-run ingot-cast with GCC 15.2.0 — smoke test should pass
  • PR validation passes

The test binary compiled by the ingot's compiler links against the
ingot's libstdc++.so, which may be newer than the container's version.
Set LD_LIBRARY_PATH (Linux) and DYLD_LIBRARY_PATH (macOS) to include
the ingot's lib/ and lib64/ directories during test execution.

Fixes: GLIBCXX_3.4.32 not found when running smoke test in
ubuntu:20.04 container with GCC 15.2.0 built libstdc++.
@github-actions

Copy link
Copy Markdown

Validation Failed: molds/llvm/22.1.0 (darwin-aarch64)

The fetch validation for molds/llvm/22.1.0 on darwin-aarch64 has failed.

See the workflow run for details.

DYLD_LIBRARY_PATH on macOS conflicts with system frameworks and causes
Abort trap: 6 crashes (observed with LLVM/Clang smoke test on darwin).
macOS toolchains use @rpath or install_name for library resolution.

Restrict library path override to Linux only via LD_LIBRARY_PATH.
@github-actions

Copy link
Copy Markdown

Validation Failed: molds/llvm/22.1.0 (darwin-aarch64)

The fetch validation for molds/llvm/22.1.0 on darwin-aarch64 has failed.

See the workflow run for details.

Empty arrays cause 'unbound variable' error with set -u (bash nounset).
Use simple export on Linux instead — cleaner and avoids the issue.
@skipbit
skipbit merged commit 87559ca into main Mar 22, 2026
5 checks passed
@skipbit
skipbit deleted the fix-smoke-test-ld-path branch March 22, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant