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.
Description
score/launch_manager/src/daemon/BUILD'slaunch_managercc_binaryonly links-lpthreadon Linux.process_group_manager.cppanddetails/process_launcher.cppboth callshm_open/shm_unlink(
score/launch_manager/src/daemon/src/process_group_manager/), which live inlibrton glibc versions before 2.34 (glibc 2.34 foldedlibrt's symbols intolibcitself, so newer glibc happens to link fine either way, masking themissing dependency).
On a glibc < 2.34 toolchain, linking
launch_managerfails with undefinedreferences to
shm_open/shm_unlink.Steps to reproduce
Build
//score/launch_manager/src/daemon:launch_manageragainst a Linux glibctarget older than 2.34.
Expected behavior
launch_managerlinks successfully regardless of the target's glibc version.Proposed fix
Add
-lrtalongside-lpthreadin thecc_binary's Linuxlinkopts. Draft PRincoming.