Skip to content

Commit 78648f1

Browse files
authored
Merge pull request #196 from bluescarni/pr/clang17_fix
clang 17 fix
2 parents 008161a + d7e0c12 commit 78648f1

12 files changed

+40
-12
lines changed

cmake/yacma/YACMACompilerLinkerSettings.cmake

+20-2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ if(NOT _YACMACompilerLinkerSettingsRun)
8282
# Configuration bits specific for GCC.
8383
if(YACMA_COMPILER_IS_GNUCXX)
8484
_YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
85+
_YACMA_CHECK_ENABLE_CXX_FLAG(-Woverloaded-virtual)
8586
# New in GCC 9.
8687
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waddress-of-packed-member)
8788
endif()
@@ -109,7 +110,6 @@ if(NOT _YACMACompilerLinkerSettingsRun)
109110
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wc99-designator)
110111
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wreorder-init-list)
111112
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-pointer-div)
112-
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-array-div)
113113
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wxor-used-as-pow)
114114
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wfinal-dtor-non-final-class)
115115
# New warnings in clang 11.
@@ -122,13 +122,31 @@ if(NOT _YACMACompilerLinkerSettingsRun)
122122
# NOTE: this is a new flag in Clang 13 which seems to give
123123
# incorrect warnings for UDLs.
124124
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wno-reserved-identifier)
125+
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Warray-bounds-pointer-arithmetic)
126+
# New warnings in clang 14.
127+
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Warray-parameter)
128+
# NOTE: clang 17 enables by default a new compiler flag called "-fassume-unique-vtables":
129+
#
130+
# https://releases.llvm.org/17.0.1/tools/clang/docs/ReleaseNotes.html#c-language-changes
131+
#
132+
# This flag however seems to be buggy:
133+
#
134+
# https://github.com/llvm/llvm-project/issues/71196
135+
#
136+
# On our part, in several projects we are experiencing Boost.serialization failures when
137+
# (de)serialising derived objects through pointers to bases. Thus, we forcibly disable
138+
# this new flag.
139+
_YACMA_CHECK_ENABLE_CXX_FLAG(-fno-assume-unique-vtables)
125140
endif()
126141

127142
# Common configuration for GCC, clang and Intel.
128143
if(YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
129144
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
130145
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
131-
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
146+
# NOTE: this flag has been superseded by "-Wdelete-non-virtual-dtor"
147+
# (enabled by "-Wall"). See:
148+
# https://gcc.gnu.org/pipermail/gcc-cvs/2022-November/374730.html
149+
# _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
132150
# NOTE: this flag is a bit too chatty, let's disable it for the moment.
133151
#_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
134152
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)

doc/changelog.rst

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
Changelog
44
=========
55

6+
6.0.1 (unreleased)
7+
------------------
8+
9+
Fix
10+
~~~
11+
12+
- Workaround for a clang 17 issue that would result in
13+
runtime exceptions during (de)serialisation
14+
(`#196 <https://github.com/bluescarni/heyoka.py/pull/196>`__).
15+
616
6.0.0 (2024-09-21)
717
------------------
818

tools/circleci_conda_heyoka_head_310.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bash miniforge.sh -b -p $HOME/miniforge
1919
# using deprecated scipy functions.
2020
conda create -y -p $deps_dir python=3.10 c-compiler cxx-compiler git pybind11 'numpy<2' \
2121
mpmath cmake llvmdev tbb-devel tbb astroquery libboost-devel 'mppp=1.*' \
22-
sleef 'fmt<11' skyfield spdlog myst-nb matplotlib sympy 'scipy<1.14' pykep cloudpickle \
22+
sleef fmt skyfield spdlog myst-nb matplotlib sympy 'scipy<1.14' pykep cloudpickle \
2323
'sphinx=7.*' 'sphinx-book-theme=1.*'
2424
source activate $deps_dir
2525

tools/circleci_conda_heyoka_head_312.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
1414
export deps_dir=$HOME/local
1515
export PATH="$HOME/miniforge/bin:$PATH"
1616
bash miniforge.sh -b -p $HOME/miniforge
17-
conda create -y -p $deps_dir python=3.12 c-compiler cxx-compiler git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb libboost-devel 'mppp=1.*' sleef 'fmt<11' skyfield spdlog sympy cloudpickle
17+
conda create -y -p $deps_dir python=3.12 c-compiler cxx-compiler git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb libboost-devel 'mppp=1.*' sleef fmt skyfield spdlog sympy cloudpickle
1818
source activate $deps_dir
1919

2020
# Checkout, build and install heyoka's HEAD.

tools/circleci_conda_heyoka_head_39.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
1414
export deps_dir=$HOME/local
1515
export PATH="$HOME/miniforge/bin:$PATH"
1616
bash miniforge.sh -b -p $HOME/miniforge
17-
conda create -y -p $deps_dir python=3.9 c-compiler cxx-compiler git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb astroquery libboost-devel 'mppp=1.*' sleef 'fmt<11' skyfield spdlog myst-nb matplotlib sympy scipy pykep cloudpickle 'sphinx=7.*' 'sphinx-book-theme=1.*'
17+
conda create -y -p $deps_dir python=3.9 c-compiler cxx-compiler git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb astroquery libboost-devel 'mppp=1.*' sleef fmt skyfield spdlog myst-nb matplotlib sympy scipy pykep cloudpickle 'sphinx=7.*' 'sphinx-book-theme=1.*'
1818
source activate $deps_dir
1919

2020
export HEYOKA_PY_PROJECT_DIR=`pwd`

tools/circleci_ubuntu_arm64.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
1414
export deps_dir=$HOME/local
1515
export PATH="$HOME/miniforge/bin:$PATH"
1616
bash miniforge.sh -b -p $HOME/miniforge
17-
conda create -y -q -p $deps_dir cxx-compiler c-compiler cmake llvmdev tbb-devel tbb astroquery libboost-devel 'mppp=1.*' sleef 'fmt<11' skyfield spdlog python=3.10 pybind11 'numpy<2' mpmath sympy scipy cloudpickle myst-nb matplotlib 'sphinx=7.*' 'sphinx-book-theme=1.*'
17+
conda create -y -q -p $deps_dir cxx-compiler c-compiler cmake llvmdev tbb-devel tbb astroquery libboost-devel 'mppp=1.*' sleef fmt skyfield spdlog python=3.10 pybind11 'numpy<2' mpmath sympy scipy cloudpickle myst-nb matplotlib 'sphinx=7.*' 'sphinx-book-theme=1.*'
1818
source activate $deps_dir
1919

2020
# Checkout, build and install heyoka's HEAD.

tools/gha_conda_asan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export PATH="$HOME/miniconda/bin:$PATH"
1616
bash miniconda.sh -b -p $HOME/miniconda
1717
conda config --add channels conda-forge
1818
conda config --set channel_priority strict
19-
conda create -y -q -p $deps_dir python=3.10 git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb libboost-devel 'mppp=1.*' sleef 'fmt<11' skyfield spdlog sympy cloudpickle c-compiler cxx-compiler
19+
conda create -y -q -p $deps_dir python=3.10 git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb libboost-devel 'mppp=1.*' sleef fmt skyfield spdlog sympy cloudpickle c-compiler cxx-compiler
2020
source activate $deps_dir
2121

2222
export CXXFLAGS="$CXXFLAGS -fsanitize=address"

tools/gha_conda_docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bash miniforge.sh -b -p $HOME/miniforge
1919
# using deprecated scipy functions.
2020
conda create -y -p $deps_dir c-compiler cxx-compiler python=3.10 git pybind11 \
2121
ninja 'numpy<2' mpmath cmake llvmdev tbb-devel tbb astroquery libboost-devel \
22-
'mppp=1.*' sleef 'fmt<11' skyfield spdlog myst-nb matplotlib sympy 'scipy<1.14' pykep cloudpickle \
22+
'mppp=1.*' sleef fmt skyfield spdlog myst-nb matplotlib sympy 'scipy<1.14' pykep cloudpickle \
2323
'sphinx=7.*' 'sphinx-book-theme=1.*'
2424
source activate $deps_dir
2525

tools/gha_conda_static.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export PATH="$HOME/miniconda/bin:$PATH"
1616
bash miniconda.sh -b -p $HOME/miniconda
1717
conda config --add channels conda-forge
1818
conda config --set channel_priority strict
19-
conda create -y -q -p $deps_dir python=3.10 git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb libboost-devel 'mppp=1.*' sleef 'fmt<11' skyfield spdlog sympy cloudpickle c-compiler cxx-compiler numba zlib
19+
conda create -y -q -p $deps_dir python=3.10 git pybind11 'numpy<2' mpmath cmake llvmdev tbb-devel tbb libboost-devel 'mppp=1.*' sleef fmt skyfield spdlog sympy cloudpickle c-compiler cxx-compiler numba zlib
2020
source activate $deps_dir
2121

2222
# Checkout, build and install heyoka's HEAD.

tools/gha_osx_heyoka_head.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
1111
export deps_dir=$HOME/local
1212
export PATH="$HOME/miniconda/bin:$PATH"
1313
bash miniconda.sh -b -p $HOME/miniconda
14-
conda create -y -p $deps_dir python=3.11 'c-compiler<1.8' 'cxx-compiler<1.8' git pybind11 'numpy<2' cmake llvmdev tbb-devel tbb astroquery libboost-devel sleef 'fmt<11' skyfield spdlog sympy cloudpickle 'mppp=1.*'
14+
conda create -y -p $deps_dir python=3.11 c-compiler cxx-compiler git pybind11 'numpy<2' cmake llvmdev tbb-devel tbb astroquery libboost-devel sleef fmt skyfield spdlog sympy cloudpickle 'mppp=1.*'
1515
source activate $deps_dir
1616

1717
# Checkout, build and install heyoka's HEAD.

tools/gha_osx_heyoka_head_static.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
1111
export deps_dir=$HOME/local
1212
export PATH="$HOME/miniconda/bin:$PATH"
1313
bash miniconda.sh -b -p $HOME/miniconda
14-
conda create -y -p $deps_dir python=3.11 'c-compiler<1.8' 'cxx-compiler<1.8' git pybind11 'numpy<2' cmake llvmdev tbb-devel tbb astroquery libboost-devel sleef 'fmt<11' skyfield spdlog sympy cloudpickle 'mppp=1.*' numba
14+
conda create -y -p $deps_dir python=3.11 c-compiler cxx-compiler git pybind11 'numpy<2' cmake llvmdev tbb-devel tbb astroquery libboost-devel sleef fmt skyfield spdlog sympy cloudpickle 'mppp=1.*' numba
1515
source activate $deps_dir
1616

1717
# Checkout, build and install heyoka's HEAD.

tools/travis_ubuntu_ppc64.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ curl -L -o miniconda.sh https://github.com/conda-forge/miniforge/releases/latest
1111
export deps_dir=$HOME/local
1212
export PATH="$HOME/miniconda/bin:$PATH"
1313
bash miniconda.sh -b -p $HOME/miniconda
14-
conda create -y -q -p $deps_dir cxx-compiler c-compiler cmake llvmdev tbb-devel tbb astroquery libboost-devel sleef xtensor xtensor-blas blas blas-devel 'fmt<11' skyfield spdlog python pybind11 'numpy<2' mpmath sympy cloudpickle mppp git make
14+
conda create -y -q -p $deps_dir cxx-compiler c-compiler cmake llvmdev tbb-devel tbb astroquery libboost-devel sleef xtensor xtensor-blas blas blas-devel fmt skyfield spdlog python pybind11 'numpy<2' mpmath sympy cloudpickle mppp git make
1515
source activate $deps_dir
1616

1717
# Checkout, build and install heyoka's HEAD.

0 commit comments

Comments
 (0)