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
The docker build that builds the python interface builds swig from source. Is there a reason for that? It seems to work just fine when installing swig as a binary package (ex: via apt).
For ROS users using rosdep, adding swig to the package.xml would then automate this dependency installation (and also this would apply for bloom).
Not sure to which docker file you are refering to.
On Dockerfile, swig is only installed by source with GDAL 3.0 - 3.2. We are using in this Docker GDAL 3.6, so that check is only used for testing, and doesn't affect the normal user. We found some issues between the apt swig version and those in GDAL, so we had to install the last version of swig by source.
Due to those compilation issues, on the workflow "build" we install swig by source to control the swig version used, to avoid these kind of issues again.
We don't want to install the python interface by default when compiling F2C by source. Do you know if there is away to add compilation options in the package.xml for the bloom env?
Thanks for the explanation on why swig is being installed from source. I'm using Ubuntu 22.04 which has GDAL 3.4 and Swig 4.0 as the latest packaged versions and those seem to be working fine.
If we add swig to the package.xml, it doesn't require the python interface to be compiled. It will pull it in as a bloom dependency and it will install it for users with rosdep, but doesn't require anything to be compiled.
I would think that it makes sense for the ROS bloomed package to have the python interface built anyway, and if users don't want to build it then they can build from source.
Another alternative would be splitting the python interface into a separate package internally, and that would contain the swig dependency.
I would think that it makes sense for the ROS bloomed package to have the python interface built anyway
From a user perspective, I'd love that as well so I don't have to build it myself
The next best thing is adding swig in package.xml so that I don't have to do it manually outside of the rosdep workflow
Activity
Gonzalo-Mier commentedon May 22, 2024
Hi @Aposhian,
Not sure to which docker file you are refering to.
On Dockerfile, swig is only installed by source with GDAL 3.0 - 3.2. We are using in this Docker GDAL 3.6, so that check is only used for testing, and doesn't affect the normal user. We found some issues between the apt swig version and those in GDAL, so we had to install the last version of swig by source.
Fields2Cover/Dockerfile
Lines 77 to 87 in fc35541
Due to those compilation issues, on the workflow "build" we install swig by source to control the swig version used, to avoid these kind of issues again.
We don't want to install the python interface by default when compiling F2C by source. Do you know if there is away to add compilation options in the
package.xmlfor the bloom env?Aposhian commentedon May 22, 2024
Thanks for the explanation on why swig is being installed from source. I'm using Ubuntu 22.04 which has GDAL 3.4 and Swig 4.0 as the latest packaged versions and those seem to be working fine.
If we add
swigto the package.xml, it doesn't require the python interface to be compiled. It will pull it in as a bloom dependency and it will install it for users with rosdep, but doesn't require anything to be compiled.I would think that it makes sense for the ROS bloomed package to have the python interface built anyway, and if users don't want to build it then they can build from source.
Another alternative would be splitting the python interface into a separate package internally, and that would contain the swig dependency.
tonynajjar commentedon May 24, 2024
I created #144 before seeing this issue.
From a user perspective, I'd love that as well so I don't have to build it myself
The next best thing is adding swig in package.xml so that I don't have to do it manually outside of the rosdep workflow
Gonzalo-Mier commentedon May 27, 2024
#144 merged! Should we turn on the python compilation flag by default?
Aposhian commentedon May 29, 2024
I think with that PR merged we call this complete
tonynajjar commentedon May 29, 2024
Yeah but that would still be nice 🙈 if there are no big downsides to it
Gonzalo-Mier commentedon Jun 4, 2024
Done 😄
tonynajjar commentedon Aug 9, 2024
Hey guys, did any of you confirm that this work?
docker run -it --rm osrf/ros:humble-desktop-full bash -ic 'sudo apt update && sudo apt install ros-humble-fields2cover -y && python3 -c "import fields2cover"'This should theoretically work no? But it doesn't ->
ModuleNotFoundError: No module named 'fields2cover'tonynajjar commentedon Jan 9, 2025
@Gonzalo-Mier same with jazzy, can you check?
vinnnyr commentedon Jan 9, 2025
@tonynajjar you are right, I checked on Humble a few different ways, and it seems as if though only the cpp library is installed via apt.
tonynajjar commentedon Jan 9, 2025
Thank you for checking, let's at least reopen this ticket to keep track of it