Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdal 3.6.2: rebuild against libxml2 2.13 #25

Merged
merged 15 commits into from
Aug 6, 2024
8 changes: 7 additions & 1 deletion abs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
build_parameters:
- "--suppress-variables"

aggregate_branch: 3.12
aggregate_branch: libxml_2.13.1

channels:
- https://staging.continuum.io/prefect/fs/libspatialite-feedstock/pr11/e578f96
- https://staging.continuum.io/prefect/fs/fontconfig-feedstock/pr11/5221e48
- https://staging.continuum.io/prefect/fs/gettext-feedstock/pr6/c7dfc15
- https://staging.continuum.io/prefect/fs/libxml2-feedstock/pr17/1c2e862
4 changes: 0 additions & 4 deletions recipe/conda_build_config.yaml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole file can be removed as 10.15 is not the minimum in the default config.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, osx-64 fails:

ld: file not found: /usr/lib/system/libsystem_coretls.dylib for architecture x86_64

clang-14: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [CMakeFiles/GDAL.dir/build.make:2516: libgdal.32.3.6.2.dylib] Error 1
make[1]: *** [CMakeFiles/Makefile2:4315: CMakeFiles/GDAL.dir/all] Error 2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbouss I added a comment about MacOSX SDK 10.14

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- "10.14" # [osx and x86_64]
CONDA_BUILD_SYSROOT: # [osx and x86_64]
- /opt/MacOSX10.10.sdk # [osx and x86_64]
c_compiler: # [win]
skupr-anaconda marked this conversation as resolved.
Show resolved Hide resolved
- vs2019 # [win]
cxx_compiler: # [win]
- vs2019 # [win]
13 changes: 9 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ source:
sha256: 35f40d2e08061b342513cdcddc2b997b3814ef8254514f0ef1e8bc7aa56cf681
patches:
- patches/0001-FindSPATIALITE.patch
# Fix build error with libxml2 2.12. Fixed in gdal v3.9.0,
# see https://github.com/OSGeo/gdal/issues/8746
- patches/cbed9fc91dffba30d0f9a6a06a412a04d9cd36fa.patch
- patches/ec33f6d6dfe944f59dc5454d01b4d000d9479c02.patch

build:
number: 4
number: 5
# never be built on s390x
skip: True # [linux and s390x]
skip: True # [py<36]
Expand Down Expand Up @@ -53,12 +58,12 @@ requirements:
- libtiff
- libuuid # [linux]
- libwebp-base
- libxml2 {{ libxml2 }}
- libxml2 2.13
- lz4-c
- openjpeg
- openssl {{ openssl }}
- pcre2
- poppler
- poppler 22.12.0
- proj
# qhull disabled because of https://github.com/conda-forge/qgis-feedstock/issues/284#issuecomment-1356490896
skupr-anaconda marked this conversation as resolved.
Show resolved Hide resolved
# - qhull
Expand Down Expand Up @@ -122,7 +127,7 @@ outputs:
- openjpeg
- openssl {{ openssl }}
- pcre2
- poppler
- poppler 22.12.0
- proj
# qhull disabled because of https://github.com/conda-forge/qgis-feedstock/issues/284#issuecomment-1356490896
# - qhull
Expand Down
22 changes: 22 additions & 0 deletions recipe/patches/cbed9fc91dffba30d0f9a6a06a412a04d9cd36fa.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From cbed9fc91dffba30d0f9a6a06a412a04d9cd36fa Mon Sep 17 00:00:00 2001
From: Even Rouault <[email protected]>
Date: Sat, 18 Nov 2023 15:38:46 +0100
Subject: [PATCH] Fix build error with libxml2 2.12

---
port/cpl_xml_validate.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/port/cpl_xml_validate.cpp b/port/cpl_xml_validate.cpp
index 7eb49ff40c90..29070d957b65 100644
--- a/port/cpl_xml_validate.cpp
+++ b/port/cpl_xml_validate.cpp
@@ -914,7 +914,7 @@ static void CPLLibXMLWarningErrorCallback(void *ctx, const char *msg, ...)

if (strstr(pszStr, "since this namespace was already imported") == nullptr)
{
- xmlErrorPtr pErrorPtr = xmlGetLastError();
+ const xmlError *pErrorPtr = xmlGetLastError();
const char *pszFilename = static_cast<char *>(ctx);
char *pszStrDup = CPLStrdup(pszStr);
int nLen = static_cast<int>(strlen(pszStrDup));
27 changes: 27 additions & 0 deletions recipe/patches/ec33f6d6dfe944f59dc5454d01b4d000d9479c02.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From ec33f6d6dfe944f59dc5454d01b4d000d9479c02 Mon Sep 17 00:00:00 2001
From: Even Rouault <[email protected]>
Date: Sat, 18 Nov 2023 16:33:25 +0100
Subject: [PATCH] Fix build error with libxml2 2.12 (cont'd)

---
gcore/gdaljp2metadatagenerator.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcore/gdaljp2metadatagenerator.cpp b/gcore/gdaljp2metadatagenerator.cpp
index b6caa2db9def..751fa3d5e9dd 100644
--- a/gcore/gdaljp2metadatagenerator.cpp
+++ b/gcore/gdaljp2metadatagenerator.cpp
@@ -357,7 +357,12 @@ static CPLString GDALGMLJP2EvalExpr(const CPLString &osTemplate,
/************************************************************************/

static void GDALGMLJP2XPathErrorHandler(void * /* userData */,
- xmlErrorPtr error)
+#if LIBXML_VERSION >= 21200
+ const xmlError *error
+#else
+ xmlErrorPtr error
+#endif
+)
{
if (error->domain == XML_FROM_XPATH && error->str1 != nullptr &&
error->int1 < static_cast<int>(strlen(error->str1)))