Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests on Python bindings fail with SEGFAULT when PYTHONWARNINGS=error is set #1217

Open
flferretti opened this issue Dec 4, 2024 · 1 comment

Comments

@flferretti
Copy link
Contributor

When running the tests with PYTHONWARNINGS='error' pixi run test, I get segmentation faults on PythonGeomtryTests, PythonJointTests, PythonHelperTests, PythonModelLoaderTests and PythonExtWrenchesAndJointTorquesEstimatorUnitTest. By re-running the failed tests in verbose mode I get:

PYTHONWARNINGS='error' pixi run test --rerun-failed --output-on-failure

conda:jaxsim
 Pixi task (configure): cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX -DBUILD_TESTING:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_USES_PYTHON_PYBIND11:BOOL=ON -DIDYNTREE_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON -G Ninja -S . -B .build
-- Found YARP: /home/fferretti-iit.local/git/idyntree/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Found YCM: /home/fferretti-iit.local/git/idyntree/.pixi/envs/default/share/cmake/YCM (found version "0.16.9")
-- Found YARP: /home/fferretti-iit.local/git/idyntree/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Linking SWIG Python bindings against NumPy '2.1.2'
-- Found pybind11: /home/fferretti-iit.local/git/idyntree/.pixi/envs/default/include (found version "2.13.6")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done (0.5s)
CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/UseSWIG.cmake:945 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  bindings/python/CMakeLists.txt:10 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at .pixi/envs/default/share/cmake-3.30/Modules/FindPython/Support.cmake:4239 (add_library):
  The library that is being linked to, idyntree-sensors, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  Linking the iDynTree::idyntree-sensors target is deprecated, please link
  iDynTree::idyntree-model that provides the symbols formerly containd in
  iDynTree::idyntree-sensors

Call Stack (most recent call first):
  .pixi/envs/default/share/cmake-3.30/Modules/FindPython3.cmake:606 (__Python3_add_library)
  .pixi/envs/default/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library)
  bindings/pybind11/CMakeLists.txt:1 (pybind11_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done (0.1s)
-- Build files have been written to: /home/fferretti-iit.local/git/idyntree/.build

 Pixi task (build): cmake --build .build --config Release
[1/1] Running utility command for copy_python_tests_in_build

 Pixi task (test): ctest --test-dir .build --build-config Release --rerun-failed --output-on-failure
Internal ctest changing into directory: /home/fferretti-iit.local/git/idyntree/.build
Test project /home/fferretti-iit.local/git/idyntree/.build
    Start 60: PythonGeometryTests
1/5 Test #60: PythonGeometryTests .................................***Exception: SegFault  1.28 sec

    Start 61: PythonJointTests
2/5 Test #61: PythonJointTests ....................................***Exception: SegFault  1.29 sec

    Start 62: PythonHelperTests
3/5 Test #62: PythonHelperTests ...................................***Exception: SegFault  1.27 sec

    Start 63: PythonModelLoaderTests
4/5 Test #63: PythonModelLoaderTests ..............................***Exception: SegFault  1.29 sec

    Start 64: PythonExtWrenchesAndJointTorquesEstimatorUnitTest
5/5 Test #64: PythonExtWrenchesAndJointTorquesEstimatorUnitTest ...***Exception: SegFault  1.28 sec


0% tests passed, 5 tests failed out of 5

Total Test time (real) =   6.42 sec

The following tests FAILED:
	 60 - PythonGeometryTests (SEGFAULT)
	 61 - PythonJointTests (SEGFAULT)
	 62 - PythonHelperTests (SEGFAULT)
	 63 - PythonModelLoaderTests (SEGFAULT)
	 64 - PythonExtWrenchesAndJointTorquesEstimatorUnitTest (SEGFAULT)
Errors while running CTest

I have encountered a similar behavior also in https://github.com/ami-iit/jaxsim:

pixi run --locked -e tasks-cpu pytest tests/test_api_model.py::test_model_creation_and_reduction

 WARN The feature 'style' is defined but not used in any environment
 WARN The feature 'testing' is defined but not used in any environment
 WARN The feature 'viz' is defined but not used in any environment
 WARN The feature 'all' is defined but not used in any environment
============================= test session starts ==============================
platform linux -- Python 3.12.7, pytest-8.3.4, pluggy-1.5.0 -- /home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/bin/python3.12
cachedir: .pytest_cache
rootdir: /home/fferretti-iit.local/jaxsim
configfile: pyproject.toml
plugins: anyio-4.6.2.post1, icdiff-0.9
collected 1 item                                                               

tests/test_api_model.py::test_model_creation_and_reduction PASSED                                                                                                                                                                      [100%]

============================================================================================================== warnings summary ==============================================================================================================
<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================================= 1 passed, 3 warnings in 19.55s =======================================================================================================

Instead, by only considering the warnings as such, it seems that the cause is due to some DeprecationWarning in swig:

pixi run --locked -e tasks-cpu pytest -Werror tests/test_api_model.py::test_model_creation_and_reduction

 WARN The feature 'style' is defined but not used in any environment
 WARN The feature 'testing' is defined but not used in any environment
 WARN The feature 'viz' is defined but not used in any environment
 WARN The feature 'all' is defined but not used in any environment
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.12.7, pytest-8.3.4, pluggy-1.5.0 -- /home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/bin/python3.12
cachedir: .pytest_cache
rootdir: /home/fferretti-iit.local/jaxsim
configfile: pyproject.toml
plugins: anyio-4.6.2.post1, icdiff-0.9
collecting ... Fatal Python error: Segmentation fault

Current thread 0x00007414600dc740 (most recent call first):
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1289 in create_module
  File "<frozen importlib._bootstrap>", line 813 in module_from_spec
  File "<frozen importlib._bootstrap>", line 921 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1415 in _handle_fromlist
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/idyntree/swig.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1415 in _handle_fromlist
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/idyntree/__init__.py", line 1 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1310 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "/home/fferretti-iit.local/jaxsim/tests/utils_idyntree.py", line 6 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1415 in _handle_fromlist
  File "/home/fferretti-iit.local/jaxsim/tests/test_api_model.py", line 13 in <module>
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 184 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 1387 in _gcd_import
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/importlib/__init__.py", line 90 in import_module
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/pathlib.py", line 587 in import_path
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/python.py", line 493 in importtestmodule
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/python.py", line 546 in _getobj
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/python.py", line 284 in obj
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/python.py", line 562 in _register_setup_module_fixture
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/python.py", line 549 in collect
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 389 in collect
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 341 in from_call
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 391 in pytest_make_collect_report
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 567 in collect_one_node
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 835 in _collect_one_node
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 912 in collect
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 389 in collect
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 341 in from_call
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 391 in pytest_make_collect_report
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/runner.py", line 567 in collect_one_node
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 789 in perform_collect
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 347 in pytest_collection
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 336 in _main
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 283 in wrap_session
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/config/__init__.py", line 175 in main
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/lib/python3.12/site-packages/_pytest/config/__init__.py", line 201 in console_main
  File "/home/fferretti-iit.local/jaxsim/.pixi/envs/tasks-cpu/bin/pytest", line 10 in <module>

Extension modules: jaxlib.cpu_feature_guard, numpy._core._multiarray_umath, numpy.linalg._umath_linalg, zstandard.backend_c (total: 4)

Giving that this is not blocking, nor crucial, I was wondering if suppressing the deprecation warning in cmake/iDynTreeOptions.cmake could help:

# Option to filter deprecation warnings
option(IDYNTREE_FILTER_DEPRECATION_WARNINGS "Filter out deprecation warnings" FALSE)

# Remove deprecation warnings for a specific part of iDynTree
macro(idyntree_disable_deprecation_warnings)
  if(IDYNTREE_FILTER_DEPRECATION_WARNINGS)
    if(MSVC)
      add_definitions(/wd4996)
    else()
      CHECK_CXX_COMPILER_FLAG("-Wno-deprecated" CXX_HAS_WNO_DEPRECATED)
      if(CXX_HAS_WNO_DEPRECATED)
        add_definitions(-Wno-deprecated)
      endif()
    endif()
  endif()
endmacro()

Other issues mentioning this problem in SWIG 0.4.3:

@traversaro
Copy link
Member

I did not tested, but I am afraid that -Wno-deprecated will suppress C++ deprecation warnings, not Python ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants