mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-17 06:57:11 +00:00
posix_ipc decides at build time whether it needs librt and whether
message queues are available by compiling small probe programs in
build_support/discover_system_info.py. Its does_build_succeed() splices
the linker option into the compiler argv verbatim, so when no extra
library is wanted the compiler is called with a literal empty argument:
$CC -Wall -o foo foo.c '' -lpthread
GNU ld treats '' as an input file and fails ("cannot find : No such
file or directory"); lld ignores it. With the gcc toolchain every probe
without -lrt therefore fails, the prober wrongly decides librt is
required, and on a C library without a usable librt message queue
support is dropped - which is how posix_ipc.MessageQueue went missing
(issue #916). The result depends on the linker rather than on what the
C library provides.
The previous LDFLAGS += "-lrt" workaround only papered over this, and
is itself libc specific: it forces linking librt even where mq_* live
in libc (glibc >= 2.34, musl).
Fix the prober to split linker_options with shlex, like it already does
for CC, so an empty value adds no argument, and drop the forced -lrt so
the probes decide per C library.
Verified on qemux86-64 for glibc and musl, each with the clang and gcc
toolchains: src/system_info.h defines MESSAGE_QUEUE_SUPPORT_EXISTS,
SEM_GETVALUE_EXISTS and SEM_TIMEDWAIT_EXISTS, and the extension module
imports all mq_* from libc with no librt NEEDED entry.
Fixes: https://github.com/openembedded/meta-openembedded/issues/916
AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
meta-python
Introduction
This layer is intended to be the home of python modules for OpenEmbedded.
Dependencies
The meta-python layer depends on:
URI: git://git.openembedded.org/openembedded-core
layers: meta
branch: master
URI: git://git.openembedded.org/meta-openembedded
layers: meta-oe
branch: master
Contributing
The meta-openembedded mailinglist (openembedded-devel@lists.openembedded.org) is used for questions, comments and patch review. It is subscriber only, so please register before posting.
Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-python]' in the subject.
When sending single patches, please use something like: git send-email -M -1 --to=openembedded-devel@lists.openembedded.org --subject-prefix='meta-python][PATCH'
Maintenance
Layer maintainers: Tim "moto-timo" Orling TicoTimo@gmail.com Derek Straka derek@asterius.io