This is an automated email from the ASF dual-hosted git repository.
sgilmore pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 512d2458ff GH-42015: [MATLAB] Executing `tfeather.m` test class causes
MATLAB to crash on `windows-2022` after MSVC update from 14.39.33519 to
14.40.33807 (#42123)
512d2458ff is described below
commit 512d2458ff777f15354ee2a88bde7723ec3d5035
Author: Sarah Gilmore <[email protected]>
AuthorDate: Wed Jun 12 13:22:19 2024 -0400
GH-42015: [MATLAB] Executing `tfeather.m` test class causes MATLAB to crash
on `windows-2022` after MSVC update from 14.39.33519 to 14.40.33807 (#42123)
### Rationale for this change
After the `windows-2022` GitHub runner image was updated last week, MATLAB
began crashing when running the unit tests in `arrow/matlab/test/tfeather.m` on
Windows. As part of the update, VS 2022 was updated from
`17.9.34902.65` to `17.10.34928.147` and MSVC was updated from
`14.39.33519` to `14.40.33807`.
It looks like many other projects have run into this issue as well:
1. https://github.com/actions/runner-images/issues/10004
2. https://github.com/actions/runner-images/issues/10020
The suggested workaround for this crash is to supply the flag
`_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR` when building.
### What changes are included in this PR?
1. Supply `_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR` flag when building Arrow
C++.
### Are these changes tested?
N/A. Existing tests used.
### Are there any user-facing changes?
No.
* GitHub Issue: #42015
Authored-by: Sarah Gilmore <[email protected]>
Signed-off-by: Sarah Gilmore <[email protected]>
---
matlab/CMakeLists.txt | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt
index d8ed65ce92..4daca3a5bc 100644
--- a/matlab/CMakeLists.txt
+++ b/matlab/CMakeLists.txt
@@ -34,9 +34,15 @@ function(build_arrow)
set(ARROW_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix")
set(ARROW_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-build")
+
+ # Supply -DARROW_CXXFLAGS=-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR to fix
+ # a segfault on windows. See https://github.com/apache/arrow/issues/42015.
set(ARROW_CMAKE_ARGS
- "-DCMAKE_INSTALL_PREFIX=${ARROW_PREFIX}" "-DCMAKE_INSTALL_LIBDIR=lib"
- "-DARROW_BUILD_STATIC=OFF" "-DARROW_CSV=ON")
+ "-DCMAKE_INSTALL_PREFIX=${ARROW_PREFIX}"
+ "-DCMAKE_INSTALL_LIBDIR=lib"
+ "-DARROW_BUILD_STATIC=OFF"
+ "-DARROW_CSV=ON"
+ "-DARROW_CXXFLAGS=-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
add_library(arrow_shared SHARED IMPORTED)
set(ARROW_LIBRARY_TARGET arrow_shared)