Skip to content

GH-49921: [C++] Bump xsimd to 14.2.0#49922

Open
AntoinePrv wants to merge 7 commits into
apache:mainfrom
AntoinePrv:main
Open

GH-49921: [C++] Bump xsimd to 14.2.0#49922
AntoinePrv wants to merge 7 commits into
apache:mainfrom
AntoinePrv:main

Conversation

@AntoinePrv
Copy link
Copy Markdown
Contributor

@AntoinePrv AntoinePrv commented May 5, 2026

Rationale for this change

What changes are included in this PR?

Bump version and cleanup backports.

Are these changes tested?

Yes, in CI.

Are there any user-facing changes?

No

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

⚠️ GitHub issue #49921 has been automatically assigned in GitHub to PR creator.

@AntoinePrv AntoinePrv changed the title GH-49921: [C++] Bunp xsimd to 14.2.0 GH-49921: [C++] Bump xsimd to 14.2.0 May 5, 2026
@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

@AntoinePrv Can you take a look at the CI failures? They seem related.

@AntoinePrv
Copy link
Copy Markdown
Contributor Author

Yes, I am still waiting for the Msys2 build of xsimd to happen...

@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

@AntoinePrv
Copy link
Copy Markdown
Contributor Author

AntoinePrv commented May 6, 2026

Perhaps it's this check that does not work on MSVC?

https://github.com/xtensor-stack/xsimd/blob/80c23624ce008d937da7e845e528e82ce0cbf4e0/include/xsimd/types/xsimd_batch_constant.hpp#L500

Either we could add /Zc:__cplusplus or re-introduce the backport.

@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

I think we should both 1) fix xsimd upstream anyway and 2) pass /Zc:__cplusplus when building Arrow C++.

It seems xsimd should do something like this:

#ifdef _MSVC_LANG
#define XSIMD_CPP_LEVEL _MSVC_LANG
#else
#define XSIMD_CPP_LEVEL __cplusplus
#endif

and then use the XSIMD_CPP_LEVEL macro everywhere instead of __cplusplus.

(but xsimd could also use find-grained feature testing).

@AntoinePrv
Copy link
Copy Markdown
Contributor Author

AntoinePrv commented May 6, 2026

Already sending a patch, but not sure I want to go through another round of xsimd releases

xtensor-stack/xsimd#1342

@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

Agreed, hence "pass /Zc:__cplusplus when building Arrow C++" as well 😉

@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

Bloody protobuf fails building with /Zc:__cplusplus.
https://github.com/apache/arrow/actions/runs/25429128655/job/74590408553?pr=49922#step:9:2218

@pitrou pitrou added the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

Tiny syntax error that needs fixing:

  #17 27.36 Failed to load manifest from directory /arrow/ci/vcpkg
  #17 27.36 /arrow/ci/vcpkg/vcpkg.json:24:26: error: Trailing comma in an object
  #17 27.36   on expression:       "version>=": "14.2",

@AntoinePrv
Copy link
Copy Markdown
Contributor Author

@pitrou I'm not very proactively working on this until the msys2 xsimd build is live

@github-actions github-actions Bot removed the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

@pitrou I'm not very proactively working on this until the msys2 xsimd build is live

@kou Do you know how we can make that happen?

@pitrou pitrou added the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou
Copy link
Copy Markdown
Member

pitrou commented May 6, 2026

@github-actions crossbow submit -g cpp

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Revision: 89a1f7e

Submitted crossbow builds: ursacomputing/crossbow @ actions-9c434593fe

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-debian-13-cpp-amd64 GitHub Actions
test-debian-13-cpp-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@raulcd
Copy link
Copy Markdown
Member

raulcd commented May 6, 2026

Do you know how we can make that happen?

It's just a matter of waiting for their queue to update it:
https://packages.msys2.org/queue

Based on experience when uploading Arrow it takes between 6 and 12 hours. Their CI seems to run several times a day and xsimd is already listed on the queue so it should be available "soon".

@github-actions github-actions Bot removed the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou pitrou added the CI: Extra: C++ Run extra C++ CI label May 7, 2026
@kou
Copy link
Copy Markdown
Member

kou commented May 14, 2026

In general, already uploaded packages should not be rebuilt. They should be downloaded instead of built and uploaded.

@AntoinePrv
Copy link
Copy Markdown
Contributor Author

seems now this function is not found:

#if GRPC_CPP_VERSION_CHECK(1, 80, 0)
Status FromAbslStatus(const ::absl::Status& absl_status) {

Setup Msys2 downloading 1.8.0 in the logs

 mingw-w64-ucrt-x86_64-grpc-1.80.0-1-any downloading...

But CMake finds otherwise

-- ARROW_GRPC_BUILD_VERSION: v1.76.0
-- ARROW_GRPC_BUILD_SHA256_CHECKSUM: 0af37b800953130b47c075b56683ee60bdc3eda3c37fc6004193f5b569758204

@AntoinePrv
Copy link
Copy Markdown
Contributor Author

@pitrou @raulcd how does the CI look to you?

@raulcd raulcd added CI: Extra: C++ Run extra C++ CI CI: Extra: Package: Linux Run extra Linux Packages CI CI: Extra: R Run extra R CI labels May 19, 2026
@raulcd
Copy link
Copy Markdown
Member

raulcd commented May 19, 2026

@github-actions crossbow submit wheelcp314

@github-actions
Copy link
Copy Markdown

Revision: 2b5a233

Submitted crossbow builds: ursacomputing/crossbow @ actions-d5749ce93b

Task Status
wheel-macos-monterey-cp314-cp314-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-arm64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member

raulcd commented May 19, 2026

Some of the failures are unrelated (ODBC failures, debian-forky) but there's something I still don't understand and is the vcpkg nuget caching issues, example the JNI failures or the wheel failures. @kou how are those cached packages updated? Is the problem that the vcpkg baseline used doesn't seem to be a vcpkg release?
77826283b4676c526da3a5c59e6717e3775ba722
Do we have to wait until xsimd is on a vcpkg release (tag)? https://github.com/microsoft/vcpkg/releases

To be fair I don't understand how the cache for vcpkg works on those jobs we should document how are those updated.

Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

Some of the failures are unrelated (ODBC failures, debian-forky) but there's something I still don't understand and is the vcpkg nuget caching issues, example the JNI failures or the wheel failures. @kou how are those cached packages updated? Is the problem that the vcpkg baseline used doesn't seem to be a vcpkg release? 77826283b4676c526da3a5c59e6717e3775ba722 Do we have to wait until xsimd is on a vcpkg release (tag)? https://github.com/microsoft/vcpkg/releases

vcpkg cache with NuGet is done automatically. If there is not a cached package, vcpkg builds the package and push the built package to cache by NuGet. If there is a cached package, vcpkg just downloads and uses the cached package.

It's configured by:

if [ -n "${GITHUB_TOKEN:-}" ] && \
[ -n "${GITHUB_REPOSITORY_OWNER:-}" ] && \
[ "${VCPKG_BINARY_SOURCES:-}" = "clear;nuget,GitHub,readwrite" ] ; then
if type dnf 2>/dev/null; then
dnf install -y epel-release
dnf install -y mono-complete
fi
if type mono 2>/dev/null; then
curl \
--location \
--output "${vcpkg_destination}/nuget" \
https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
fi
PATH="${vcpkg_destination}:${PATH}"
nuget_url="https://nuget.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/index.json"
nuget="$(vcpkg fetch nuget | tail -n 1)"
if type mono 2>/dev/null; then
nuget="mono ${nuget}"
fi
${nuget} \
sources add \
-source "${nuget_url}" \
-storepasswordincleartext \
-name "GitHub" \
-username "${GITHUB_REPOSITORY_OWNER}" \
-password "${GITHUB_TOKEN}"
${nuget} \
setapikey "${GITHUB_TOKEN}" \
-source "${nuget_url}"
fi

JNI jobs: We use NuGet repository for the "apache" organization on PR. So we can't push built packages to cache on PR. (They are pushed when these jobs run on main.) vcpkg ignores push failures. So it doesn't fail CI jobs but CI jobs may take a long time because they need to build not cached packages.

Wheel jobs: It's failed because Apache Thrift build is failed:

https://github.com/ursacomputing/crossbow/actions/runs/26108848996/job/76780185321#step:8:2494

  #18 163.7 FAILED: compiler/cpp/thrift/thrifty.cc compiler/cpp/thrift/thrifty.hh /opt/vcpkg/buildtrees/thrift/amd64-linux-static-release-rel/compiler/cpp/thrift/thrifty.cc /opt/vcpkg/buildtrees/thrift/amd64-linux-static-release-rel/compiler/cpp/thrift/thrifty.hh 
  #18 163.7 cd /opt/vcpkg/buildtrees/thrift/amd64-linux-static-release-rel/compiler/cpp && /usr/bin/bison "--file-prefix-map=/opt/vcpkg/buildtrees/thrift/amd64-linux-static-release-rel=''" "--file-prefix-map=/opt/vcpkg/buildtrees/thrift/src/thrift-0-7fb4443e4a.clean=''" -d -o /opt/vcpkg/buildtrees/thrift/amd64-linux-static-release-rel/compiler/cpp/thrift/thrifty.cc /opt/vcpkg/buildtrees/thrift/src/thrift-0-7fb4443e4a.clean/compiler/cpp/src/thrift/thrifty.yy
  #18 163.7 /usr/bin/bison: unrecognized option '--file-prefix-map=/opt/vcpkg/buildtrees/thrift/amd64-linux-static-release-rel='''
  #18 163.7 Try '/usr/bin/bison --help' for more information.

It seems that Bison is old in the wheel image. It seems that we need Bison 3.7 or later https://lwn.net/Articles/826988/ for --file-prefix-map=.

To be fair I don't understand how the cache for vcpkg works on those jobs we should document how are those updated.

I agree with you. We should document it. Sorry for not writing it...


#pragma once

#include <grpcpp/grpcpp.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this for #49991 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like it was the same issue indeed. I can rebase instead.

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels May 20, 2026
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed Component: FlightRPC CI: Extra: C++ Run extra C++ CI CI: Extra: Package: Linux Run extra Linux Packages CI awaiting changes Awaiting changes labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting change review Awaiting change review CI: Extra: R Run extra R CI Component: C++

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants