Bwrap: Can't mkdir parents for /app/lib/x86_64-linux-gnu/GL: Read-only file system error: ldconfig failed, exit status 256

I’ve never made a flatpak app before, so after many trials and tribulations, I finally managed to make a proper Flatpak version of the Amulet Team’s Minecraft Editor. I worked out all the kinks (or, since I’m here, obviously not, right?) in my manifest, and when it compiled, it didn’t complain about anything.

Then I installed it. This was also reported as a success:

(python-3119) evilsupahfly on Black-Beast at Tue 20 Aug 2024 22:20:38 EDT
[~/Downloads/flatpack-stuff/Amulet-Flatpak/Amulet-Flatpak] flatpak install -v -u amulet.flatpak
F: Opening user flatpak installation at path /home/evilsupahfly/.local/share/flatpak
F: Failed to download optional summary index: Can't fetch summary from disabled remote ‘amulet_map_editor-origin’
F: Transaction: install bundle amulet_map_editor-origin:app/com.github.amulet_map_editor/x86_64/master@febfabf3600adb3b962e652abcd2ac8c3d567e9d5c386e94324721d9352dc38b[$old]
F: marking op install bundle:app/com.github.amulet_map_editor/x86_64/master resolved to febfabf3600adb3b962e652abcd2ac8c3d567e9d5c386e94324721d9352dc38b
F: Updating dependency org.freedesktop.Platform/x86_64/23.08 of com.github.amulet_map_editor/x86_64/master
F: Transaction: update flathub:runtime/org.freedesktop.Platform/x86_64/23.08[$old]
F: Fetching summary index file for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Received 10001 bytes
F: Loading https://dl.flathub.org/repo/summaries/6de49a3f9fdf4e9908da248cfe236ea8ca8c96379b4360150224c880f510ddba.idx.sig using curl
F: Received 592 bytes
F: Fetching indexed summary file fe76ab5dfd79ff1fb721f88d1d64cc995b003d1b8aa13a6903ad309668bb95aa.gz for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summaries/fe76ab5dfd79ff1fb721f88d1d64cc995b003d1b8aa13a6903ad309668bb95aa.gz using curl
F: Received 1253927 bytes
F: marking op update:runtime/org.freedesktop.Platform/x86_64/23.08 resolved to 64a85d9703e16a360fb65aeb40382183be68836567e2a3a9455f70b2a26a568f
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.nvidia-560-28-03/x86_64/1.4[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.Locale/x86_64/23.08[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.openh264/x86_64/2.2.0[*]
F: marking op install/update:runtime/org.freedesktop.Platform.openh264/x86_64/2.2.0 resolved to bf24f23f3ba385f6e8c9215ed94d979db99814b0b614504a23a6d0751dc5f063
F: marking op install/update:runtime/org.freedesktop.Platform.Locale/x86_64/23.08 resolved to bc53b787ddc48e63d12494ee103c52412a6bade79e00be4068f3325f0396f853
F: marking op install/update:runtime/org.freedesktop.Platform.GL.nvidia-560-28-03/x86_64/1.4 resolved to 6463ec6402b22fac815017d9838ba73223967261d402f3c8ad604846ede0f932
F: marking op install/update:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra resolved to 1f6789acbc5410c18c9237f57ccbb34edda9b207429e6d74775e0aeb9fd66189
F: marking op install/update:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08 resolved to 9981cd935556ef0ec146129d66b232fa1dc3b2f04eb83fe8e881cb64056d8c5f

com.github.amulet_map_editor permissions:
    ipc	network	fallback-x11	wayland	x11	dri	file access [1]	dbus access [2]	tags [3]

    [1] /app/lib:create, home:create, host-os
    [2] org.freedesktop.Notifications
    [3] 0.10.35


 1.	   	com.github.amulet_map_editor	master	i	amulet_map_editor-origin	0 bytes

Proceed with these changes to the user installation? [Y/n]: y
Installing…
F: No checksum specified, getting tip of app/com.github.amulet_map_editor/x86_64/master from origin amulet_map_editor-origin
F: tip resolved to: febfabf3600adb3b962e652abcd2ac8c3d567e9d5c386e94324721d9352dc38b
F: Getting parental controls details for app/com.github.amulet_map_editor/x86_64/master from amulet_map_editor-origin
F: Skipping parental controls check for app/com.github.amulet_map_editor/x86_64/master since parental controls are disabled globally
F: running triggers from /usr/share/flatpak/triggers
F: running trigger desktop-database.trigger
F: Running 'bwrap --unshare-ipc --unshare-net --unshare-pid --ro-bind / / --proc /proc --dev /dev --bind /home/evilsupahfly/.local/share/flatpak /home/evilsupahfly/.local/share/flatpak -- /usr/share/flatpak/triggers/desktop-database.trigger /home/evilsupahfly/.local/share/flatpak'
F: running trigger gtk-icon-cache.trigger
F: Running 'bwrap --unshare-ipc --unshare-net --unshare-pid --ro-bind / / --proc /proc --dev /dev --bind /home/evilsupahfly/.local/share/flatpak /home/evilsupahfly/.local/share/flatpak -- /usr/share/flatpak/triggers/gtk-icon-cache.trigger /home/evilsupahfly/.local/share/flatpak'
F: running trigger mime-database.trigger
F: Running 'bwrap --unshare-ipc --unshare-net --unshare-pid --ro-bind / / --proc /proc --dev /dev --bind /home/evilsupahfly/.local/share/flatpak /home/evilsupahfly/.local/share/flatpak -- /usr/share/flatpak/triggers/mime-database.trigger /home/evilsupahfly/.local/share/flatpak'
F: Pruning repo
F: Pruned 141789/5 objects, size 54.3 kB
Installation complete.[/code]

Then I tried to run it, and that's when I was greeted with this error:

[code]F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/evilsupahfly/.local/share/flatpak
F: Opening system (extra) flatpak installation at path /media/evilsupahfly/INTEL-SSD
F: Opening user flatpak installation at path /home/evilsupahfly/.local/share/flatpak
F: Skipping parental controls check for app/com.github.amulet_map_editor/x86_64/master since parental controls are disabled globally
F: Opening user flatpak installation at path /home/evilsupahfly/.local/share/flatpak
F: Regenerating ld.so.cache /home/evilsupahfly/.var/app/com.github.amulet_map_editor/.ld.so/04e4cee2920767ce209e16d6b29120052a14d77febd1e5ec942077c056c82fba
F: /home/evilsupahfly/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/23.08/64a85d9703e16a360fb65aeb40382183be68836567e2a3a9455f70b2a26a568f/files/lib32 does not exist
F: Running: 'bwrap --args 31 ldconfig -X -C /run/ld-so-cache-dir/04e4cee2920767ce209e16d6b29120052a14d77febd1e5ec942077c056c82fba.ruM2JY'
bwrap: Can't mkdir parents for /app/lib/x86_64-linux-gnu/GL: Read-only file system
error: ldconfig failed, exit status 256

As it stands, I have removed, tweaked, reinstalled, and pounded my fist on the desk in anger and frustration repeatedly over the last week because I just don’t understand what’s going wrong.

If it helps, and you’re fluent in Flatpak’s abstract promulgation of .YAML manifesto conspectus, my project recipe is available on my GIT. New users are only permitted two links, and my manifest is full of Python package download links, so I can’t post it directly here.

And this is the script I wrote to make my life a little easier, which just runs two steps for me because I’m lazy, but it’s also for consistency so it runs the same two steps the same way, every time. Plus, I like the little splash of colour it adds.

#!/bin/bash

#
# This was more of a checklist for myself, but it's handy for limited automation too
#

# Check if the script is running in a Python 3 virtual environment
#if [[ -z "$VIRTUAL_ENV" ]]; then
#    echo "Error: This script must be run inside a Python 3 virtual environment."
#    exit 1
#fi

BOLD="\033[1m"
RESET="\e[0m" #Normal
BGND="\e[40m"
YELLOW="${BOLD}${BGND}\e[1;33m"
RED="${BOLD}${BGND}\e[1;91m"
GREEN="${BOLD}${BGND}\e[1;92m"
WHITE="${BOLD}${BGND}\e[1;97m"

# Attempt to build Frankenstein's Monster - change "tag" when updating to newer Amulet versions
flatpak-builder -v --install-deps-from=flathub --mirror-screenshots-url=https://dl.flathub.org/media/ --add-tag=0.10.35 --bundle-sources --repo=amulet_flatpak_repo amulet_build_dir amulet.yml --force-clean

# Bundle the contents of the local repository into "amulet.flatpak"
flatpak build-bundle amulet_flatpak_repo amulet.flatpak com.github.amulet_map_editor

# Install bundle
echo
echo -e "${YELLOW}    To install the Amulet Flatpak, type:"
echo -e "${WHITE}        flatpak install -u amulet.flatpak"

# Run bundle
echo
echo -e "${YELLOW}    To run your install, type:"
echo -e "${WHITE}        flatpak run com.github.amulet_map_editor"

#Uninstall bundle if it doesn't work or you just don't need it
echo
echo -e "${YELLOW}    To uninstall this, type:"
echo -e "${RED}        flatpak uninstall com.github.amulet_map_editor${RESET}"
echo

Honestly, as my first foray into the world of Flatpaking, it’s been a real … “learning experience…”

System specs available upon request.

Drop this entire block Amulet-Flatpak/amulet.yml at 02376bd31311737673b476e4e95a4ddbcf3180c5 · EvilSupahFly/Amulet-Flatpak · GitHub This part is creating the issue, these extensions are “managed” by the runtime, you don’t need to list them in your app manifest. It works OOTB.

sdk-version is not a valid key Amulet-Flatpak/amulet.yml at 02376bd31311737673b476e4e95a4ddbcf3180c5 · EvilSupahFly/Amulet-Flatpak · GitHub

Drop these entire block Amulet-Flatpak/amulet.yml at 02376bd31311737673b476e4e95a4ddbcf3180c5 · EvilSupahFly/Amulet-Flatpak · GitHub. That entire block is invalid keys.

Where did you find these? The docs there should be fixed.

You can refer to the official documentation Manifests - Flatpak documentation for a guide and Flatpak Builder Command Reference - Flatpak documentation for valid manifest properties.

What documentation told you to put that in the manifest? I’m asking so we can get that documentation fix as it is wrong.

Thanks for responding so quickly! :slightly_smiling_face:

In answer to your questions:

The guide at Extensions - Flatpak documentation is actually where I got the information because previously, I was using add-extensions: and the app would load initially, but it would cause wxPython to crash when attempting to render the OpenGL window for the 3D map after opening a world as referenced here.

Almost every example on almost every page includes sdk: [something.something.Sdk] so I figured it was integral.

I’ll be honest - I don’t even know where I got that from. ¯\_(ツ)_/¯

That’s an issue with the app or wxpython. The page doesn’t say to add those extensions. I’ll add a warning.

1 Like

See, I went to wxPython first weeks ago, and they sent me here because according to them, flatpak wasn’t initializing the OpenGL canvas and wxPython couldn’t render with a null canvas, which sent me down this rabbit hole.

I’ve implemented all your feedback, and I’m happy to report that with your help, I’ve finally built Frankenstein’s Monster and the Amulet flatpak now runs as expected!

Thanks! :grin: :+1:

This topic was automatically closed after 5 days. New replies are no longer allowed.