Skip to content

Commit

Permalink
[misc] Fix segfault on windows due to vcruntime conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
duburcqa committed Jun 10, 2024
1 parent 3e0c745 commit 7be1d80
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ good-names =
fd, _, # Python: contexte
t, q, v, x, u, s, qx, qy, qz, qw, # Physics: state, action
I, R, H, T, M, dt, # Physics: dynamics
A, a, b, c, y, z, n, e, # Maths / Algebra : variables
f, rg, lo, hi, op, fn, # Maths / Algebra : operators
A, a, b, c, y, z, n, e, # Maths / Algebra: variables
f, rg, lo, hi, op, fn, # Maths / Algebra: operators
kp, kd, ki, # Control: Gains
ax # Matplotlib

Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:contract")
endif()
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /EHsc /bigobj /Gy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /permissive- /DWIN32 /D_USE_MATH_DEFINES /DNOMINMAX")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
/MP /EHsc /bigobj /Gy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /permissive- /DWIN32 \
/D_USE_MATH_DEFINES /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR /DNOMINMAX")
set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od")
set(CMAKE_CXX_FLAGS_RELEASE "/DNDEBUG /O2 /Ob3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
Expand Down
7 changes: 6 additions & 1 deletion build_tools/build_install_deps_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ if (-not (Test-Path env:GENERATOR)) {
}

### Set common CMAKE_C/CXX_FLAGS
${CMAKE_CXX_FLAGS} = "${env:CMAKE_CXX_FLAGS} /MP2 /EHsc /bigobj /Gy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /permissive- /DWIN32 /D_USE_MATH_DEFINES /DNOMINMAX"
# * Flag "DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" is a dirty workaround to deal with VC runtime
# conflict related to different search path ordering at compile-time / run-time causing segfault:
# https://github.com/actions/runner-images/issues/10004
${CMAKE_CXX_FLAGS} = "${env:CMAKE_CXX_FLAGS} $(
) /MP2 /EHsc /bigobj /Gy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /permissive- $(
) /DWIN32 /D_USE_MATH_DEFINES /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR /DNOMINMAX"
if (${BUILD_TYPE} -eq "Debug") {
${CMAKE_CXX_FLAGS} = "${CMAKE_CXX_FLAGS} /Zi /Od"
} else {
Expand Down
2 changes: 1 addition & 1 deletion python/gym_jiminy/toolbox/gym_jiminy/toolbox/math/qhull.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
try:
from matplotlib.pyplot import Figure
except ImportError:
Figure = type(None) # type: ignore[misc,assignment]
Figure = type(None) # type: ignore[misc,assignment,unused-ignore]

from jiminy_py.viewer import interactive_mode

Expand Down

0 comments on commit 7be1d80

Please sign in to comment.