Repository navigation
Fix/libpython loading - #38
Merged
Merged
Conversation
The wrapper library was not linked against libpython on Linux/macOS, so it could only be loaded into a process that already had Python (e.g. FMPy). Plain importers (OMSimulator, fmusim, Simulink, ...) failed with "undefined symbol: _Py_NoneStruct". The FMU library is now a small shim with no Python dependency. On the first instantiation it opens libpython with RTLD_GLOBAL if the host does not already provide it, then loads the real implementation (libpythonfmu-backend, built with FMI3_FUNCTION_PREFIX) from the same folder and forwards all FMI calls. libpython is looked up via PYTHONFMU_PYTHON_LIBRARY, then the build interpreter's library recorded in resources/pythonfmu_libpython.txt, then standard names for Python 3.8-3.14. Windows is unchanged (links python3.dll). - generate_shim.py generates the forwarders from fmi3FunctionTypes.h - builder only renames the entry-point library and records the libpython hint - tests: run a built FMU from a plain C host; docs: install.md section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8Wmw797DJpgrMFmT6n8CG
- README and docs index: FMUs now run in any FMI 3.0 importer, what the simulating machine needs, and PYTHONFMU_PYTHON_LIBRARY - dependencies.md: which Python environment the FMU uses per importer type (incl. virtualenv + PYTHONPATH) - docs/changelog.md (in mkdocs nav) listing the user-facing changes on this branch and fix/wrapper-robustness Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8Wmw797DJpgrMFmT6n8CG
StephenSmith25
force-pushed
the
fix/libpython-loading
branch
from
November 12, 2026 19:36
c8d67ee to
2d099be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.