-
Notifications
You must be signed in to change notification settings - Fork 112
Build sdformattest pybind11 library as MODULE #1544
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
Conversation
Signed-off-by: Silvio Traversaro <silvio@traversaro.it>
I am not sure, but as this is a CMake-only change, I would guess that the Bazel failure is unrelated and actually due to some non-determinism in the Bazel build CI, also considering it also happens in #1543 . |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## sdf15 #1544 +/- ##
========================================
Coverage ? 92.48%
========================================
Files ? 138
Lines ? 18345
Branches ? 0
========================================
Hits ? 16967
Misses ? 1378
Partials ? 0 ☔ View full report in Codecov by Sentry. |
I think it has started failing since gazebosim/gz-math#652 was merged |
@scpeters can we backport this to sdf14? I can try to use mergify, but I guess some special permissions are required? |
@Mergifyio backport sdf14 |
❌ Command disallowed due to command restrictions in the Mergify configuration.
|
@Mergifyio backport sdf14 |
✅ Backports have been created
|
Signed-off-by: Silvio Traversaro <silvio@traversaro.it> Co-authored-by: Steve Peters <scpeters@openrobotics.org> (cherry picked from commit 71fe504)
Signed-off-by: Silvio Traversaro <silvio@traversaro.it> Co-authored-by: Steve Peters <scpeters@openrobotics.org> (cherry picked from commit 71fe504)
🦟 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 aSHARED
library. By changing it to aMODULE
, 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 linkslibpython
, while Homebrew uses a Python that is dynamically linked tolibpython
, see the related issues:Beside platform-specific problems, it seems that all other invocations of
pybind11_add_module
in gz projects useMODULE
, so I think it make sense to switch toMODULE
also here at least for consistency.Checklist
codecheck
passed (See contributing)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.