Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 17, 2025

🦟 Bug fix

Fixes segmentation fault of pyParserConfig_TEST on macOS when building the library against conda-forge dependencies.

Summary

I was investigating a segmentation fault in conda-forge/libsdformat-feedstock#134, and I isolated the problem to the sdformattest test Python module to be defined as a SHARED library. By changing it to a MODULE, the module loads fine (without segfaults) and the test passes fine.

Why the problem only occurs on conda-forge and not with Homebrew's Python (that I guess is used by tests)? I am not completely sure about this, but I guess it boils down to conda-forge using a python executable that statically links libpython, while Homebrew uses a Python that is dynamically linked to libpython, see the related issues:

Beside platform-specific problems, it seems that all other invocations of pybind11_add_module in gz projects use MODULE, so I think it make sense to switch to MODULE also here at least for consistency.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.


This is an automatic backport of pull request #1544 done by [Mergify](https://mergify.com).

Signed-off-by: Silvio Traversaro <silvio@traversaro.it>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
(cherry picked from commit 71fe504)
@mergify mergify bot requested review from azeey and scpeters as code owners July 17, 2025 16:08
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Jul 17, 2025
@iche033
Copy link
Contributor

iche033 commented Jul 17, 2025

@osrf-jenkins run tests please

1 similar comment
@iche033
Copy link
Contributor

iche033 commented Jul 17, 2025

@osrf-jenkins run tests please

@scpeters
Copy link
Member

some tests failed that download a schema from http://sdformat.org since that server was down

it's back up now

@osrf-jenkins run tests please

@scpeters
Copy link
Member

there are some python test failures on macOS

@azeey azeey added this to the Jetty Release milestone Jul 28, 2025
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Aug 1, 2025
@azeey azeey merged commit 2064461 into sdf14 Aug 1, 2025
13 of 17 checks passed
@azeey azeey deleted the mergify/bp/sdf14/pr-1544 branch August 1, 2025 23:24
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎵 harmonic Gazebo Harmonic

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants