From: Nabil Ghodbane Date: Wed, 15 Feb 2023 12:20:53 +0000 (+0100) Subject: spns #33691 : fix boost compilation issue on debian 10 - python 3.7 X-Git-Tag: V9_11_0~106 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0682a1aaf01b86a992ac92702a605b31f044127;p=tools%2Fsat_salome.git spns #33691 : fix boost compilation issue on debian 10 - python 3.7 --- diff --git a/applications/MEDCOUPLING-9.7.0.pyconf b/applications/MEDCOUPLING-9.7.0.pyconf index f376d70..456b7c0 100644 --- a/applications/MEDCOUPLING-9.7.0.pyconf +++ b/applications/MEDCOUPLING-9.7.0.pyconf @@ -88,4 +88,8 @@ __overwrite__ : __condition__ : "VARS.dist in ['FD32']" 'APPLICATION.products.scipy' : '1.5.2' # gcc https://github.com/scipy/scipy/issues/11611 - either patch numpy to include -fallow-argument-mismatch or move to that version } + { + __condition__ : "VARS.dist in ['DB10']" + 'APPLICATION.products.boost': {tag:'1.58.0', base: 'no', section: 'version_1_58_0_DB10'} + } ] diff --git a/products/boost.pyconf b/products/boost.pyconf index 85ed6a4..ef40ee2 100644 --- a/products/boost.pyconf +++ b/products/boost.pyconf @@ -57,6 +57,12 @@ version_1_71_0_FD36 : patches : ['boost-1.71-pthread-gcc-11.patch'] } +version_1_58_0_DB10 : +{ + patches : ['boost-1.58.0-python-3.7.patch'] +} + + version_1_52_0 : { patches : diff --git a/products/patches/boost-1.58.0-python-3.7.patch b/products/patches/boost-1.58.0-python-3.7.patch new file mode 100644 index 0000000..976fed4 --- /dev/null +++ b/products/patches/boost-1.58.0-python-3.7.patch @@ -0,0 +1,20 @@ +--- boost-1.58.0_ref/libs/python/src/converter/builtin_converters.cpp 2015-03-26 14:16:15.000000000 +0100 ++++ boost-1.58.0_dev/libs/python/src/converter/builtin_converters.cpp 2023-02-15 13:08:31.233047962 +0100 +@@ -45,11 +45,16 @@ + { + return PyString_Check(obj) ? PyString_AsString(obj) : 0; + } +-#else ++#elif PY_VERSION_HEX < 0x03070000 + void* convert_to_cstring(PyObject* obj) + { + return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0; + } ++#else ++ void* convert_to_cstring(PyObject* obj) ++ { ++ return PyUnicode_Check(obj) ? const_cast(reinterpret_cast(_PyUnicode_AsString(obj))) : 0; ++ } + #endif + + // Given a target type and a SlotPolicy describing how to perform a