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] Bump to v3.7.1 #7050

Merged
merged 32 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7e490aa
[GDAL] Bump to v3.7.1
jeremiahpslewis Jul 13, 2023
c92f998
Missing comma
jeremiahpslewis Jul 13, 2023
1f7ca46
Switch to gitsource
jeremiahpslewis Jul 13, 2023
866638f
Update G/GDAL/build_tarballs.jl
jeremiahpslewis Jul 13, 2023
fcb11fa
Update build_tarballs.jl
jeremiahpslewis Jul 13, 2023
793041f
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
81e76dd
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
f25332a
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
dc7a80c
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
653aa7b
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
35150dc
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
ebfb545
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
12129fd
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
13f2dc1
tweak ldflags
jeremiahpslewis Jul 14, 2023
2005c2f
Update build_tarballs.jl
jeremiahpslewis Jul 14, 2023
7584fde
use gcc for freebsd
jeremiahpslewis Jul 14, 2023
02b76ad
add patch
jeremiahpslewis Jul 14, 2023
d0fede4
tweak paths
jeremiahpslewis Jul 14, 2023
c71d311
Fix ordering, etc.
jeremiahpslewis Jul 14, 2023
57fe585
Add back dependency bounds
jeremiahpslewis Jul 14, 2023
7472e8e
Fix bsd patch
jeremiahpslewis Jul 14, 2023
73dd2cf
Apply patch for all platforms
jeremiahpslewis Jul 14, 2023
1185d86
Bump HDF5
jeremiahpslewis Jul 14, 2023
a7b9188
Update G/GDAL/build_tarballs.jl
jeremiahpslewis Sep 19, 2023
0b420d3
expand hdf5 platforms, bump gdal
jeremiahpslewis Sep 19, 2023
99e4614
Update G/GDAL/build_tarballs.jl
jeremiahpslewis Sep 19, 2023
4866b99
Update G/GDAL/build_tarballs.jl
jeremiahpslewis Sep 19, 2023
1065a79
move license.txt import
jeremiahpslewis Sep 19, 2023
c20bd64
trigger build...
jeremiahpslewis Sep 21, 2023
879920a
Merge branch 'master' into patch-36
jeremiahpslewis Sep 21, 2023
07c93bf
Update build_tarballs.jl
jeremiahpslewis Sep 21, 2023
e980c5d
Update build_tarballs.jl
jeremiahpslewis Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 44 additions & 38 deletions G/GDAL/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@
using BinaryBuilder, Pkg

name = "GDAL"
upstream_version = v"3.6.2"
version_offset = v"1.0.0"
Copy link
Contributor

@visr visr Sep 22, 2023

Choose a reason for hiding this comment

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

Sorry I missed this in review, but this version offset should not have been set back to 0, since now the major version is v300, while the previous one was v301. Should we yank v300.700.200 from the registry and create a new v301 build?

Copy link
Member

Choose a reason for hiding this comment

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

Probably good, yeah

upstream_version = v"3.7.2"
version_offset = v"0.0.0"
version = VersionNumber(upstream_version.major * 100 + version_offset.major,
upstream_version.minor * 100 + version_offset.minor,
upstream_version.patch * 100 + version_offset.patch)

# Collection of sources required to build GDAL
sources = [
ArchiveSource("https://github.com/OSGeo/gdal/releases/download/v$upstream_version/gdal-$upstream_version.tar.gz",
"cd5bf004af85b88414676b0d5694d3192414e556961ee3d47164f3298078a818"),
GitSource("https://github.com/OSGeo/gdal.git",
jeremiahpslewis marked this conversation as resolved.
Show resolved Hide resolved
"f74cd4144199fd7667e5c151a251cdbad1f44641"),
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz",
"2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62"),
DirectorySource("./bundled")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/gdal-*/
install_license LICENSE.TXT
cd $WORKSPACE/srcdir/gdal

mkdir build
cd build
atomic_patch -p1 ../patches/bsd-environ-undefined-fix.patch

if [[ "${target}" == *-freebsd* ]]; then
# Our FreeBSD libc has `environ` as undefined symbol, so the linker will
Expand All @@ -48,28 +47,30 @@ if [[ "${target}" == x86_64-apple-darwin* ]]; then
popd
fi

mkdir build && cd build

CMAKE_FLAGS=(-DCMAKE_INSTALL_PREFIX=${prefix}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN}
-DCMAKE_PREFIX_PATH=${prefix}
-DCMAKE_FIND_ROOT_PATH=${prefix}
-DCMAKE_BUILD_TYPE=Release
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_JAVA_BINDINGS=OFF
-DBUILD_CSHARP_BINDINGS=OFF
-DGDAL_USE_CURL=ON
-DGDAL_USE_EXPAT=ON
-DGDAL_USE_GEOTIFF=ON
-DGDAL_USE_GEOS=ON
-DGDAL_USE_OPENJPEG=ON
-DGDAL_USE_SQLITE3=ON
-DGDAL_USE_TIFF=ON
-DGDAL_USE_ZLIB=ON
-DGDAL_USE_ZSTD=ON
-DGDAL_USE_POSTGRESQL=ON
-DPostgreSQL_INCLUDE_DIR=${includedir}
-DPostgreSQL_LIBRARY=${libdir}/libpq.${dlext}
-DGDAL_USE_ARROW=ON
-DGDAL_USE_PARQUET=ON)
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN}
-DCMAKE_PREFIX_PATH=${prefix}
-DCMAKE_FIND_ROOT_PATH=${prefix}
-DCMAKE_BUILD_TYPE=Release
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_JAVA_BINDINGS=OFF
-DBUILD_CSHARP_BINDINGS=OFF
-DGDAL_USE_CURL=ON
-DGDAL_USE_EXPAT=ON
-DGDAL_USE_GEOTIFF=ON
-DGDAL_USE_GEOS=ON
-DGDAL_USE_OPENJPEG=ON
-DGDAL_USE_SQLITE3=ON
-DGDAL_USE_TIFF=ON
-DGDAL_USE_ZLIB=ON
-DGDAL_USE_ZSTD=ON
-DGDAL_USE_POSTGRESQL=ON
-DPostgreSQL_INCLUDE_DIR=${includedir}
-DPostgreSQL_LIBRARY=${libdir}/libpq.${dlext}
-DGDAL_USE_ARROW=ON
-DGDAL_USE_PARQUET=ON)

# NetCDF is the most restrictive dependency as far as platform availability, so we'll use it where applicable but disable it otherwise
if ! find ${libdir} -name "libnetcdf*.${dlext}" -exec false '{}' +; then
Expand All @@ -90,6 +91,8 @@ fi
cmake .. ${CMAKE_FLAGS[@]}
cmake --build . -j${nproc}
cmake --build . -j${nproc} --target install

install_license ../LICENSE.TXT
"""

# These are the platforms we will build for by default, unless further
Expand Down Expand Up @@ -122,30 +125,33 @@ products = [

hdf5_platforms = [
Platform("x86_64", "linux"),
Platform("aarch64", "linux"; libc="glibc"),
Platform("aarch64", "linux"),
Platform("armv6l", "linux"),
Platform("armv7l", "linux"),
Platform("i686", "linux"),
Platform("powerpc64le", "linux"),
Platform("x86_64", "macos"),
Platform("aarch64", "macos"),
Platform("x86_64", "windows"),
Platform("i686", "windows"),
Platform("aarch64", "macos"),
]
hdf5_platforms = expand_cxxstring_abis(hdf5_platforms)

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("GEOS_jll"; compat="~3.11"),
Dependency("PROJ_jll"; compat="~900.100"),
Dependency("GEOS_jll"; compat="3.11.2"),
jeremiahpslewis marked this conversation as resolved.
Show resolved Hide resolved
Dependency("PROJ_jll"; compat="901.300.0"),
Copy link
Member

Choose a reason for hiding this comment

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

PROJ_jll above had a ~ compat specification. @visr what's the usual thing to do here with this package? Is ^ (the default) enough?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I think this is fine. Since PROJ_jll has the 100x version_offset, I figured in #7366 it's easier to tag it as breaking using that, rather than forcing all dependencies to use ~.

Dependency("Zlib_jll"),
Dependency("SQLite_jll"),
Dependency("LibPQ_jll"),
Dependency("OpenJpeg_jll"),
Dependency("Expat_jll"; compat="2.2.10"),
Dependency("Zstd_jll"),
Dependency("Libtiff_jll"; compat="4.3"),
Dependency("libgeotiff_jll"; compat="100.700.100"),
Dependency("Libtiff_jll"; compat="~4.5.1"),
Dependency("libgeotiff_jll"; compat="100.701.100"),
Dependency("LibCURL_jll"; compat="7.73,8"),
Dependency("NetCDF_jll"; compat="400.902.5", platforms=hdf5_platforms),
# Updating to a newer HDF5 version is likely possible without problems but requires rebuilding this package
Dependency("HDF5_jll"; compat="~1.12", platforms=hdf5_platforms),
Dependency("NetCDF_jll"; compat="400.902.208", platforms=hdf5_platforms),
Dependency("HDF5_jll"; compat="~1.14", platforms=hdf5_platforms),
jeremiahpslewis marked this conversation as resolved.
Show resolved Hide resolved
Dependency("Arrow_jll"; compat="10"),
]

Expand Down
13 changes: 13 additions & 0 deletions G/GDAL/bundled/patches/bsd-environ-undefined-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/gdal.cmake b/gdal.cmake
index e221f99b79..9c93be2cd8 100644
--- a/gdal.cmake
+++ b/gdal.cmake
@@ -280,7 +280,7 @@ endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
include(CheckLinkerFlag)
check_linker_flag(C "-Wl,--no-undefined" HAS_NO_UNDEFINED)
- if (HAS_NO_UNDEFINED AND (NOT "${CMAKE_CXX_FLAGS}" MATCHES "-fsanitize") AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
jeremiahpslewis marked this conversation as resolved.
Show resolved Hide resolved
+ if (HAS_NO_UNDEFINED AND (NOT "${CMAKE_CXX_FLAGS}" MATCHES "-fsanitize") AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--no-undefined")
string(APPEND CMAKE_MODULE_LINKER_FLAGS " -Wl,--no-undefined")
endif ()