From 4f81047b69a1c3b911da088a58949771eeb762b4 Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Thu, 5 Sep 2024 09:59:04 +0800 Subject: [PATCH] [GLUTEN-7118][VL] Fix duckdb target issue when vcpkg is enabled (#7117) --- dev/package-vcpkg.sh | 4 +++- dev/vcpkg/Makefile | 2 +- dev/vcpkg/ports/duckdb/portfile.cmake | 7 +++++++ dev/vcpkg/ports/duckdb/vcpkg.json | 9 ++++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dev/package-vcpkg.sh b/dev/package-vcpkg.sh index a153210748b8..8f2b219f0da7 100755 --- a/dev/package-vcpkg.sh +++ b/dev/package-vcpkg.sh @@ -13,6 +13,7 @@ if [ "$LINUX_OS" == "centos" ]; then if [ "$VERSION" == "8" ]; then source /opt/rh/gcc-toolset-9/enable elif [ "$VERSION" == "7" ]; then + export MANPATH="" source /opt/rh/devtoolset-9/enable fi fi @@ -22,4 +23,5 @@ source ./dev/vcpkg/env.sh # build gluten with velox backend, prompt always respond y export PROMPT_ALWAYS_RESPOND=y -./dev/buildbundle-veloxbe.sh --build_tests=ON --build_benchmarks=ON --enable_s3=ON --enable_hdfs=ON "$@" + +./dev/buildbundle-veloxbe.sh --build_tests=ON --build_arrow=OFF --build_benchmarks=ON --enable_s3=ON --enable_hdfs=ON "$@" diff --git a/dev/vcpkg/Makefile b/dev/vcpkg/Makefile index 874b0b579896..d37f75b5467c 100644 --- a/dev/vcpkg/Makefile +++ b/dev/vcpkg/Makefile @@ -1,4 +1,4 @@ -DOCKER_IMAGE=apache/gluten:gluten-vcpkg-builder +DOCKER_IMAGE=apache/gluten:vcpkg-centos-7 GLUTEN_REPO=$(shell realpath -L ../..) CCACHE_DIR=$(HOME)/.ccache diff --git a/dev/vcpkg/ports/duckdb/portfile.cmake b/dev/vcpkg/ports/duckdb/portfile.cmake index e7806f1e4f02..a57229295353 100644 --- a/dev/vcpkg/ports/duckdb/portfile.cmake +++ b/dev/vcpkg/ports/duckdb/portfile.cmake @@ -22,4 +22,11 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/DuckDB) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake") + +vcpkg_cmake_config_fixup(PACKAGE_NAME DuckDB) + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/dev/vcpkg/ports/duckdb/vcpkg.json b/dev/vcpkg/ports/duckdb/vcpkg.json index 511bea530f0b..24f32f7c7382 100644 --- a/dev/vcpkg/ports/duckdb/vcpkg.json +++ b/dev/vcpkg/ports/duckdb/vcpkg.json @@ -2,6 +2,13 @@ "name": "duckdb", "version": "0.8.1", "dependencies": [ - + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } ] }