Help needed running ChimeraX on NixOS - a science project needs you

My son and I are trying to run GitHub - RBVI/ChimeraX: Source code for molecular graphics program UCSF ChimeraX on his NixOS machine so he can participate in a science project and we’re having real trouble getting it going.

We’ve tried buildFHSUserEnv, steam-run, building from source (there are something like 50 dependencies, some C++, and other stuff that looks windows specific - no way it’s going to work), and now we’ve been trying to patch the dependencies one-by-one using autoPatchElf.

We’ve been trying to build a Nix flake at:

Since it’s a somewhat complicated license (free for academic, but not for commercial) there’s an impossible download link so even the download might fail.

Downloading the flake and running nix develop currently produces:

> auto-patchelf: 1 dependencies could not be satisfied
> error: auto-patchelf could not satisfy dependency wanted by /nix/store/bf0zrrddb8z5i2mqpv6njzwddj3lihrw-chimerax-1.4/opt/chimerax-1.4/lib/python3.9/lib-dynload/
> auto-patchelf failed to find all the required dependencies.

But libffi is included in the list of dependencies.

Any ideas? At this point, thinking that running a Ubuntu VM might be the only way.

Don’t know if you saw Options for packaging a complex (py)QT application: ChimeraX - I ended up using a distrobox container and it worked OK

1 Like

I’ve made a bit of progress here; at least it seems to be patching all of the libraries as expected. Don’t have time to look into the pathing issue at the moment though fix: find all required libraries by ryanswrt · Pull Request #1 · headblockhead/nix-ucsf-chimerax · GitHub

Somehow, I did not see that link! Thanks, and thanks for the PR! :slight_smile:

My son has made some progress on trying to get the Debian package running and I think it’s down to some issues with libffi versions.

1 Like

@TheAncientGoat could you share some more details like a configuration or run-script please? My simple start script stopped working after the upgrade to 22.11 -.-

Yeah the latest distrobox somehow killed it for me as well; haven’t had time to dig into unfortunately (have just fallen back to using Mol* for now heh).

Just need to free some time for the actual build - was feeling like we’re pretty close (just the odd xkb issue that needs to be resolved)

Do you mean xcb instead of xkb?

I found that the qt.qpa.plugin: Could not load the Qt platform plugin "xcb" error was a symptom of missing libraries as described here: Options for packaging a complex (py)QT application: ChimeraX

I think the solution offered in the linked thread can be revived by installing steam-run with an additional switch as described here: Numerous Steam games failing with missing - #3 by raphi

I tried, but failed so far…

Nope - the error I am currently seeing is

   Available styles: Windows, Fusion
NOTE: available bundle cache has not been initialized yet
xkbcommon: ERROR: Couldn't find file "rules/evdev" in include paths
xkbcommon: ERROR: There are no include paths to search
xkbcommon: ERROR: 1 include paths could not be added:
xkbcommon: ERROR: 	/usr/share/X11/xkb
xkbcommon: ERROR: Couldn't look up rules 'evdev', model 'pc101', layout 'us', variant '', options ''
[345986:346007:1028/] Keymap file failed to load: us
Trace/breakpoint trap (core dumped)```