Skip to content

Conversation

@SahilPatidar
Copy link
Contributor

@SahilPatidar SahilPatidar commented Oct 28, 2025

This PR reapplies the changes previously introduced in #148410.
It introduces a redesigned and rebuilt Cling-based auto-loading workaround that enables scanning libraries and resolving unresolved symbols within those libraries.

Fix build failures in LibraryResolverTest and silence symlink warning

This commit resolves issues observed in the build bots:

  1. Silences the -Wunused-result warning by handling the return value
    of ::symlink in LibraryResolverTest.cpp. Previously, ignoring
    the return value triggered compiler warnings.

  2. Fixes a linker error in OrcJITTests caused by an undefined
    symbol: llvm::yaml::convertYAML. The test setup in
    LibraryResolverTest.cpp now correctly links against the required
    LLVM YAML library symbols.

  3. Fixes persistent build bot failure caused by a path difference issue.

This resolves the build failures for PR #148410 on the affected bots.

@SahilPatidar SahilPatidar marked this pull request as ready for review October 30, 2025 04:27
@SahilPatidar SahilPatidar changed the title REAPPLY [ORC] Add automatic shared library resolver for unresolved symbols. REAPPLY [ORC] Add automatic shared library resolver for unresolved symbols. (attempt 2) Oct 30, 2025
@SahilPatidar
Copy link
Contributor Author

@dyung Could you please review the test setup part (LibraryTestEnvironment::SetUp, LibraryResolverIT::SetUp)?
In summary, the setup creates .so/.dylib files from YAML inputs in a unique temporary directory and adds the shared library path to the test fixture environment.

@SahilPatidar SahilPatidar merged commit 605a7d6 into llvm:main Nov 1, 2025
10 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 1, 2025

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/27520

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure) ******************** TEST 'LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/82/219' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/unittests/ExecutionEngine/Orc/./OrcJITTests-LLVM-Unit-469642-82-219.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=219 GTEST_SHARD_INDEX=82 /home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/unittests/ExecutionEngine/Orc/./OrcJITTests -- Script: -- /home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/unittests/ExecutionEngine/Orc/./OrcJITTests --gtest_filter=LibraryResolverIT.ScanAndResolveDependencyGraph -- /home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/ExecutionEngine/Orc/LibraryResolverTest.cpp:477: Failure Expected: (numLibs) > (0u), actual: 0 vs 0 Expected at least one library scanned /home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/ExecutionEngine/Orc/LibraryResolverTest.cpp:477 Expected: (numLibs) > (0u), actual: 0 vs 0 Expected at least one library scanned ******************** 
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 1, 2025

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/27660

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure) ******************** TEST 'LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/79/219' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:/home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/unittests/ExecutionEngine/Orc/./OrcJITTests-LLVM-Unit-630404-79-219.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=219 GTEST_SHARD_INDEX=79 /home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/unittests/ExecutionEngine/Orc/./OrcJITTests -- Script: -- /home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/unittests/ExecutionEngine/Orc/./OrcJITTests --gtest_filter=LibraryResolverIT.EnumerateSymbols_IncludesUndefineds -- /home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/ExecutionEngine/Orc/LibraryResolverTest.cpp:350: Failure Value of: SymbolEnumerator::enumerateSymbols(libC, onEach, Opts) Actual: false Expected: true /home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/ExecutionEngine/Orc/LibraryResolverTest.cpp:350 Value of: SymbolEnumerator::enumerateSymbols(libC, onEach, Opts) Actual: false Expected: true ******************** 
@SahilPatidar
Copy link
Contributor Author

Looking into the bot failures. I’ll revert the changes if the fix turns out to be non-trivial.

SahilPatidar added a commit to SahilPatidar/llvm-project that referenced this pull request Nov 1, 2025
SahilPatidar added a commit that referenced this pull request Nov 1, 2025
Some tests are failing on the build bots because of test environment/setup issues rather than code logic in PR #165360. As a temporary workaround, these tests are being disabled to allow the rest of the build to pass. Once the test setup is fixed, the tests will be re-enabled. https://lab.llvm.org/buildbot/#/builders/180/builds/27660. https://lab.llvm.org/buildbot/#/builders/160/builds/27520.
SahilPatidar added a commit to SahilPatidar/llvm-project that referenced this pull request Nov 3, 2025
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
…mbols. (attempt 2) (llvm#165360) This PR reapplies the changes previously introduced in llvm#148410. It introduces a redesigned and rebuilt Cling-based auto-loading workaround that enables scanning libraries and resolving unresolved symbols within those libraries. Fix build failures in LibraryResolverTest and silence symlink warning This commit resolves issues observed in the build bots: 1. Silences the -Wunused-result warning by handling the return value of ::symlink in LibraryResolverTest.cpp. Previously, ignoring the return value triggered compiler warnings. 2. Fixes a linker error in OrcJITTests caused by an undefined symbol: llvm::yaml::convertYAML. The test setup in LibraryResolverTest.cpp now correctly links against the required LLVM YAML library symbols. 3. Fixes persistent build bot failure caused by a path difference issue. This resolves the build failures for PR llvm#148410 on the affected bots.
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
…lvm#165983) Some tests are failing on the build bots because of test environment/setup issues rather than code logic in PR llvm#165360. As a temporary workaround, these tests are being disabled to allow the rest of the build to pass. Once the test setup is fixed, the tests will be re-enabled. https://lab.llvm.org/buildbot/#/builders/180/builds/27660. https://lab.llvm.org/buildbot/#/builders/160/builds/27520.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants