Hi, when I try to install Baldur’s Gate original version from GOG on NixOS, I get this error:
I can’t move /home/felix/Games/gog/baldurs-gate-the-original-saga/tmp/data/noarch/prefix/drive_c/GOG Games/Baldur’s Gate, it does not exist
Here are the logs:
2021-10-31 07:47:51,812: Downloading DXVK releases to /home/felix/.local/share/lutris/runtime/dxvk/dxvk_versions.json
2021-10-31 07:47:51,812: Runtime updated. Initialization complete.
INFO 2021-10-31 07:47:51,813 [application.do_command_line:315]:Lutris 0.5.8.3
INFO 2021-10-31 07:47:51,814 [startup.check_driver:57]:Running AMD Mesa driver 21.1.4 on AMD RENOIR (DRM 3.42.0, 5.14.10, LLVM 11.1.0) (0x1638)
INFO 2021-10-31 07:47:51,814 [startup.check_driver:69]:GPU: 1002:1638 17AA:509B (amdgpu drivers)
DEBUG 2021-10-31 07:47:55,865 [base.install:118]:Installing 1207658886 from service gog
DEBUG 2021-10-31 07:47:55,865 [http.get:73]:GET https://lutris.net/api/games/service/gog
DEBUG 2021-10-31 07:47:55,962 [__init__.fetch_script:22]:Fetching installer https://lutris.net/api/installers/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:47:55,962 [http.get:73]:GET https://lutris.net/api/installers/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:47:59,258 [displayconfig.get_current_resolution:624]:Retrieving current resolution
mount: /nix/store/yx5zifiwsc7zbd54zs7l8i4a6nrrg6wf-wrapper.c:195: main: Assertion `!(st.st_mode & S_ISUID) || (st.st_uid == geteuid())' failed.
Traceback (most recent call last):
File "/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages/lutris/gui/widgets/common.py", line 129, in on_entry_changed
if self.warn_if_ntfs and LINUX_SYSTEM.get_fs_type_for_path(path) == "ntfs":
File "/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages/lutris/util/linux.py", line 244, in get_fs_type_for_path
path_drive = get_drive_for_path(path)
File "/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages/lutris/util/disks.py", line 56, in get_drive_for_path
return get_mountpoint_drives().get(find_mount_point(path))
File "/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages/lutris/util/disks.py", line 44, in get_mountpoint_drives
mounts = subprocess.check_output(["mount", "-v"]).decode("utf-8").split("\n")
File "/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python3-3.8.11/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python3-3.8.11/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mount', '-v']' died with <Signals.SIGABRT: 6>.
INFO 2021-10-31 07:48:00,893 [gog.get_game_details:278]:Getting game details for 1207658886
DEBUG 2021-10-31 07:48:00,894 [http.get:73]:GET https://api.gog.com/products/1207658886?expand=downloads
DEBUG 2021-10-31 07:48:01,285 [interpreter.create_game_folder:177]:Creating destination path /home/felix/Games/gog/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:02,311 [http.get:73]:GET https://embed.gog.com/userData.json
INFO 2021-10-31 07:48:02,719 [gog.get_game_details:278]:Getting game details for 1207658886
DEBUG 2021-10-31 07:48:02,720 [http.get:73]:GET https://api.gog.com/products/1207658886?expand=downloads
INFO 2021-10-31 07:48:02,880 [gog.get_download_info:284]:Getting download info for https://api.gog.com/products/1207658886/downlink/installer/en3installer0
DEBUG 2021-10-31 07:48:02,881 [http.get:73]:GET https://api.gog.com/products/1207658886/downlink/installer/en3installer0
DEBUG 2021-10-31 07:48:03,128 [files_box.check_files_ready:56]:Files are ready? True
DEBUG 2021-10-31 07:48:03,988 [files_box.on_file_available:78]:unzip is available
INFO 2021-10-31 07:48:03,988 [cache.save_to_cache:28]:Skipping caching of /tmp/bg/baldurs-gate-the-original-saga/unzip/unzip.tar.gz, already cached in /tmp/bg/baldurs-gate-the-original-saga/unzip
DEBUG 2021-10-31 07:48:03,989 [files_box.on_file_available:78]:gemrbengine is available
INFO 2021-10-31 07:48:03,989 [cache.save_to_cache:28]:Skipping caching of /tmp/bg/baldurs-gate-the-original-saga/gemrbengine/gemrb-0.8.1-x64.tar.gz, already cached in /tmp/bg/baldurs-gate-the-original-saga/gemrbengine
DEBUG 2021-10-31 07:48:03,990 [files_box.on_file_available:78]:game is available
INFO 2021-10-31 07:48:03,990 [files_box.on_file_available:84]:All files available
INFO 2021-10-31 07:48:03,990 [installerwindow.on_files_available:415]:All files are available, continuing install
DEBUG 2021-10-31 07:48:03,991 [interpreter._iter_commands:309]:Installer command: {'input_menu': {'id': 'FOLDER', 'options': [{"Baldur's Gate": 'English'}, {"Baldur's Gate (French)": 'French'}, {"Baldur's Gate (German)": 'German'}, {"Baldur's Gate (Polish)": 'Polish'}, {"Baldur's Gate (Russian)": 'Russian'}]}}
INFO 2021-10-31 07:48:03,992 [cache.save_to_cache:28]:Skipping caching of /tmp/bg/baldurs-gate-the-original-saga/gog/baldur_s_gate_the_original_saga_gog_3_23532.sh, already cached in /tmp/bg/baldurs-gate-the-original-saga/gog
/nix/store/v8yqq0yc2prapdnn23cw4kzsxr1rfvn8-python3.8-pygobject-3.40.1/lib/python3.8/site-packages/gi/overrides/GObject.py:493: Warning: ../gobject/gsignal.c:2732: instance '0x1cfddc0' has no handler with id '8176'
return func(*args, **kwargs)
DEBUG 2021-10-31 07:48:06,272 [interpreter._iter_commands:309]:Installer command: {'extract': {'dst': '$CACHE', 'file': '$unzip'}}
DEBUG 2021-10-31 07:48:06,274 [commands.extract:169]:Extracting unzip.tar.gz
DEBUG 2021-10-31 07:48:06,274 [commands.extract:173]:extracting file /tmp/bg/baldurs-gate-the-original-saga/unzip/unzip.tar.gz to /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:06,284 [extract.extract_archive:126]:Extracting /tmp/bg/baldurs-gate-the-original-saga/unzip/unzip.tar.gz to /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:06,286 [extract.extract_archive:178]:Finished extracting /tmp/bg/baldurs-gate-the-original-saga/unzip/unzip.tar.gz to /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:06,287 [commands._killable_process:521]:Process <function extract_archive at 0x7fc49781e670> returned: ('/tmp/bg/baldurs-gate-the-original-saga/unzip/unzip.tar.gz', '/home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga')
DEBUG 2021-10-31 07:48:06,291 [commands.extract:175]:Extract done
DEBUG 2021-10-31 07:48:06,292 [interpreter._iter_commands:309]:Installer command: {'execute': {'args': '$game -d "$GAMEDIR/tmp" "data/noarch/*"', 'file': '$CACHE/unzip'}}
DEBUG 2021-10-31 07:48:06,297 [command.start:131]:STEAM_RUNTIME="/home/felix/.local/share/lutris/runtime/steam"
DEBUG 2021-10-31 07:48:06,297 [command.start:131]:LD_LIBRARY_PATH="/home/felix/.local/share/lutris/runtime/Ubuntu-18.04-i686:/home/felix/.local/share/lutris/runtime/steam/i386/lib/i386-linux-gnu:/home/felix/.local/share/lutris/runtime/steam/i386/lib:/home/felix/.local/share/lutris/runtime/steam/i386/usr/lib/i386-linux-gnu:/home/felix/.local/share/lutris/runtime/steam/i386/usr/lib:/home/felix/.local/share/lutris/runtime/Ubuntu-18.04-x86_64:/home/felix/.local/share/lutris/runtime/steam/amd64/lib/x86_64-linux-gnu:/home/felix/.local/share/lutris/runtime/steam/amd64/lib:/home/felix/.local/share/lutris/runtime/steam/amd64/usr/lib/x86_64-linux-gnu:/home/felix/.local/share/lutris/runtime/steam/amd64/usr/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:/usr/lib:/usr/lib32:/nix/store/a1xkyw98lgj38kymim78a7xjk50wqg6k-telepathy-glib-0.24.2/lib:/nix/store/nzp3cc7bsj83dn23b4vvrvsp9psgg50m-telepathy-logger-0.8.2/lib"
DEBUG 2021-10-31 07:48:06,297 [command.start:131]:PYTHONPATH="/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/lutris:/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/bin:/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python3-3.8.11/lib/python38.zip:/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python3-3.8.11/lib/python3.8:/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python3-3.8.11/lib/python3.8/lib-dynload:/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python3-3.8.11/lib/python3.8/site-packages:/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages:/nix/store/zp2wpkbmc9l01wkl7zpg5i0pffrrjnzi-python3.8-evdev-1.4.0/lib/python3.8/site-packages:/nix/store/jcm9mjjm5p0xi8sis5vycnvgnylhq54i-python3.8-distro-1.5.0/lib/python3.8/site-packages:/nix/store/avfac08g9ic1v2gkfkjywpkpji11awb2-python3.8-lxml-4.6.3/lib/python3.8/site-packages:/nix/store/hqfbrk1q1zjj04990r3frhnxrqb1by8g-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages:/nix/store/zwm8gy5vygv5i837v2flaklhb9scdx8h-python3.8-pycairo-1.20.0/lib/python3.8/site-packages:/nix/store/v8yqq0yc2prapdnn23cw4kzsxr1rfvn8-python3.8-pygobject-3.40.1/lib/python3.8/site-packages:/nix/store/h4x196l4p1fd4nbd6vkz0fkgvz0lq210-python3.8-requests-2.25.1/lib/python3.8/site-packages:/nix/store/d9jjhba0cxc80xkrvyzf7d5awhakir3z-python3.8-certifi-2021.05.30/lib/python3.8/site-packages:/nix/store/94bganpjdw02kh3d0130p43p9gb99i3n-python3.8-chardet-4.0.0/lib/python3.8/site-packages:/nix/store/c2zia5ls63sg01am85lsixsqsyj8bjc7-python3.8-idna-3.1/lib/python3.8/site-packages:/nix/store/cjhimawmks6yiiw4mdfhk60vhiym3536-python3.8-urllib3-1.26.4/lib/python3.8/site-packages:/nix/store/swrm5ayqc3jz6db56mi9xyhfcwiirnin-python3.8-brotli-1.0.9/lib/python3.8/site-packages:/nix/store/a3wa77h6cf93lhxwr8pld7f4jpbgrhzp-python3.8-pysocks-1.7.1/lib/python3.8/site-packages:/nix/store/37k8z98ip8qxq0xwxdxmh920z7j5z0dg-python3.8-Pillow-8.3.2/lib/python3.8/site-packages:/nix/store/7zvrpl3zrls6qxc345rxwll8h1383f49-python3.8-olefile-0.46/lib/python3.8/site-packages:/nix/store/8hlcqcvfwdpjz5ngylv7qqwzj8m21hwa-python3.8-defusedxml-0.7.1/lib/python3.8/site-packages:/nix/store/jn738kkmsm97am364l5h49bwl50dv1pg-python3.8-dbus-python-1.2.16/lib/python3.8/site-packages:/nix/store/4jcwmci2bdh6n0ashkqd1c0lsx9nrm4p-python3.8-keyring-23.0.1/lib/python3.8/site-packages:/nix/store/2mjgg4hy4mgkvrv4fclm74zm5ylrspwq-python3.8-importlib-metadata-3.7.3/lib/python3.8/site-packages:/nix/store/n8pl294aq27k7cr3dwa9amsnaxj376br-python3.8-toml-0.10.2/lib/python3.8/site-packages:/nix/store/al0ql4c51wiblmm0c71l63c0dlx0kjh2-python3.8-zipp-3.4.1/lib/python3.8/site-packages:/nix/store/01chgmzx56wcwg8ndvjk0712ggv7b3f1-python3.8-more-itertools-8.7.0/lib/python3.8/site-packages:/nix/store/fimixzdm3p3lmkar2dxbvbs6spar978s-python3.8-six-1.15.0/lib/python3.8/site-packages:/nix/store/h174dhd67fz9r59h662g3viwsj8q38rl-python3.8-jeepney-0.6.0/lib/python3.8/site-packages:/nix/store/rclgx948qb1g97d8yh739hm8inx08xdm-python3.8-tornado-6.1/lib/python3.8/site-packages:/nix/store/cs0gdzs265y42qxfvxb0688yda7gylnc-python3.8-secretstorage-3.3.1/lib/python3.8/site-packages:/nix/store/67ffjq41rr75px49xrfipzfnc5a514wx-python3.8-packaging-20.9/lib/python3.8/site-packages:/nix/store/drhbc41cc8326dx1z07z8lk1s9qggzg0-python3.8-pyparsing-2.4.7/lib/python3.8/site-packages:/nix/store/i6vh7rb0pldixg12jzxql26yyv5dw160-python3.8-pycparser-2.20/lib/python3.8/site-packages:/nix/store/zyg9hz4vyfcz3ci7k7xbya4izxmcf8f4-python3.8-cffi-1.14.5/lib/python3.8/site-packages:/nix/store/ngnxnspq6anhcg9xmmrjzg0lknp35wad-python3.8-cryptography-3.4.7/lib/python3.8/site-packages:/nix/store/7xg5sgbd9z66hpgx67q1ww229dkcvf05-python3.8-python-magic-0.4.22/lib/python3.8/site-packages"
DEBUG 2021-10-31 07:48:06,297 [command.start:132]:/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/share/lutris/bin/lutris-wrapper /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga/unzip 0 0 /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga/unzip /tmp/bg/baldurs-gate-the-original-saga/gog/baldur_s_gate_the_original_saga_gog_3_23532.sh -d /home/felix/Games/gog/baldurs-gate-the-original-saga/tmp data/noarch/*
lutris-wrapper: /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga/unzip
Running /home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga/unzip /tmp/bg/baldurs-gate-the-original-saga/gog/baldur_s_gate_the_original_saga_gog_3_23532.sh -d /home/felix/Games/gog/baldurs-gate-the-original-saga/tmp data/noarch/*
Initial process has started with pid 109
/home/felix/.cache/lutris/installer/baldurs-gate-the-original-saga/unzip: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
Waiting for game to start (first non-excluded process started)
Initial process has exited (return code: 32512)
All children have exited.
Exit with returncode 32512
DEBUG 2021-10-31 07:48:06,458 [command.on_stop:180]:Process hasn't terminated yet
DEBUG 2021-10-31 07:48:06,459 [command.on_stop:182]:Process 92 has terminated with code 0
DEBUG 2021-10-31 07:48:07,305 [interpreter._iter_commands:309]:Installer command: {'extract': {'dst': '$GAMEDIR', 'file': 'gemrbengine'}}
DEBUG 2021-10-31 07:48:07,307 [commands.extract:169]:Extracting gemrb-0.8.1-x64.tar.gz
DEBUG 2021-10-31 07:48:07,308 [commands.extract:173]:extracting file /tmp/bg/baldurs-gate-the-original-saga/gemrbengine/gemrb-0.8.1-x64.tar.gz to /home/felix/Games/gog/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:07,313 [extract.extract_archive:126]:Extracting /tmp/bg/baldurs-gate-the-original-saga/gemrbengine/gemrb-0.8.1-x64.tar.gz to /home/felix/Games/gog/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:07,706 [system.remove_folder:220]:Removing folder /home/felix/Games/gog/baldurs-gate-the-original-saga/.extract-a56c8e7b
DEBUG 2021-10-31 07:48:07,706 [extract.extract_archive:178]:Finished extracting /tmp/bg/baldurs-gate-the-original-saga/gemrbengine/gemrb-0.8.1-x64.tar.gz to /home/felix/Games/gog/baldurs-gate-the-original-saga
DEBUG 2021-10-31 07:48:07,707 [commands._killable_process:521]:Process <function extract_archive at 0x7fc49781e670> returned: ('/tmp/bg/baldurs-gate-the-original-saga/gemrbengine/gemrb-0.8.1-x64.tar.gz', '/home/felix/Games/gog/baldurs-gate-the-original-saga')
DEBUG 2021-10-31 07:48:07,713 [commands.extract:175]:Extract done
DEBUG 2021-10-31 07:48:07,713 [interpreter._iter_commands:309]:Installer command: {'move': {'dst': '$GAMEDIR/baldurs-gate-1', 'src': '$GAMEDIR/tmp/data/noarch/prefix/drive_c/GOG Games/$INPUT_FOLDER'}}
DEBUG 2021-10-31 07:48:07,716 [commands.move:278]:Moving /home/felix/Games/gog/baldurs-gate-the-original-saga/tmp/data/noarch/prefix/drive_c/GOG Games/Baldur's Gate to /home/felix/Games/gog/baldurs-gate-the-original-saga/baldurs-gate-1
ERROR 2021-10-31 07:48:07,716 [errors.__init__:18]:I can't move /home/felix/Games/gog/baldurs-gate-the-original-saga/tmp/data/noarch/prefix/drive_c/GOG Games/Baldur's Gate, it does not exist
None
ERROR 2021-10-31 07:48:07,716 [jobs.target:36]:Error while completing task <bound method CommandsMixin.move of <interpreter.ScriptInterpreter object at 0x7fc49520dcc0 (lutris+installer+interpreter+ScriptInterpreter at 0x1962ae0)>>: I can't move /home/felix/Games/gog/baldurs-gate-the-original-saga/tmp/data/noarch/prefix/drive_c/GOG Games/Baldur's Gate, it does not exist
None
File "/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages/lutris/util/jobs.py", line 34, in target
result = self.function(*args, **kwargs)
File "/nix/store/jy4z39iankdq59a1pwb08ch8npn25cal-lutris-original-0.5.8.3/lib/python3.8/site-packages/lutris/installer/commands.py", line 283, in move
raise ScriptingError("I can't move %s, it does not exist" % src)
As you can see, the error message is misleading: the issue is due to the fact that unzip cannot load the right shared library libbz2.so, so it cannot unpack the archive.
The reason is that on NixOS, the system is stripped from its shared objects: they are packaged with the binaries through the packages scripts. That means that one cannot expect to download a binary and execute it directly.
My question is: what workaround can I use? My bet is that I must rewrite the script to use the unzip from my system, but maybe there is a simpler way. Also, I don’t really know how to rewrite the script to include that change, if needed.