Skip to content

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

Description

@hskang-amelia

Description

score/launch_manager/src/daemon/BUILD's launch_manager cc_binary only links
-lpthread on Linux. process_group_manager.cpp and
details/process_launcher.cpp both call shm_open/shm_unlink
(score/launch_manager/src/daemon/src/process_group_manager/), which live in
librt on glibc versions before 2.34 (glibc 2.34 folded librt's symbols into
libc itself, so newer glibc happens to link fine either way, masking the
missing dependency).

On a glibc < 2.34 toolchain, linking launch_manager fails with undefined
references to shm_open/shm_unlink.

Steps to reproduce

Build //score/launch_manager/src/daemon:launch_manager against a Linux glibc
target older than 2.34.

Expected behavior

launch_manager links successfully regardless of the target's glibc version.

Proposed fix

Add -lrt alongside -lpthread in the cc_binary's Linux linkopts. Draft PR
incoming.

Activity

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions