All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory
@ 2024-01-02 11:46 Fabrice Fontaine
  2024-01-02 11:46 ` [Buildroot] [PATCH v2,2/2] package/gdal: bump to version 3.8.2 Fabrice Fontaine
  2024-01-02 20:21 ` [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-01-02 11:46 UTC (permalink / raw)
  To: buildroot; +Cc: Dominik Michael Rauh, Fabrice Fontaine

giflib and qhull are mandatory since the addition of the package in
commit 1e64fa2956171cdc9d6e6c8896b4b589ce573513 and
https://github.com/OSGeo/gdal/commit/cb136fc051341ab99579daae3c8d8246fe918a76

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/gdal/Config.in |  4 +++-
 package/gdal/gdal.mk   | 16 +++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/package/gdal/Config.in b/package/gdal/Config.in
index ee7209566a..24a1f06af2 100644
--- a/package/gdal/Config.in
+++ b/package/gdal/Config.in
@@ -1,18 +1,20 @@
 config BR2_PACKAGE_GDAL
 	bool "gdal"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
-	depends on BR2_INSTALL_LIBSTDCPP # proj
+	depends on BR2_INSTALL_LIBSTDCPP # proj, qhull
 	# configure can't find proj, when linking statically
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj
 	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
 	depends on BR2_TOOLCHAIN_HAS_THREADS # proj
 	depends on BR2_USE_WCHAR # proj
+	select BR2_PACKAGE_GIFLIB
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_JSON_C
 	select BR2_PACKAGE_LIBGEOTIFF
 	select BR2_PACKAGE_LIBPNG
 	select BR2_PACKAGE_PROJ
+	select BR2_PACKAGE_QHULL
 	select BR2_PACKAGE_ZLIB
 	help
 	  GDAL is a translator library for raster and vector geospatial
diff --git a/package/gdal/gdal.mk b/package/gdal/gdal.mk
index 3f39aa657a..7ab4f1a331 100644
--- a/package/gdal/gdal.mk
+++ b/package/gdal/gdal.mk
@@ -20,16 +20,28 @@ GDAL_SUPPORTS_IN_SOURCE_BUILD = NO
 # enabled but it seems, in contrast to mrf driver support, that they
 # can be implicitly disabled, by configuring gdal without their
 # respectively needed dependencies.
-GDAL_DEPENDENCIES = host-pkgconf jpeg json-c libgeotiff libpng proj tiff zlib
+GDAL_DEPENDENCIES = \
+	giflib \
+	host-pkgconf \
+	jpeg \
+	json-c \
+	libgeotiff \
+	libpng \
+	proj \
+	qhull \
+	tiff \
+	zlib
 
 # Yes, even though they have -DDGDAL_USE options, a few libraries are
 # mandatory. If we don't provide them, bundled versions are used.
 GDAL_CONF_OPTS = \
 	-DGDAL_USE_GEOTIFF=ON \
+	-DGDAL_USE_GIF=ON \
 	-DGDAL_USE_JPEG=ON \
 	-DGDAL_USE_JSONC=ON \
 	-DGDAL_USE_ZLIB=ON \
 	-DGDAL_USE_PNG=ON \
+	-DGDAL_USE_QHULL=ON \
 	-DGDAL_USE_ARMADILLO=OFF \
 	-DGDAL_USE_BLOSC=OFF \
 	-DGDAL_USE_BRUNSLI=OFF \
@@ -57,7 +69,6 @@ GDAL_CONF_OPTS = \
 	-DGDAL_USE_KDU=OFF \
 	-DGDAL_USE_KEA=OFF \
 	-DGDAL_USE_LERC=OFF \
-	-DGDAL_USE_GIF=OFF \
 	-DGDAL_USE_LIBLZMA=OFF \
 	-DGDAL_USE_DEFLATE=OFF \
 	-DGDAL_USE_MONGOCXX=OFF \
@@ -76,7 +87,6 @@ GDAL_CONF_OPTS = \
 	-DGDAL_USE_PDFIUM=OFF \
 	-DGDAL_USE_PODOFO=OFF \
 	-DGDAL_USE_POPPLER=OFF \
-	-DGDAL_USE_QHULL=OFF \
 	-DGDAL_USE_RASDAMAN=OFF \
 	-DGDAL_USE_RASTERLITE2=OFF \
 	-DGDAL_USE_RDB=OFF \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v2,2/2] package/gdal: bump to version 3.8.2
  2024-01-02 11:46 [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory Fabrice Fontaine
@ 2024-01-02 11:46 ` Fabrice Fontaine
  2024-01-02 20:21 ` [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-01-02 11:46 UTC (permalink / raw)
  To: buildroot; +Cc: Dominik Michael Rauh, Fabrice Fontaine

- Drop patch (already in version)
- Rasdaman driver has been removed with
  https://github.com/OSGeo/gdal/commit/2464c7699271a413832256a823cd9340a6010ddf
- This bump will fix the following build failure with libxml2 >= 2.12
  raised since commit d8ac52108c12f0fcc9641b63e7922009270f96c6 thanks to
  https://github.com/OSGeo/gdal/commit/cbed9fc91dffba30d0f9a6a06a412a04d9cd36fa:

/home/buildroot/autobuild/instance-3/output-1/build/gdal-3.6.2/port/cpl_xml_validate.cpp: In function 'void CPLLibXMLWarningErrorCallback(void*, const char*, ...)':
/home/buildroot/autobuild/instance-3/output-1/build/gdal-3.6.2/port/cpl_xml_validate.cpp:917:48: error: invalid conversion from 'const xmlError*' {aka 'const _xmlError*'} to 'xmlErrorPtr' {aka '_xmlError*'} [-fpermissive]
  917 |         xmlErrorPtr pErrorPtr = xmlGetLastError();
      |                                 ~~~~~~~~~~~~~~~^~
      |                                                |
      |                                                const xmlError* {aka const _xmlError*}

https://github.com/OSGeo/gdal/blob/v3.8.2/NEWS.md

Fixes:
 - http://autobuild.buildroot.org/results/e258305b42dcfdbefec656015929c384444f49b5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
 - Rebase patch after the one making giflib and qhull mandatory

 .checkpackageignore                           |   1 -
 .../0001-fix-uclibc-build-without-NPTL.patch  | 102 ------------------
 package/gdal/gdal.hash                        |   6 +-
 package/gdal/gdal.mk                          |   3 +-
 4 files changed, 4 insertions(+), 108 deletions(-)
 delete mode 100644 package/gdal/0001-fix-uclibc-build-without-NPTL.patch

diff --git a/.checkpackageignore b/.checkpackageignore
index aa8a6abc4f..b8b4501f94 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -455,7 +455,6 @@ package/gcc/arc-2020.09-release/0001-arc-Refurbish-adc-sbc-patterns.patch Upstre
 package/gcc/arc-2020.09-release/0002-libsanitizer-Remove-cyclades-from-libsanitizer.patch Sob Upstream
 package/gcc/arc-2020.09-release/0100-uclibc-conf.patch Upstream
 package/gcr/0001-meson-Fix-unknown-kw-argument-in-gnome.generate_gir.patch Upstream
-package/gdal/0001-fix-uclibc-build-without-NPTL.patch Upstream
 package/gdb/12.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch Upstream
 package/gdb/12.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch Upstream
 package/gdb/12.1/0003-use-asm-sgidefs.h.patch Upstream
diff --git a/package/gdal/0001-fix-uclibc-build-without-NPTL.patch b/package/gdal/0001-fix-uclibc-build-without-NPTL.patch
deleted file mode 100644
index 6ecbfc7f95..0000000000
--- a/package/gdal/0001-fix-uclibc-build-without-NPTL.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 0d3ee8a7661dcd85a9d7b636124af32de8d1b2f1 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Sun, 26 Feb 2023 11:31:23 +0100
-Subject: [PATCH] fix uclibc build without NPTL
-
-Check for pthread_spin_lock instead of pthread_spin_lock_t to avoid the
-following uclibc build failure:
-
-/tmp/instance-7/output-1/build/gdal-3.5.2/port/cpl_multiproc.cpp: In function 'CPLSpinLock* CPLCreateSpinLock()':
-/tmp/instance-7/output-1/build/gdal-3.5.2/port/cpl_multiproc.cpp:2265:9: error: 'pthread_spin_init' was not declared in this scope; did you mean 'pthread_cond_init'?
- 2265 |         pthread_spin_init(&(psSpin->spin), PTHREAD_PROCESS_PRIVATE) == 0 )
-      |         ^~~~~~~~~~~~~~~~~
-      |         pthread_cond_init
-/tmp/instance-7/output-1/build/gdal-3.5.2/port/cpl_multiproc.cpp: In function 'int CPLAcquireSpinLock(CPLSpinLock*)':
-/tmp/instance-7/output-1/build/gdal-3.5.2/port/cpl_multiproc.cpp:2283:12: error: 'pthread_spin_lock' was not declared in this scope; did you mean 'pthread_spinlock_t'?
- 2283 |     return pthread_spin_lock( &(psSpin->spin) ) == 0;
-      |            ^~~~~~~~~~~~~~~~~
-      |            pthread_spinlock_t
-
-Fixes:
- - http://autobuild.buildroot.org/results/aa2a88990a07e551c40efb0c2180768add600c4f
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/OSGeo/gdal/pull/7318]
----
- cmake/helpers/configure.cmake  | 4 ++--
- cmake/template/cpl_config.h.in | 4 ++--
- port/cpl_config.h.in           | 4 ++--
- port/cpl_multiproc.cpp         | 4 ++--
- 4 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/cmake/helpers/configure.cmake b/cmake/helpers/configure.cmake
-index 08549df434..62a4f636ba 100644
---- a/cmake/helpers/configure.cmake
-+++ b/cmake/helpers/configure.cmake
-@@ -110,9 +110,9 @@ else ()
-     "
-         #define _GNU_SOURCE
-         #include <pthread.h>
--        int main() { pthread_spinlock_t spin; return 1; }
-+        int main() { pthread_spinlock_t spin; return pthread_spin_lock(&spin); }
-         "
--    HAVE_PTHREAD_SPINLOCK)
-+    HAVE_PTHREAD_SPIN_LOCK)
- 
-   check_c_source_compiles(
-     "
-diff --git a/cmake/template/cpl_config.h.in b/cmake/template/cpl_config.h.in
-index cfa7da94aa..d1fd80bda9 100644
---- a/cmake/template/cpl_config.h.in
-+++ b/cmake/template/cpl_config.h.in
-@@ -61,8 +61,8 @@
- /* Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant. */
- #cmakedefine HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1
- 
--/* Define to 1 if you have the `pthread_spinlock_t' type. */
--#cmakedefine HAVE_PTHREAD_SPINLOCK 1
-+/* Define to 1 if you have the `pthread_spin_lock' function. */
-+#cmakedefine HAVE_PTHREAD_SPIN_LOCK 1
- 
- /* Define to 1 if you have the `pthread_atfork' function. */
- #cmakedefine HAVE_PTHREAD_ATFORK 1
-diff --git a/port/cpl_config.h.in b/port/cpl_config.h.in
-index ea28efb3f0..09a48f242d 100644
---- a/port/cpl_config.h.in
-+++ b/port/cpl_config.h.in
-@@ -51,8 +51,8 @@
- /* Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant. */
- #undef HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
- 
--/* Define to 1 if you have the `pthread_spinlock_t' type. */
--#undef HAVE_PTHREAD_SPINLOCK
-+/* Define to 1 if you have the `pthread_spin_lock' function. */
-+#undef HAVE_PTHREAD_SPIN_LOCK
- 
- /* Define to 1 if you have the 5 args `mremap' function. */
- #undef HAVE_5ARGS_MREMAP
-diff --git a/port/cpl_multiproc.cpp b/port/cpl_multiproc.cpp
-index 7f5bcd9127..474ff5bb29 100644
---- a/port/cpl_multiproc.cpp
-+++ b/port/cpl_multiproc.cpp
-@@ -2232,7 +2232,7 @@ void CPLCleanupTLS()
- /*                          CPLCreateSpinLock()                         */
- /************************************************************************/
- 
--#if defined(HAVE_PTHREAD_SPINLOCK)
-+#if defined(HAVE_PTHREAD_SPIN_LOCK)
- #define HAVE_SPINLOCK_IMPL
- 
- struct _CPLSpinLock
-@@ -2310,7 +2310,7 @@ void CPLDestroySpinLock(CPLSpinLock *psSpin)
-     pthread_spin_destroy(&(psSpin->spin));
-     free(psSpin);
- }
--#endif  // HAVE_PTHREAD_SPINLOCK
-+#endif  // HAVE_PTHREAD_SPIN_LOCK
- 
- #endif  // def CPL_MULTIPROC_PTHREAD
- 
--- 
-2.39.1
-
diff --git a/package/gdal/gdal.hash b/package/gdal/gdal.hash
index d0b08b4535..baec7c910e 100644
--- a/package/gdal/gdal.hash
+++ b/package/gdal/gdal.hash
@@ -1,6 +1,6 @@
-# md5 from: https://download.osgeo.org/gdal/3.6.2/gdal-3.6.2.tar.gz.md5, sha256 locally computed:
-md5  6f22ffdbd8e00059ddb2b825c5920c4c  gdal-3.6.2.tar.xz
-sha256  35f40d2e08061b342513cdcddc2b997b3814ef8254514f0ef1e8bc7aa56cf681  gdal-3.6.2.tar.xz
+# md5 from: https://download.osgeo.org/gdal/3.8.2/gdal-3.8.2.tar.gz.md5, sha256 locally computed:
+md5  178461c9c1cd4503e36559a1063bb752  gdal-3.8.2.tar.xz
+sha256  dc2921ee1cf7a5c0498e94d15fb9ab9c9689c296363a1d021fc3293dd242b4db  gdal-3.8.2.tar.xz
 
 # Hashes of license files:
 sha256  1dae3468e81d00da56e2936f74d33b8b3ad09d726437f19ce209a5dabea41f77  LICENSE.TXT
diff --git a/package/gdal/gdal.mk b/package/gdal/gdal.mk
index 7ab4f1a331..13f38173fa 100644
--- a/package/gdal/gdal.mk
+++ b/package/gdal/gdal.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GDAL_VERSION = 3.6.2
+GDAL_VERSION = 3.8.2
 GDAL_SITE = https://download.osgeo.org/gdal/$(GDAL_VERSION)
 GDAL_SOURCE = gdal-$(GDAL_VERSION).tar.xz
 GDAL_LICENSE = Apache-2.0, ISC, MIT, many others
@@ -87,7 +87,6 @@ GDAL_CONF_OPTS = \
 	-DGDAL_USE_PDFIUM=OFF \
 	-DGDAL_USE_PODOFO=OFF \
 	-DGDAL_USE_POPPLER=OFF \
-	-DGDAL_USE_RASDAMAN=OFF \
 	-DGDAL_USE_RASTERLITE2=OFF \
 	-DGDAL_USE_RDB=OFF \
 	-DGDAL_USE_SFCGAL=OFF \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory
  2024-01-02 11:46 [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory Fabrice Fontaine
  2024-01-02 11:46 ` [Buildroot] [PATCH v2,2/2] package/gdal: bump to version 3.8.2 Fabrice Fontaine
@ 2024-01-02 20:21 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-01-02 20:21 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Dominik Michael Rauh, buildroot

Hello Fabrice,

On Tue,  2 Jan 2024 12:46:42 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> giflib and qhull are mandatory since the addition of the package in
> commit 1e64fa2956171cdc9d6e6c8896b4b589ce573513 and
> https://github.com/OSGeo/gdal/commit/cb136fc051341ab99579daae3c8d8246fe918a76
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Thanks for the patch, but this needs a bit more explanation. If these
dependencies are mandatory, how did we not notice since the package was
added in 1e64fa2956171cdc9d6e6c8896b4b589ce573513 1.5 years ago?

Is it that gdal has a bundled version that gets used? If not, do we
have autobuilder failures for this issue?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-02 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 11:46 [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory Fabrice Fontaine
2024-01-02 11:46 ` [Buildroot] [PATCH v2,2/2] package/gdal: bump to version 3.8.2 Fabrice Fontaine
2024-01-02 20:21 ` [Buildroot] [PATCH v2, 1/2] package/gdal: giflib and qhull are mandatory Thomas Petazzoni via buildroot

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.