From 31747f067a6ae29eca2d9bc68748500a8163d83e Mon Sep 17 00:00:00 2001 From: lriggs Date: Mon, 3 Feb 2025 15:37:09 -0800 Subject: [PATCH] GH-45132: [C++][Gandiva] Update LLVM to 18.1 (#45114) ### Rationale for this change https://github.com/apache/arrow/issues/37848 upgraded the JIT compiler for LLVM/Gandiva code which presented linking errors with newer version of LLVM. Some Gandiva tests were disabled, and here at Dremio I am running into the same linking problem when trying to build with an updated Arrow library. After reading some threads on the LLVM discord server it appears that updating to LLVM 18.1 will fix the symbol issue. I tested locally and was able to re-enable the disabled java tests which were showing the unexported ORC symbol issue. More discussion in https://github.com/apache/arrow-java/issues/63. ### What changes are included in this PR? Updating vcpkg and pinning LLVM to 18.1 Notably I found encountered some build problems using the newest vcpkg update, which appeared to be related to the updated gRPC libraries. My Arrow jar CI build was timing out in this case with no clear error in the logs. The vcpkg version included here has the LLVM 18 update but not the gRPC update (which isn't needed for this issue). ### Are these changes tested? Covered by existing tests. Will also re-enable the disabled Java tests in a future change. ### Are there any user-facing changes? No. * GitHub Issue: #45132 Lead-authored-by: Logan Riggs Co-authored-by: lriggs Signed-off-by: Sutou Kouhei --- .env | 6 +++--- ci/vcpkg/ports.patch | 9 ++++----- ci/vcpkg/vcpkg.json | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.env b/.env index 91e85a5c6e0cd..a94803cc3277c 100644 --- a/.env +++ b/.env @@ -62,7 +62,7 @@ HDFS=3.2.1 JDK=11 KARTOTHEK=latest # LLVM 12 and GCC 11 reports -Wmismatched-new-delete. -LLVM=14 +LLVM=18 MAVEN=3.8.7 NODE=18 NUMBA=latest @@ -89,13 +89,13 @@ TZ=UTC # Used through docker-compose.yml and serves as the default version for the # ci/scripts/install_vcpkg.sh script. Prefer to use short SHAs to keep the # docker tags more readable. -VCPKG="943c5ef1c8f6b5e6ced092b242c8299caae2ff01" # 2024.04.26 Release +VCPKG="f7423ee180c4b7f40d43402c2feb3859161ef625" # 2024.06.15 Release # This must be updated when we update # ci/docker/python-*-windows-*.dockerfile or the vcpkg config. # This is a workaround for our CI problem that "archery docker build" doesn't # use pulled built images in dev/tasks/python-wheels/github.windows.yml. -PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2025-01-27 +PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2025-02-03 PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2025-01-27 # Use conanio/${CONAN_BASE}:{CONAN_VERSION} for "docker compose run --rm conan". diff --git a/ci/vcpkg/ports.patch b/ci/vcpkg/ports.patch index 67fb2a4a3ea76..39b51874b1c0e 100644 --- a/ci/vcpkg/ports.patch +++ b/ci/vcpkg/ports.patch @@ -29,17 +29,16 @@ index a79c72a59..6b7fa6a66 100644 vcpkg_cmake_install(ADD_BIN_TO_PATH) diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake -index 0c7098082..c603c3653 100644 +index 0312b2ae1..fdb576b5f 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake -@@ -10,6 +10,7 @@ vcpkg_from_github( - PATCHES +@@ -8,5 +8,6 @@ vcpkg_from_github( fix_clang-cl_build.patch no-werror.patch + pkgconfig.diff + "snappy-disable-bmi.patch" ) - - vcpkg_cmake_configure( + file(COPY "${CURRENT_PORT_DIR}/snappy.pc.in" DESTINATION "${SOURCE_PATH}") diff --git a/ports/snappy/snappy-disable-bmi.patch b/ports/snappy/snappy-disable-bmi.patch new file mode 100644 index 000000000..e839c93a4 diff --git a/ci/vcpkg/vcpkg.json b/ci/vcpkg/vcpkg.json index a45adbb6a751e..5dfe61a0c6062 100644 --- a/ci/vcpkg/vcpkg.json +++ b/ci/vcpkg/vcpkg.json @@ -75,6 +75,7 @@ { "name": "llvm", "default-features": false, + "version>=": "18.1", "features": [ "clang", "default-targets",