Skip to content

Commit

Permalink
apacheGH-42015: [MATLAB] Executing tfeather.m test class causes MAT…
Browse files Browse the repository at this point in the history
…LAB to crash on `windows-2022` after MSVC update from 14.39.33519 to 14.40.33807 (apache#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. actions/runner-images#10004
2. actions/runner-images#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: apache#42015

Authored-by: Sarah Gilmore <[email protected]>
Signed-off-by: Sarah Gilmore <[email protected]>
  • Loading branch information
sgilmore10 authored Jun 12, 2024
1 parent 09d81c4 commit 512d245
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 512d245

Please sign in to comment.