* [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff
@ 2019-10-09 17:03 Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 2/3] package/proj: add -lsdtc++ to Libs.Private Fabrice Fontaine
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2019-10-09 17:03 UTC (permalink / raw)
To: buildroot
Put back patch that was wrongly removed when bumping libgeotiff to
version 1.5.1 in commit 1edf0383a6a9d17a27d831bb02833870655d43d9
Fixes:
- http://autobuild.buildroot.org/results/3eb3d41d3288c08616b68d52fdc7525c57c8e023
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...Use-pkg-config-for-libtiff-detection.patch | 49 +++++++++++++++++++
package/libgeotiff/libgeotiff.mk | 2 +
2 files changed, 51 insertions(+)
create mode 100644 package/libgeotiff/0001-Use-pkg-config-for-libtiff-detection.patch
diff --git a/package/libgeotiff/0001-Use-pkg-config-for-libtiff-detection.patch b/package/libgeotiff/0001-Use-pkg-config-for-libtiff-detection.patch
new file mode 100644
index 0000000000..e2ce26e97c
--- /dev/null
+++ b/package/libgeotiff/0001-Use-pkg-config-for-libtiff-detection.patch
@@ -0,0 +1,49 @@
+From 2fbae8298d7cc976d7c0f329fc26dafe57fb0fc4 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 1 Apr 2019 08:04:39 +0200
+Subject: [PATCH] Use pkg-config for libtiff detection
+
+Using pkg-config allows proper behavior in static-only contexts: the
+libtiff library might depend on libz and libjpeg.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Patch retrieved (and slightly updated) from:
+https://git.buildroot.net/buildroot/tree/package/libgeotiff/0001-use-pkg-config.patch]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved (and slightly updated) from:
+https://github.com/OSGeo/libgeotiff/commit/2fbae8298d7cc976d7c0f329fc26dafe57fb0fc4]
+---
+ libgeotiff/configure.ac | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index aa38af4..c3395d5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -211,16 +211,18 @@ if test "$with_libtiff" != "" ; then
+ libgeotiff. Please upgrade or use an older version of libgeotiff.]),-lm)
+ LIBS="$LIBS_SAVED"
+ else
+- AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
+- AC_MSG_ERROR([You will need to substantially rewrite libxtiff to
++ PKG_CHECK_MODULES(LIBTIFF, libtiff-4,
++ [TIFF_INC="$LIBTIFF_CFLAGS" LIBS="$LIBS $LIBTIFF_LIBS" TIFF_CONFIG="yes"],
++ [AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
++ AC_MSG_ERROR([You will need to substantially rewrite libxtiff to
+ build libgeotiff without libtiff]),-lm)
+- LIBS_SAVED="$LIBS"
+- AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
+- AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
++ LIBS_SAVED="$LIBS"
++ AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
++ AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
+ libgeotiff. Please upgrade libtiff or use an older version of libgeotiff.]),-lm)
+- LIBS="$LIBS -ltiff"
+- TIFF_INC=
+- TIFF_CONFIG="yes"
++ LIBS="$LIBS -ltiff"
++ TIFF_INC=
++ TIFF_CONFIG="yes"])
+ fi
+
+
diff --git a/package/libgeotiff/libgeotiff.mk b/package/libgeotiff/libgeotiff.mk
index 4fc229cf0b..5a3c487d00 100644
--- a/package/libgeotiff/libgeotiff.mk
+++ b/package/libgeotiff/libgeotiff.mk
@@ -11,6 +11,8 @@ LIBGEOTIFF_LICENSE_FILES = LICENSE
LIBGEOTIFF_DEPENDENCIES = proj tiff host-pkgconf
LIBGEOTIFF_INSTALL_STAGING = YES
LIBGEOTIFF_CONF_OPTS = --with-proj=$(STAGING_DIR)/usr
+# We're patching configure.ac
+LIBGEOTIFF_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_ZLIB),y)
LIBGEOTIFF_DEPENDENCIES += zlib
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/3] package/proj: add -lsdtc++ to Libs.Private
2019-10-09 17:03 [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Fabrice Fontaine
@ 2019-10-09 17:03 ` Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 3/3] package/libgeotiff: fix static linking with proj Fabrice Fontaine
2019-10-10 21:14 ` [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2019-10-09 17:03 UTC (permalink / raw)
To: buildroot
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
.../0001-proj.pc.in-add-Libs.Private.patch | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 package/proj/0001-proj.pc.in-add-Libs.Private.patch
diff --git a/package/proj/0001-proj.pc.in-add-Libs.Private.patch b/package/proj/0001-proj.pc.in-add-Libs.Private.patch
new file mode 100644
index 0000000000..5032ede647
--- /dev/null
+++ b/package/proj/0001-proj.pc.in-add-Libs.Private.patch
@@ -0,0 +1,27 @@
+From bdee73f3e0d8b4b6f2b6e0edb945dbd9abfd3255 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 9 Oct 2019 15:24:08 +0200
+Subject: [PATCH] proj.pc.in: add Libs.Private
+
+Add -lstdc++ to Libs.Private to allow packages such as libgeotiff to
+retrieve this dependency when linking statically with proj
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/OSGeo/PROJ/pull/1664]
+---
+ proj.pc.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/proj.pc.in b/proj.pc.in
+index a6a5d75f..001f08a1 100644
+--- a/proj.pc.in
++++ b/proj.pc.in
+@@ -9,4 +9,5 @@ Description: Cartographic Projections Library.
+ Requires:
+ Version: @VERSION@
+ Libs: -L${libdir} -lproj
++Libs.Private: -lstdc++
+ Cflags: -I${includedir}
+--
+2.23.0
+
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 3/3] package/libgeotiff: fix static linking with proj
2019-10-09 17:03 [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 2/3] package/proj: add -lsdtc++ to Libs.Private Fabrice Fontaine
@ 2019-10-09 17:03 ` Fabrice Fontaine
2019-10-10 21:14 ` [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2019-10-09 17:03 UTC (permalink / raw)
To: buildroot
Use pkg-config to retrieve proj static dependency such as -lstdc++
Fixes:
- http://autobuild.buildroot.org/results/77721989e5b057995e6c5f1f184fe368d8a8fa78
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...e-pkg-config-to-find-proj-dependency.patch | 37 +++++++++++++++++++
package/libgeotiff/libgeotiff.mk | 1 -
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 package/libgeotiff/0002-configure.ac-use-pkg-config-to-find-proj-dependency.patch
diff --git a/package/libgeotiff/0002-configure.ac-use-pkg-config-to-find-proj-dependency.patch b/package/libgeotiff/0002-configure.ac-use-pkg-config-to-find-proj-dependency.patch
new file mode 100644
index 0000000000..faf409cd5e
--- /dev/null
+++ b/package/libgeotiff/0002-configure.ac-use-pkg-config-to-find-proj-dependency.patch
@@ -0,0 +1,37 @@
+From 33937e2861fda87dc314378bf87db2c766c37a6b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 9 Oct 2019 15:11:34 +0200
+Subject: [PATCH] configure.ac: use pkg-config to find proj dependency
+
+Use pkg-config to retrieve proj and its static dependencies such as
+-lstdc++
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/OSGeo/libgeotiff/pull/24]
+---
+ libgeotiff/configure.ac | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/libgeotiff/configure.ac
+index c3395d5..f7a8f28 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -246,9 +246,12 @@ if test "x$with_proj" = "xno" ; then
+ else
+
+ if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then
+- ORIG_LIBS="$LIBS"
+- LIBS="-lproj $ORIG_LIBS"
+- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
++ PKG_CHECK_MODULES(PROJ, proj, [LIBS="$LIBS $PROJ_LIBS" PROJ_FOUND=yes], [PROJ_FOUND=no])
++ if test "$PROJ_FOUND" = "no"; then
++ ORIG_LIBS="$LIBS"
++ LIBS="-lproj $ORIG_LIBS"
++ AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
++ fi
+ if test "$PROJ_FOUND" = "no"; then
+ AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
+ if test "$PROJ_FOUND" = "yes"; then
+--
+2.23.0
+
diff --git a/package/libgeotiff/libgeotiff.mk b/package/libgeotiff/libgeotiff.mk
index 5a3c487d00..c196b804a2 100644
--- a/package/libgeotiff/libgeotiff.mk
+++ b/package/libgeotiff/libgeotiff.mk
@@ -10,7 +10,6 @@ LIBGEOTIFF_LICENSE = X11-style, public domain
LIBGEOTIFF_LICENSE_FILES = LICENSE
LIBGEOTIFF_DEPENDENCIES = proj tiff host-pkgconf
LIBGEOTIFF_INSTALL_STAGING = YES
-LIBGEOTIFF_CONF_OPTS = --with-proj=$(STAGING_DIR)/usr
# We're patching configure.ac
LIBGEOTIFF_AUTORECONF = YES
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff
2019-10-09 17:03 [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 2/3] package/proj: add -lsdtc++ to Libs.Private Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 3/3] package/libgeotiff: fix static linking with proj Fabrice Fontaine
@ 2019-10-10 21:14 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-10-10 21:14 UTC (permalink / raw)
To: buildroot
On Wed, 9 Oct 2019 19:03:23 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Put back patch that was wrongly removed when bumping libgeotiff to
> version 1.5.1 in commit 1edf0383a6a9d17a27d831bb02833870655d43d9
>
> Fixes:
> - http://autobuild.buildroot.org/results/3eb3d41d3288c08616b68d52fdc7525c57c8e023
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...Use-pkg-config-for-libtiff-detection.patch | 49 +++++++++++++++++++
> package/libgeotiff/libgeotiff.mk | 2 +
> 2 files changed, 51 insertions(+)
> create mode 100644 package/libgeotiff/0001-Use-pkg-config-for-libtiff-detection.patch
Series applied, thanks. In PATCH 2/3, the solution to add -lstdc++ is
not great, as we really hardcode something that is quite internal to
the toolchain, but there's no other easy way to solve this.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-10 21:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 17:03 [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 2/3] package/proj: add -lsdtc++ to Libs.Private Fabrice Fontaine
2019-10-09 17:03 ` [Buildroot] [PATCH 3/3] package/libgeotiff: fix static linking with proj Fabrice Fontaine
2019-10-10 21:14 ` [Buildroot] [PATCH 1/3] package/libgeotiff: fix static linking with tiff Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox