Saturday, November 09, 2024

OpenSpace - running version 0.20.1 on Linux Mint 22

The space visualization tool OpenSpace - https://www.openspaceproject.com/ - has a deb file for download, but that leads to dependency issues with libboost - version 1.83-dev is what is installed for Ubuntu 24.04 on which Linux Mint 22 is based, and the .deb file depends on version 1.74-dev. So, advised to compile from source.

Following the instructions at Ubuntu — OpenSpace documentation - except had to replace 
sudo apt install libboost1.74-dev
with
sudo apt install libboost-all-dev following https://askubuntu.com/questions/922625/cannot-install-libboost-all-dev-because-dependencies-are-not-getting-installed

On the first try, with the downloaded source from the github releases page, got errors - 
include could not find requested file:
    /path/OpenSpace-releases-v0.20.1/ext/ghoul/support/cmake/message_macros.cmake

was because I had not done git clone --recursive

After the recursive git clone, the first few times make gave errors.

make -j was going quite fast, 65% in just a couple of minutes, but then the machine would hang. Finally worked out by running System Monitor that (a) swap was not enabled, and (b) certain longer jobs would cause significant RAM usage leading to all 8 GB being used and then a system crash. After enabling swap of 32 GB, continued with
make -j 2
doing 2 concurrent jobs instead of unlimited concurrent jobs - and now the linker complained that some symbols were not found. I suspected that this was due to the interrupted builds due to the crashes - so, 
make clean
make -j 2

That built the executable in around an hour on this ~10 year old Lenovo Thinkcenter desktop. When I tried to run it, after setting mrf cache to true in openspace.cfg and copying over the sync, user and mrf_cache directories from an earlier install on Windows, and setting the OPENSPACE_SYNC environment variable in .bashrc, errors just before the screen becomes usable - 
terminate called after throwing an instance of 'sgct::Error'
what():  [Engine] (3010): GLFW error (65547): X11: Standard cursor shape unavailable

Checked if it was running Wayland instead of X11 - using this method,
echo $XDG_SESSION_TYPE
x11

So it was running x11. And not Wayland. Checking for cursors in Software Manager, installing the base cursors did not solve the issue - 
sudo apt install xcursor-themes

OpenSpace would work so long as we didn't move the cursor inside its window. Controlling it via the HTML interface, through a web browser pointed to localhost:4680 was working.

Then thought of display managers and window managers - tried out Xfce desktop -
 sudo apt install task-xfce-desktop -y

Rebooted, logged in to Xfce desktop using the chooser next to the login name, and now OpenSpace worked fine. So, there's something in Cinnamon desktop which doesn't play well with GLFW.

No comments:

Post a Comment