fix: set LD_LIBRARY_PATH for smoke test to use ingot libraries - #34
Merged
Conversation
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++.
Validation Failed:
|
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.
Validation Failed:
|
Empty arrays cause 'unbound variable' error with set -u (bash nounset). Use simple export on Linux instead — cleaner and avoids the issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) andDYLD_LIBRARY_PATH(macOS) to includethe ingot's
lib/andlib64/directories during smoke test execution.Test plan