Skip to content

fix(launch_manager): link -lrt for shm_open/shm_unlink - #618

Draft
hskang-amelia wants to merge 3 commits into
eclipse-score:mainfrom
hskang-amelia:upstream-lrt-fix
Draft

fix(launch_manager): link -lrt for shm_open/shm_unlink#618
hskang-amelia wants to merge 3 commits into
eclipse-score:mainfrom
hskang-amelia:upstream-lrt-fix

Conversation

@hskang-amelia

Copy link
Copy Markdown
Contributor

Description

launch_manager's cc_binary only linked -lpthread on Linux, but
process_group_manager.cpp/details/process_launcher.cpp both call
shm_open/shm_unlink, which live in librt on glibc < 2.34 (2.34 folded
librt into libc, masking the missing link dependency on newer glibc).
Adds -lrt alongside -lpthread in the Linux linkopts.

Related ticket

closes #617

(cherry picked from commit 04f2504)
Signed-off-by: amelia@ivis.ai <amelia@ivis.ai>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-618: https://eclipse-score.github.io/lifecycle/pr-618/

@cameron-craig-etas cameron-craig-etas self-assigned this Sep 9, 2026

@cameron-craig-etas cameron-craig-etas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could try conditionally linking against librt for glibc versions < 2.34.
But I think that not really necessary, and just complicates the BUILD files.
So the fix looks good from my point of view.

Comment thread score/launch_manager/src/daemon/BUILD
Address review feedback on eclipse-score#618: glibc 2.34 merged librt and libpthread into libc, but the explicit links stay for older glibc versions. Add a comment in the BUILD file so this is not rediscovered later.  Signed-off-by: amelia@ivis.ai <amelia@ivis.ai>
The comment about glibc v2.34 folding libpthread/libdl/libutil/
libanl/librt into libc had a trailing space, which failed the
Common PR checks formatting check.

Signed-off-by: amelia@ivis.ai <amelia@ivis.ai>

Signed-off-by: hskang <amelia@ivis.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

launch_manager daemon fails to link on glibc < 2.34 (missing -lrt for shm_open/shm_unlink)

2 participants