Closed leho-l closed 1 month ago
Moved to FreeCAD Snap repo
Per https://packages.ubuntu.com/source/oracular/opencamlib looks like package name is https://packages.ubuntu.com/oracular/libopencamlib-2023.01
Where should I add it?
In build-packages
orstage-packages
section ?
CC @chennes
CC @adrianinsaval any idea?
Per https://packages.ubuntu.com/source/oracular/opencamlib looks like package name is https://packages.ubuntu.com/oracular/libopencamlib-2023.01
@luzpaz indeed, the binary package name is libopencamlib-2023.01
. The In build-packages
section is for packages required to build the snap, whereas the stage-packages
section is for packages required to run the snap.
I'm not familiar enough with CAM, and also the bug report stating "Gives install opencamlib error" is quite vague. There are no steps to reproduce in it. But my guess is that libopencamlib-2023.01
should be added to stage-packages
.
Also one thing to notice is that libopencamlib-2023.01
seems to be available only on Ubuntu 24.04 (noble) and Ubuntu 24.10 (oracular). One would need to see which distro's archive the snap is pulling packages from. If it's not one of those, the build will probably not find the package.
It might be useful to see what the freecad-daily PPA does in this regard. Does OpenCamLib work there? And if so, which package does it pull as an install dependency? Update: at a quick glance, it does not seem to install it as a dependency. If it relies on users manually installing the package, does installing libopencamlib-2023.01
on Ubuntu 24.04 work for the PPA users?
One would need to see which distro's archive the snap is pulling packages from
It looks like snapcraft is pulling packages from the jammy
(Ubuntu 22.04) archive. Interestingly, and if I understand it correctly, these are not the packages from the main Ubuntu archive, but from the KDE Neon archive.
In any case, given that libopencamlib-2023.01
is only available in Ubuntu 24.04, and that the snap pulls packages from Ubuntu 22.04, it is not possible to currently ship OpenCamLib as part of the snap. It would be only possible if the apt repository definition in snapcraft.yaml is updated to noble
(Ubuntu 24.04).
Maybe we can contact the opencamlib Ubuntu package maintainers to coordinate with them ?
can you use pip packages in snap?
Maybe we can contact the opencamlib Ubuntu package maintainers to coordinate with them ?
I don't think they can add it to older ubuntu versions at this stage. What could be doable is to add opencamlib to our ppa and then use that in the snap
can you use pip packages in snap?
@adrianinsaval, yes. That's how we install ifcopenshell from PyPI in the snap. If opencamlib is there, it can easily be added to the snap.
What could be doable is to add opencamlib to our ppa and then use that in the snap
If there is no other way, that would be one option. But then that introduces another dependency between the snap and upstream. I believe OCCT in the snap used to be pulled this way (via the PPA), but then it was changed to pull directly from the upstream git repository (or a mirror of). That would not work, as the apt archive the snap pulls .deb packages from is 22.04, whereas the PPA would have a 24.04 package. If the archive would be updated to be 24.04, then we'd just pull it from there instead of the PPA.
And it seems it's available: https://pypi.org/project/opencamlib/
@leho-l , could you try if running this command on a terminal addresses your issue in the meantime, while a conclusion is reached on how to best include it in the package?
freecad.pip install opencamlib
That would not work, as the apt archive the snap pulls .deb packages from is 22.04, whereas the PPA would have a 24.04 package. If the archive would be updated to be 24.04, then we'd just pull it from there instead of the PPA.
the ppa has freecad packages for 20.04, 22.04 and 24.04, but the occt incompatibility is a valid point.
Indeed, I'm using the 22.04 PPA on my laptop and the 24.04 one on my desktop. Thanks!
What I meant was that the libopencamlib-2023.01
.deb package is only available for Ubuntu 24.04. Another option would be to rebuild it and backport it to the 22.04 PPA to make it available there. Which might or might not be trivial depending on the packaging and on how opencamlib is built.
In any case, I think using the pip package is the simplest, least effort and most robust approach. I guess something like this would do:
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 37115ef..7890198 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -290,6 +290,7 @@ parts:
- libsuitesparseconfig5 # scikit-sparse
python-packages:
- ifcopenshell # BIM
+ - opencamlib # CAM
- pip
- scikit-sparse
stage:
Is there an existing issue for this?
Problem description
Gives install opencamlib error on opening 3d surface operation in existing older file made with 0.21. Allso in a new file 3d surface operation doesnt seem to work.
Full version info
Subproject(s) affected?
CAM
Anything else?
No response
Code of Conduct