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
Summary:
Installing FastDDS-python using the instructions in the README works fine (just installing with brew instead of apt) except that the generated library file comes in the form of .dylib instead of .so, which python does not recognize.
Reproducing:
Follow README instructions using brew to install dependencies
Export fastdds_python_ws/install/fastdds_python/lib/python3.12/site-packages to PYTHONPATH
Attempt to import fastdds in any python process
Expected Behavior:
The library works like it does on Ubuntu distributions
Actual Behavior
Importing causes the following issue:
ImportError: cannot import name '_fastdds_python' from partially initialized module 'fastdds' (most likely due to a circular import)
Changing the .dylib file to a .so file causes it to work properly. From what I understand, this would normally be fixed by passing sudo colcon build --cmake-args " -DCMAKE_SHARED_LIBRARY_SUFFIX=.so"
I did this by addingset(CMAKE_SHARED_LIBRARY_SUFFIX .so) on line 28, right after project(fastdds_python VERSION 2.2.0).
For some reason, the cache variable is being overwritten by something around project(fastdds_python VERSION 2.2.0).
Proposal
Would it be possible to add the line set(CMAKE_SHARED_LIBRARY_SUFFIX .so) to the fastdds_python CMakeLists? Or otherwise see what is causing the variable to overwrite? In my own investigating I can't seem to pin down the reason.
The text was updated successfully, but these errors were encountered:
Hi @KeaneWong, if modifying the CMakeLists file works, please feel free to open a PR and we will review it.
Will do. Will say thatt this fix feels a little patch-y, I'll make the change but by all means if there's a better approach I can take let me know. Thank you
Summary:
Installing FastDDS-python using the instructions in the README works fine (just installing with brew instead of apt) except that the generated library file comes in the form of
.dylib
instead of.so
, which python does not recognize.Reproducing:
fastdds_python_ws/install/fastdds_python/lib/python3.12/site-packages
to PYTHONPATHimport fastdds
in any python processExpected Behavior:
The library works like it does on Ubuntu distributions
Actual Behavior
Importing causes the following issue:
ImportError: cannot import name '_fastdds_python' from partially initialized module 'fastdds' (most likely due to a circular import)
Changing the .dylib file to a .so file causes it to work properly. From what I understand, this would normally be fixed by passing
sudo colcon build --cmake-args " -DCMAKE_SHARED_LIBRARY_SUFFIX=.so"
But this does not work.
Instead, the only thing that works is by setting the suffix variable inside fastdds_python_ws/src/fastdds_python/fastdds_python/CMakeLists.txt
I did this by adding
set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
on line 28, right afterproject(fastdds_python VERSION 2.2.0)
.For some reason, the cache variable is being overwritten by something around
project(fastdds_python VERSION 2.2.0)
.Proposal
Would it be possible to add the line
set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
to the fastdds_python CMakeLists? Or otherwise see what is causing the variable to overwrite? In my own investigating I can't seem to pin down the reason.The text was updated successfully, but these errors were encountered: