* [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib
@ 2020-09-20 11:58 Bernd Kuhls
2020-09-20 11:58 ` [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix Bernd Kuhls
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Bernd Kuhls @ 2020-09-20 11:58 UTC (permalink / raw)
To: buildroot
Fixes:
http://autobuild.buildroot.net/results/d2d/d2d73f3c7075ca6e9782b9bb591dae40ab56b6a2/
ffmpeg configure prints: "ERROR: fontconfig not found using pkg-config"
Please note that the ffmpeg build error was reproducible but with a
different error message in ffbuild/config.log:
sysroot/usr/lib/libfontconfig.a(fccache.o): in function `lock_cache':
fccache.c:(.text+0xcd8): undefined reference to `pthread_mutex_init'
arm-buildroot-linux-gnueabi/bin/ld: fccache.c:(.text+0xcf8):
undefined reference to `pthread_mutex_destroy'
arm-buildroot-linux-gnueabi/bin/ld: fccache.c:(.text+0xd00):
undefined reference to `pthread_mutex_lock'
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: removed " 1/1" from patch subject
...read-as-a-dependency-of-a-static-lib.patch | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch
diff --git a/package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch b/package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch
new file mode 100644
index 0000000000..eed9dba005
--- /dev/null
+++ b/package/fontconfig/0002-add-pthread-as-a-dependency-of-a-static-lib.patch
@@ -0,0 +1,44 @@
+From 40ec04a8bf36dd8d0aa3da98b167792ce2dcd114 Mon Sep 17 00:00:00 2001
+From: Silvan Scherrer <silvan.scherrer@aroa.ch>
+Date: Sun, 20 Sep 2020 12:52:08 +0200
+Subject: [PATCH] add pthread as a dependency of a static lib
+
+Downloaded from https://trac.netlabs.org/ports/changeset/2220
+
+Patch sent upstream:
+https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/121
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ configure.ac | 2 ++
+ fontconfig.pc.in | 4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f3189a7..594d6fd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -690,6 +690,8 @@ fi
+ have_pthread=false
+ if test "$os_win32" = no; then
+ AX_PTHREAD([have_pthread=true])
++ AC_SUBST(PTHREAD_CFLAGS)
++ AC_SUBST(PTHREAD_LIBS)
+ fi
+ if $have_pthread; then
+ LIBS="$PTHREAD_LIBS $LIBS"
+diff --git a/fontconfig.pc.in b/fontconfig.pc.in
+index 61b35fb..f823bac 100644
+--- a/fontconfig.pc.in
++++ b/fontconfig.pc.in
+@@ -14,5 +14,5 @@ Version: @VERSION@
+ Requires: @PKGCONFIG_REQUIRES@
+ Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@
+ Libs: -L${libdir} -lfontconfig
+-Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@
+-Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@
++Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@ @PTHREAD_LIBS@
++Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@ @PTHREAD_CFLAGS@
+--
+2.27.0
+
--
2.27.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix
2020-09-20 11:58 [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Bernd Kuhls
@ 2020-09-20 11:58 ` Bernd Kuhls
2020-09-29 16:02 ` Peter Korsgaard
2020-09-20 11:58 ` [Buildroot] [PATCH 3/3] package/ffmpeg: fix static build with wavpack support enabled Bernd Kuhls
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Bernd Kuhls @ 2020-09-20 11:58 UTC (permalink / raw)
To: buildroot
The previous patch added a fix for fontconfig.pc.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: no changes
package/fbterm/fbterm.mk | 6 ------
1 file changed, 6 deletions(-)
diff --git a/package/fbterm/fbterm.mk b/package/fbterm/fbterm.mk
index 712d4f97fa..9964827801 100644
--- a/package/fbterm/fbterm.mk
+++ b/package/fbterm/fbterm.mk
@@ -10,12 +10,6 @@ FBTERM_LICENSE = GPL-2.0+
FBTERM_LICENSE_FILES = COPYING
FBTERM_DEPENDENCIES = fontconfig liberation
-ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
-# fontconfig uses pthreads if available, but fbterm forgets to link
-# with it breaking static builds
-FBTERM_CONF_ENV += LIBS='-lpthread'
-endif
-
ifeq ($(BR2_PACKAGE_GPM),y)
FBTERM_DEPENDENCIES += gpm
FBTERM_CONF_OPTS += --enable-gpm
--
2.27.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] package/ffmpeg: fix static build with wavpack support enabled
2020-09-20 11:58 [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Bernd Kuhls
2020-09-20 11:58 ` [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix Bernd Kuhls
@ 2020-09-20 11:58 ` Bernd Kuhls
2020-09-29 16:02 ` Peter Korsgaard
2020-09-20 13:48 ` [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Thomas Petazzoni
2020-09-29 16:02 ` Peter Korsgaard
3 siblings, 1 reply; 7+ messages in thread
From: Bernd Kuhls @ 2020-09-20 11:58 UTC (permalink / raw)
To: buildroot
Fixes:
http://autobuild.buildroot.net/results/d2d/d2d73f3c7075ca6e9782b9bb591dae40ab56b6a2/
Please note that the wavpack error only occurs after fixing fontconfig.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
...quire_pkg_config-to-check-for-wavpac.patch | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch
diff --git a/package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch b/package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch
new file mode 100644
index 0000000000..49c3ccee9b
--- /dev/null
+++ b/package/ffmpeg/0002-configure-use-require_pkg_config-to-check-for-wavpac.patch
@@ -0,0 +1,31 @@
+From a507a9cd6525d5b3a1eea32e25a139b4023800a2 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Sun, 20 Sep 2020 13:48:00 +0200
+Subject: [PATCH] configure: use require_pkg_config to check for wavpack
+
+Fixes static builds with toolchains needing "-lm" for math functions.
+
+Patch sent upstream:
+http://ffmpeg.org/pipermail/ffmpeg-devel/2020-September/270127.html
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 5d68695192..4e6c6edd30 100755
+--- a/configure
++++ b/configure
+@@ -6438,7 +6438,7 @@ enabled libvpx && {
+ fi
+ }
+
+-enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
++enabled libwavpack && require_pkg_config libwavpack wavpack "wavpack/wavpack.h" WavpackOpenFileOutput
+ enabled libwebp && {
+ enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
+ enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
+--
+2.27.0
+
--
2.27.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib
2020-09-20 11:58 [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Bernd Kuhls
2020-09-20 11:58 ` [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix Bernd Kuhls
2020-09-20 11:58 ` [Buildroot] [PATCH 3/3] package/ffmpeg: fix static build with wavpack support enabled Bernd Kuhls
@ 2020-09-20 13:48 ` Thomas Petazzoni
2020-09-29 16:02 ` Peter Korsgaard
3 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-09-20 13:48 UTC (permalink / raw)
To: buildroot
On Sun, 20 Sep 2020 13:58:14 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
> Fixes:
> http://autobuild.buildroot.net/results/d2d/d2d73f3c7075ca6e9782b9bb591dae40ab56b6a2/
>
> ffmpeg configure prints: "ERROR: fontconfig not found using pkg-config"
>
> Please note that the ffmpeg build error was reproducible but with a
> different error message in ffbuild/config.log:
>
> sysroot/usr/lib/libfontconfig.a(fccache.o): in function `lock_cache':
> fccache.c:(.text+0xcd8): undefined reference to `pthread_mutex_init'
>
> arm-buildroot-linux-gnueabi/bin/ld: fccache.c:(.text+0xcf8):
> undefined reference to `pthread_mutex_destroy'
>
> arm-buildroot-linux-gnueabi/bin/ld: fccache.c:(.text+0xd00):
> undefined reference to `pthread_mutex_lock'
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: removed " 1/1" from patch subject
Thanks, series applied. I really like when we fix pkg-config, and use
it more globally to solve static linking issues. Great work.
Just one minor nit: you had forgotten to add FONTCONFIG_AUTORECONF =
YES in PATCH 1/3: you're now patching configure.ac, so it is needed. I
fixed that when applying.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib
2020-09-20 11:58 [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Bernd Kuhls
` (2 preceding siblings ...)
2020-09-20 13:48 ` [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Thomas Petazzoni
@ 2020-09-29 16:02 ` Peter Korsgaard
3 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-09-29 16:02 UTC (permalink / raw)
To: buildroot
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:
> Fixes:
> http://autobuild.buildroot.net/results/d2d/d2d73f3c7075ca6e9782b9bb591dae40ab56b6a2/
> ffmpeg configure prints: "ERROR: fontconfig not found using pkg-config"
> Please note that the ffmpeg build error was reproducible but with a
> different error message in ffbuild/config.log:
> sysroot/usr/lib/libfontconfig.a(fccache.o): in function `lock_cache':
> fccache.c:(.text+0xcd8): undefined reference to `pthread_mutex_init'
> arm-buildroot-linux-gnueabi/bin/ld: fccache.c:(.text+0xcf8):
> undefined reference to `pthread_mutex_destroy'
> arm-buildroot-linux-gnueabi/bin/ld: fccache.c:(.text+0xd00):
> undefined reference to `pthread_mutex_lock'
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: removed " 1/1" from patch subject
Committed to 2020.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix
2020-09-20 11:58 ` [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix Bernd Kuhls
@ 2020-09-29 16:02 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-09-29 16:02 UTC (permalink / raw)
To: buildroot
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:
> The previous patch added a fix for fontconfig.pc.
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: no changes
Committed to 2020.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] package/ffmpeg: fix static build with wavpack support enabled
2020-09-20 11:58 ` [Buildroot] [PATCH 3/3] package/ffmpeg: fix static build with wavpack support enabled Bernd Kuhls
@ 2020-09-29 16:02 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-09-29 16:02 UTC (permalink / raw)
To: buildroot
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:
> Fixes:
> http://autobuild.buildroot.net/results/d2d/d2d73f3c7075ca6e9782b9bb591dae40ab56b6a2/
> Please note that the wavpack error only occurs after fixing fontconfig.
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Committed to 2020.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-09-29 16:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-20 11:58 [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Bernd Kuhls
2020-09-20 11:58 ` [Buildroot] [PATCH v2 2/3] package/fbterm: remove fontconfig fix Bernd Kuhls
2020-09-29 16:02 ` Peter Korsgaard
2020-09-20 11:58 ` [Buildroot] [PATCH 3/3] package/ffmpeg: fix static build with wavpack support enabled Bernd Kuhls
2020-09-29 16:02 ` Peter Korsgaard
2020-09-20 13:48 ` [Buildroot] [PATCH v2 1/3] package/fontconfig: add pthread as a dependency of a static lib Thomas Petazzoni
2020-09-29 16:02 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.