Skip to content

The runtime closure check expands $ORIGIN at a link's target, and refuses a program that runs #1009

Done

Description

@Sunrisepeak

Summary

mcpp 2026.11.22.1 refuses a program it has just linked, and the program runs:

runtime closure for .../bin/cuda-curand-tests/curand cannot be satisfied: libgcc_s.so.1 not found on the search path this artifact will actually use.

The closure model expands $ORIGIN at the target of a library's link, not at the directory the loader opened the library in.

Measurements

The case is mcpp-index's cuda-curand member under LLVM.

  • libcurand.so.10 is reached as a link in compat.curand's farm, and its DT_RUNPATH is $ORIGIN alone.
  • With LD_DEBUG=libs the loader takes libgcc_s.so.1 from the farm, the directory it opened libcurand.so.10 in. The test program runs and passes.
  • The closure check resolves the found path to the link's target (xim-x-libcurand/<v>/lib/), expands $ORIGIN there, finds no libgcc_s.so.1, and refuses the build.

Fix

The fix is in #1006. An object is identified by the file it is, and $ORIGIN is the directory it was opened in. A unit test covers a farm of links whose libraries find their dependencies beside them.

mcpp-index's cuda-curand member records this issue on its LLVM leg (tests/known-red.tsv) until the index CI uses the release that carries the fix.

Activity

  1. speak-agent commented on Nov 24, 2026

    @speak-agent
    Member

    Fixed in mcpp 2026.11.23.1 (#1006). The runtime closure check expands $ORIGIN at the directory a library was opened in, not at a link's target, so a program that runs is no longer refused. mcpp-index removed cuda-curand from its known-red list (mcpplibs/mcpp-index#890).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions