From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/lcms2: fix static building with tiff
Date: Fri, 12 Feb 2021 21:00:06 +0100 [thread overview]
Message-ID: <20210212200006.2394292-1-fontaine.fabrice@gmail.com> (raw)
Strangely enough, we have only one build failure on the autobuilder even
if lcms2 never used pkg-config to retrieve static dependencies of tiff
(which also depends on xz since 2016)
Fixes:
- http://autobuild.buildroot.org/results/07c5ca780bcdbfcd7cad6502345f1553ce17bdc3
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...gure.ac-fix-static-linking-with-tiff.patch | 37 +++++++++++++++++++
package/lcms2/lcms2.mk | 4 +-
2 files changed, 40 insertions(+), 1 deletion(-)
create mode 100644 package/lcms2/0001-configure.ac-fix-static-linking-with-tiff.patch
diff --git a/package/lcms2/0001-configure.ac-fix-static-linking-with-tiff.patch b/package/lcms2/0001-configure.ac-fix-static-linking-with-tiff.patch
new file mode 100644
index 0000000000..9b7ad7c506
--- /dev/null
+++ b/package/lcms2/0001-configure.ac-fix-static-linking-with-tiff.patch
@@ -0,0 +1,37 @@
+From 49eed94b8a1d3fda2d00f0120e14c4d78cc5e840 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 12 Feb 2021 09:28:39 +0100
+Subject: [PATCH] configure.ac: fix static linking with tiff
+
+Use pkg-config to retrieve the dependencies of tiff (e.g. xz) to fix
+the following static build failure:
+
+libtool: link: /home/buildroot/autobuild/run/instance-2/output-1/host/bin/xtensa-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -Os -static -fvisibility=hidden -static -static -o tificc tificc.o ../common/xgetopt.o ../common/vprf.o ../../src/.libs/liblcms2.a -ltiff -ljpeg -lz -lm -lpthread
+/home/buildroot/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/xtensa-buildroot-linux-uclibc/9.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/run/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libtiff.a(tif_lzma.o): in function `LZMAEncode':
+tif_lzma.c:(.text+0x168): undefined reference to `lzma_code'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/07c5ca780bcdbfcd7cad6502345f1553ce17bdc3
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/mm2/Little-CMS/pull/244]
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b3c8f2b..96440fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -330,7 +330,7 @@ then
+ AC_MSG_RESULT(no -- some components failed test)
+ have_tiff='no (failed tests)'
+ else
+- LIB_TIFF='-ltiff'
++ PKG_CHECK_MODULES(PC_TIFF,libtiff-4,LIB_TIFF=$PC_TIFF_LIBS,LIB_TIFF='-ltiff')
+ LIBS="$LIB_TIFF $LIBS"
+ AC_DEFINE(HasTIFF,1,Define if you have TIFF library)
+ AC_MSG_RESULT(yes)
+--
+2.29.2
+
diff --git a/package/lcms2/lcms2.mk b/package/lcms2/lcms2.mk
index 862fdd5896..3797c857cb 100644
--- a/package/lcms2/lcms2.mk
+++ b/package/lcms2/lcms2.mk
@@ -11,6 +11,8 @@ LCMS2_LICENSE_FILES = COPYING
LCMS2_CPE_ID_VENDOR = littlecms
LCMS2_CPE_ID_PRODUCT = little_cms
LCMS2_INSTALL_STAGING = YES
+# We're patching configure.ac
+LCMS2_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_JPEG),y)
LCMS2_CONF_OPTS += --with-jpeg
@@ -21,7 +23,7 @@ endif
ifeq ($(BR2_PACKAGE_TIFF),y)
LCMS2_CONF_OPTS += --with-tiff
-LCMS2_DEPENDENCIES += tiff
+LCMS2_DEPENDENCIES += host-pkgconf tiff
else
LCMS2_CONF_OPTS += --without-tiff
endif
--
2.29.2
next reply other threads:[~2021-02-12 20:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 20:00 Fabrice Fontaine [this message]
2021-02-13 21:37 ` [Buildroot] [PATCH 1/1] package/lcms2: fix static building with tiff Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210212200006.2394292-1-fontaine.fabrice@gmail.com \
--to=fontaine.fabrice@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.