Skip to contentSkip to conversation

libvpx: Explicitly link with pthread support

PATCH Superseded Joshua Watt 2 participants 3 messages Feb 22, 2023 – Feb 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libvpx: Explicitly link with pthread support

Some platforms (e.g. x86) require that the build (host) tools be explicitly linked with -pthread to link against the pthread libraries so do that here.

---
 meta-oe/recipes-multimedia/webm/libvpx_1.12.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-multimedia/webm/libvpx_1.12.0.bb +1 -0
index 066d7cc81..9c04c2a34 100644
@@ -19,6 +19,7 @@ S = "${WORKDIR}/git"
 ARM_INSTRUCTION_SET = "arm"
 
 CFLAGS += "-fPIC"
+BUILD_LDFLAGS += "-pthread"
 
 export CC
 export LD = "${CC}"
Signature · 1 line
2.33.0
#1 lore raw
Quoted 5 lines · Joshua Watt

Some platforms (e.g. x86) require that the build (host) tools be explicitly linked with -pthread to link against the pthread libraries so do that here.

what is the underlying reason ? does it need some sort of cancellation support ? maybe add build error snippet to commit to expand on it a bit.

Quoted 29 lines
---
 meta-oe/recipes-multimedia/webm/libvpx_1.12.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-multimedia/webm/libvpx_1.12.0.bb +1 -1
index 066d7cc81..9c04c2a34 100644
@@ -19,6 +19,7 @@ S = "${WORKDIR}/git"
 ARM_INSTRUCTION_SET = "arm"
 
 CFLAGS += "-fPIC"
+BUILD_LDFLAGS += "-pthread"
 
 export CC
 export LD = "${CC}"
--

2.33.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101217): https://lists.openembedded.org/g/openembedded-devel/message/101217
Mute This Topic: https://lists.openembedded.org/mt/97163975/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

PATCH v2 1/1 libvpx: Explicitly link with pthread support

In reply to Joshua Watt

When building for the native build host, explicitly add the -pthread option to link against the pthread libraries. This errors like:

vp9_encoder.c:(.text+0x2073): undefined reference to `pthread_once'

when building the native variant

---
 meta-oe/recipes-multimedia/webm/libvpx_1.12.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-multimedia/webm/libvpx_1.12.0.bb +1 -0
index 066d7cc81..9c04c2a34 100644
@@ -19,6 +19,7 @@ S = "${WORKDIR}/git"
 ARM_INSTRUCTION_SET = "arm"
 
 CFLAGS += "-fPIC"
+BUILD_LDFLAGS += "-pthread"
 
 export CC
 export LD = "${CC}"
Signature · 1 line
2.33.0