Hey,
There’s a very hidden copy of CMake and GCC in the snap which means you might be able to compile third party libraries, but I’ve no idea of Ceres in particular as to whether it’s viable. In theory though, you might be able to run root-framework.cmake
in Ceres git repository alongside then root-framework.make
; and then either root-framework.run executableName
or running root
with import directories configured if doing it interactively.
I generally don’t recommend people actually use it however. There’s a few very specific situations it comes in handy (E.G I know one user who uses these hidden wrappers to teach ROOT at the undergraduate level by making executables with gcc rather than the interpretter) but for the most part its a bad user experience that probably would cause more confusion than benefit if it was more publically known.
Unfortunately, direct access to the system paths would break the snap in general cases because whilst it would actually be possible to put the system include paths in the sandbox, the result would end up being mismatches between versions and other ABI compatibility concerns. Essentially the snap is designed around a bundling everything and the kitchen sink approach, and struggles when the libraries aren’t actually available.
Ultimately I do think that official binary builds would be more appropriate to your needs (and likely the Conda package too), but it’s actually quite easy to build snaps and you could potentially build your own version of ROOT with Ceres already in it. I’ve an example of using ROOT alongside Geant4, QT, and a few others, to build the Gate
snap which actually works just fine for that program!
Building snaps in general on traditional Linux machines is quite easy, instructions for Ubuntu would just be:
sudo snap install snapcraft --classic
sudo snap install lxd
sudo lxd init --auto
git clone https://github.com/MrCarroll/gate-snap
cd gate-snap
snapcraft
sudo snap install my_snap.snap --dangerous
With snapcraft itself handling the setup of the build environment in an LXD container so it doesn’t mess with your main system.
Ultimately I don’t know if that’s viable for ROOT + Ceres, but it could certainly be an option worth exploring.