You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by ph...@apache.org on 2025/06/20 02:22:45 UTC
(incubator-gluten) branch main updated: [VL] Update geos version to 3.10.7 (#10017)
This is an automated email from the ASF dual-hosted git repository.
philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new bcd55e1dc0 [VL] Update geos version to 3.10.7 (#10017)
bcd55e1dc0 is described below
commit bcd55e1dc0c2c28aa0f8d28d7431c136ac53b8b1
Author: BInwei Yang <fe...@apache.org>
AuthorDate: Thu Jun 19 19:22:41 2025 -0700
[VL] Update geos version to 3.10.7 (#10017)
---
dev/vcpkg/ports/geos/fix-exported-config.patch | 24 ++++++--------
dev/vcpkg/ports/geos/geos-build.patch | 46 --------------------------
dev/vcpkg/ports/geos/portfile.cmake | 5 ++-
dev/vcpkg/ports/geos/vcpkg.json | 2 +-
ep/build-velox/src/setup-centos7.sh | 2 +-
ep/build-velox/src/setup-centos8.sh | 2 +-
ep/build-velox/src/setup-openeuler24.sh | 2 +-
ep/build-velox/src/setup-rhel.sh | 14 ++++++--
8 files changed, 29 insertions(+), 68 deletions(-)
diff --git a/dev/vcpkg/ports/geos/fix-exported-config.patch b/dev/vcpkg/ports/geos/fix-exported-config.patch
index 40aa835e0c..65fc0fdee7 100644
--- a/dev/vcpkg/ports/geos/fix-exported-config.patch
+++ b/dev/vcpkg/ports/geos/fix-exported-config.patch
@@ -1,10 +1,9 @@
-diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
-index bc0e774..e3ca0bd 100644
---- a/tools/CMakeLists.txt
-+++ b/tools/CMakeLists.txt
-@@ -45,11 +45,18 @@ function(configure_install_geos_pc)
- set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
- set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
+diff -ur a/tools/CMakeLists.txt b/tools/CMakeLists.txt
+--- a/tools/CMakeLists.txt 2025-06-19 21:04:50.771785881 +0000
++++ b/tools/CMakeLists.txt 2025-06-19 21:07:11.310543155 +0000
+@@ -61,11 +61,18 @@
+ set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
+ endif()
set(VERSION ${GEOS_VERSION})
- set(EXTRA_LIBS "-lstdc++")
+ if(APPLE OR CMAKE_ANDROID_STL_TYPE MATCHES "^c\\+\\+")
@@ -22,7 +21,7 @@ index bc0e774..e3ca0bd 100644
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.in
-@@ -61,9 +68,9 @@ function(configure_install_geos_pc)
+@@ -77,9 +84,9 @@
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endfunction()
@@ -33,10 +32,9 @@ index bc0e774..e3ca0bd 100644
endif()
option(BUILD_ASTYLE "Build astyle (Artistic Style) tool" OFF)
-diff --git a/tools/geos-config.in b/tools/geos-config.in
-index 6eff1eb..8827f6a 100644
---- a/tools/geos-config.in
-+++ b/tools/geos-config.in
+diff -ur a/tools/geos-config.in b/tools/geos-config.in
+--- a/tools/geos-config.in 2025-06-19 21:04:50.771785881 +0000
++++ b/tools/geos-config.in 2025-06-19 21:05:00.354633087 +0000
@@ -1,9 +1,11 @@
#!/bin/sh
@@ -53,7 +51,7 @@ index 6eff1eb..8827f6a 100644
usage()
{
-@@ -47,16 +49,16 @@ while test $# -gt 0; do
+@@ -47,16 +49,16 @@
echo -L${libdir} -lgeos-@VERSION_RELEASE@
;;
--clibs)
diff --git a/dev/vcpkg/ports/geos/geos-build.patch b/dev/vcpkg/ports/geos/geos-build.patch
deleted file mode 100644
index 4194a5f44c..0000000000
--- a/dev/vcpkg/ports/geos/geos-build.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- a/capi/geos_ts_c.cpp
-+++ b/capi/geos_ts_c.cpp
-@@ -2168,7 +2168,7 @@ extern "C" {
- const char* GEOSversion()
- {
- static char version[256];
-- sprintf(version, "%s", GEOS_CAPI_VERSION);
-+ snprintf(version, sizeof(version), "%s", GEOS_CAPI_VERSION);
- return version;
- }
-
---- a/include/geos/io/ByteOrderDataInStream.h
-+++ b/include/geos/io/ByteOrderDataInStream.h
-@@ -22,6 +22,7 @@
-
- #include <geos/export.h>
- #include <cstdint>
-+#include <cstddef>
-
- //#include <geos/io/ParseException.h>
- //#include <geos/io/ByteOrderValues.h>
---- a/tests/unit/math/DDTest.cpp
-+++ b/tests/unit/math/DDTest.cpp
-@@ -160,11 +160,9 @@ struct test_dd_data {
- DD t2 = t*t;
- DD at(0.0);
- DD two(2.0);
-- int k = 0;
- DD d(1.0);
- int sign = 1;
- while (t.doubleValue() > eps) {
-- k++;
- if (sign < 0)
- at = at - (t / d);
- else
-@@ -187,10 +185,8 @@ struct test_dd_data {
- DD s(2.0);
- DD t(1.0);
- double n = 1.0;
-- int i = 0;
- while(t.doubleValue() > eps)
- {
-- i++;
- n += 1.0;
- t = t / DD(n);
- s = s + t;
diff --git a/dev/vcpkg/ports/geos/portfile.cmake b/dev/vcpkg/ports/geos/portfile.cmake
index 6e1874fae3..8a9e12a0d1 100644
--- a/dev/vcpkg/ports/geos/portfile.cmake
+++ b/dev/vcpkg/ports/geos/portfile.cmake
@@ -1,4 +1,4 @@
-set(GEOS_VERSION 3.10.2)
+set(GEOS_VERSION 3.10.7)
vcpkg_download_distfile(
ARCHIVE
@@ -7,7 +7,7 @@ vcpkg_download_distfile(
FILENAME
"geos-${GEOS_VERSION}.tar.bz2"
SHA512
- 390381711ccf56b862c2736cf6329200822f121de1c49df52b8b85cabea8c7787b199df2196acacc2e5c677ff3ebe042d93d70e89deadbc19d754499edb65126
+ 22d91894a5c1449a11da5b9f064a77a55383601fd04b4eb7d2d40f0e85e3bb74389b12c437269b40e0286f2e9d6e90d73de89fadc391f696513f57dc066d8df5
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH
@@ -20,7 +20,6 @@ vcpkg_extract_source_archive_ex(
disable-warning-4996.patch
fix-exported-config.patch
# The two patches below come from Velox.
- geos-build.patch
geos-cmakelists.patch)
if(VCPKG_TARGET_IS_MINGW)
diff --git a/dev/vcpkg/ports/geos/vcpkg.json b/dev/vcpkg/ports/geos/vcpkg.json
index acc9047654..821e392670 100644
--- a/dev/vcpkg/ports/geos/vcpkg.json
+++ b/dev/vcpkg/ports/geos/vcpkg.json
@@ -1,6 +1,6 @@
{
"name": "geos",
- "version": "3.10.2",
+ "version": "3.10.7",
"description": "Geometry Engine Open Source",
"homepage": "https://www.osgeo.org/projects/geos/",
"dependencies": [
diff --git a/ep/build-velox/src/setup-centos7.sh b/ep/build-velox/src/setup-centos7.sh
index 5402e5b0a6..3fa110a40e 100755
--- a/ep/build-velox/src/setup-centos7.sh
+++ b/ep/build-velox/src/setup-centos7.sh
@@ -30,7 +30,7 @@ export CXXFLAGS=$CFLAGS # Used by boost.
export CPPFLAGS=$CFLAGS # Used by LZO.
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
FB_OS_VERSION="v2024.07.01.00"
-GEOS_VERSION="3.10.2"
+GEOS_VERSION="3.10.7"
# shellcheck disable=SC2037
SUDO="sudo -E"
diff --git a/ep/build-velox/src/setup-centos8.sh b/ep/build-velox/src/setup-centos8.sh
index 072bd83bf4..0f13f75bd1 100755
--- a/ep/build-velox/src/setup-centos8.sh
+++ b/ep/build-velox/src/setup-centos8.sh
@@ -46,7 +46,7 @@ DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download}
FB_OS_VERSION="v2024.07.01.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
-GEOS_VERSION="3.10.2"
+GEOS_VERSION="3.10.7"
function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
diff --git a/ep/build-velox/src/setup-openeuler24.sh b/ep/build-velox/src/setup-openeuler24.sh
index 214c7abf63..697869bb31 100755
--- a/ep/build-velox/src/setup-openeuler24.sh
+++ b/ep/build-velox/src/setup-openeuler24.sh
@@ -48,7 +48,7 @@ FB_OS_VERSION="v2024.07.01.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
DUCKDB_VERSION="v0.8.1"
-GEOS_VERSION="3.10.2"
+GEOS_VERSION="3.10.7"
function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
diff --git a/ep/build-velox/src/setup-rhel.sh b/ep/build-velox/src/setup-rhel.sh
old mode 100644
new mode 100755
index f30a937784..9be59d4609
--- a/ep/build-velox/src/setup-rhel.sh
+++ b/ep/build-velox/src/setup-rhel.sh
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# This script documents setting up a Centos8 host for Velox
+# This script documents setting up a rhel host for Velox
# development. Running it should make you ready to compile.
#
#
@@ -38,6 +38,7 @@ export CFLAGS=${CXXFLAGS//"-std=c++17"/} # Used by LZO.
CMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}"
VELOX_BUILD_SHARED=${VELOX_BUILD_SHARED:-"OFF"} #Build folly and gflags shared for use in libvelox.so.
BUILD_DUCKDB="${BUILD_DUCKDB:-true}"
+BUILD_GEOS="${BUILD_GEOS:-true}"
USE_CLANG="${USE_CLANG:-false}"
export INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"}
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download}
@@ -61,6 +62,7 @@ DWARF_VERSION="0.11.1"
BISON_VERSION="bison-3.8.2"
RAPIDJSON_VERSION="v1.1.0"
RE2_VERSION="2023-03-01"
+GEOS_VERSION="3.10.7"
function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
@@ -76,7 +78,7 @@ function install_build_prerequisites {
dnf_install dnf-plugins-core
dnf_install ninja-build cmake gcc-toolset-12 git wget which bzip2
dnf_install autoconf automake python3-devel pip libtool
- dnf install libxml2-devel
+ dnf_install libxml2-devel
pip install cmake==3.28.3
@@ -321,6 +323,13 @@ function install_cuda {
dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed cuda-driver-devel-$dashed
}
+function install_geos {
+ if [[ "$BUILD_GEOS" == "true" ]]; then
+ wget_and_untar https://github.com/libgeos/geos/archive/${GEOS_VERSION}.tar.gz geos
+ cmake_install_dir geos -DBUILD_TESTING=OFF
+ fi
+}
+
function install_velox_deps {
run_and_time install_velox_deps_from_dnf
run_and_time install_conda
@@ -349,6 +358,7 @@ function install_velox_deps {
run_and_time install_duckdb
run_and_time install_stemmer
run_and_time install_thrift
+ run_and_time install_geos
}
(return 2> /dev/null) && return # If script was sourced, don't run commands.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org