You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently fixing the preCICE Python bindings s.t. they are compatible with 632b4fbfa5608b57eb1b46e897cb8a049d09847b and ec11b6e918151b22d5d6d78a3da4d03c3b3d059b. This requires building the Python bindings from scratch and linking it against preCICE dynamically. However, this produces the following error messages during import in Python even though libprecice.so is accessible:
Looking into the ELF symbol table, it gets clear that actionWriteInitialData has a LOCAL binding instead of GLOBAL which makes it inaccessible for the linker. I found the following setting to be the root cause of the problem, which has been introduced a month ago:
Therefore, we either need to change this setting s.t. the functions actionWriteInitialData, actionWriteIterationCheckpoint, actionReadIterationCheckpoint and so on are accessible again in the shared library of preCICE or we need to remove them from the Python bindings.
Step To Reproduce
Build preCICE Python bindings from scratch.
Run import precice in Python.
Expected behaviour
preCICE gets imported without any linking errors. Removing the visibility flag from CMakeLists.txt fixes that.
The text was updated successfully, but these errors were encountered:
I think removing actionWriteInitialData etc. should be the right way to go. In precice/precice#1487 we replaced actionWriteInitialData etc. with explicit calls. This is not yet consistently implemented in the python bindings. @fsimonis Correct?
Looks to me like this is not an issue of preCICE, but of the python bindings and we can also fix it there.
I think removing actionWriteInitialData etc. should be the right way to go. In precice/precice#1487 we replaced actionWriteInitialData etc. with explicit calls.
Action calls have been replaced in #159. @Timo-Schrader can you please test the branch in that pull request and see if it works for you?
Describe your setup
Operating system (e.g. Linux distribution and version): Debian 11 Bullseye
preCICE Version: Latest (develop)
preCICE Python bindings: 71e7a6e
Describe the problem
I am currently fixing the preCICE Python bindings s.t. they are compatible with 632b4fbfa5608b57eb1b46e897cb8a049d09847b and ec11b6e918151b22d5d6d78a3da4d03c3b3d059b. This requires building the Python bindings from scratch and linking it against preCICE dynamically. However, this produces the following error messages during import in Python even though libprecice.so is accessible:
ImportError: ~/.local/lib/python3.9/site-packages/cyprecice.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN7precice9cplscheme9constants22actionWriteInitialDataB5cxx11Ev
Looking into the ELF symbol table, it gets clear that
actionWriteInitialData
has a LOCAL binding instead of GLOBAL which makes it inaccessible for the linker. I found the following setting to be the root cause of the problem, which has been introduced a month ago:https://github.com/precice/precice/blob/dd70dc238a87d9263370d09dc320779c2d72dcbb/CMakeLists.txt#L264
Therefore, we either need to change this setting s.t. the functions
actionWriteInitialData
,actionWriteIterationCheckpoint
,actionReadIterationCheckpoint
and so on are accessible again in the shared library of preCICE or we need to remove them from the Python bindings.Step To Reproduce
import precice
in Python.Expected behaviour
preCICE gets imported without any linking errors. Removing the visibility flag from CMakeLists.txt fixes that.
The text was updated successfully, but these errors were encountered: