Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BUILD_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# formDAM build notes

## v1.32.3 (2026-11-27) · the AppImage step's cause is fixed, and the engine inside an AppImage is checked before it ships

The 1.32.2 build log gave the cause: the AppImage tool could not find `liblcms2-ff8c4a65.so.2.0.10`, a library the frozen engine keeps in its own `rawpy.libs` folder, and stopped. `setup/build_linux_app` now works out which engine folders hold such libraries and shows them to the tool for that step. After the build it checks the engine inside the AppImage's folder: every library must find what it needs as at run time, and the engine must pass its self-check there, or the AppImage counts as not built. The step is still `try` until one release build has made a working AppImage. Nothing in the app, the engine or the macOS and Windows builds changed from 1.32.0. Detail in `src-tauri/HASHOUT_LOG.md`.

## v1.32.2 (2026-11-27) · replaces 1.32.1; the build log now says why an AppImage was not built

1.32.1 was published with the deb and without the AppImage it was meant to add, and was then taken back. 1.32.2 replaces it. The AppImage step in `setup/build_linux_app` now runs verbosely and, when it fails, prints the lines that name the problem into the build log; in 1.32.1 the log could not say why. The step is still `try`, so the deb ships either way. Nothing in the app, the engine or the macOS and Windows builds changed from 1.32.0. Detail in `src-tauri/HASHOUT_LOG.md`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p align="center">
<img alt="version 1.32.2" src="https://img.shields.io/badge/version-1.32.2-eef0f4?style=flat-square">
<img alt="version 1.32.3" src="https://img.shields.io/badge/version-1.32.3-eef0f4?style=flat-square">
<img alt="Python FastAPI" src="https://img.shields.io/badge/python%20%C2%B7%20fastapi-engine-3776ab?style=flat-square&logo=python&logoColor=white">
<img alt="macOS, Windows, Linux" src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-native-2f7bf5?style=flat-square">
<img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-3a3a3a?style=flat-square">
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "formdam-frontend",
"private": true,
"version": "1.32.2",
"version": "1.32.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
25 changes: 22 additions & 3 deletions setup/build_linux_app
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,33 @@ fi
say "Building the app bundle (this compiles Rust; first run takes a while)"
cd src-tauri
npx --yes @tauri-apps/cli@2.12.3 build --bundles "$BUNDLES" -- --locked
appimage() {
engine=binaries/formdam-backend
folders=""
for lib in $(find "$engine" -type f -name '*.so*' -exec ldd {} + 2>/dev/null | awk '/not found/ {print $1}' | sort -u); do
folder=$(find "$PWD/$engine" -type f -name "$lib" -path '*.libs/*' -printf '%h\n' -quit)
[ -n "$folder" ] || folder=$(find "$PWD/$engine" -type f -name "$lib" -printf '%h\n' -quit)
[ -n "$folder" ] || { echo "AppImage: the engine needs $lib and no folder of the engine holds it"; continue; }
case ":$folders:" in *":$folder:"*) ;; *) folders="${folders:+$folders:}$folder" ;; esac
done
[ -z "$folders" ] || echo "AppImage: engine folders put on the library path for this step: $folders"
( [ -z "$folders" ] || export LD_LIBRARY_PATH="$folders${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
NO_STRIP=true npx --yes @tauri-apps/cli@2.12.3 build --verbose --bundles appimage -- --locked ) || return 1
inside=target/release/bundle/appimage/FormDAM.AppDir/usr/lib/FormDAM/formdam-backend
[ -x "$inside/formdam-backend" ] || { echo "ERROR: the AppImage's app folder is not on disk, so the engine inside it cannot be checked"; return 1; }
lost=$(find "$inside" -type f -name '*.so*' -exec env LD_LIBRARY_PATH="$PWD/$inside/_internal" ldd {} + 2>/dev/null | awk '/not found/ {print $1}' | sort -u | tr '\n' ' ')
[ -z "$lost" ] || { echo "ERROR: inside the AppImage the engine's libraries cannot find: $lost"; return 1; }
"$inside/formdam-backend" --selfcheck || { echo "ERROR: inside the AppImage the engine fails its self-check"; return 1; }
}
if [ "$APPIMAGE" != no ]; then
say "Building the AppImage (the same program and engine in one file that needs no install)"
step=target/appimage-step.log
if NO_STRIP=true npx --yes @tauri-apps/cli@2.12.3 build --verbose --bundles appimage -- --locked > "$step" 2>&1; then
echo "AppImage: built"
if appimage > "$step" 2>&1; then
grep '^AppImage: ' "$step" || true
echo "AppImage: built, and the engine inside it passes its self-check"
else
echo "---- AppImage step: the lines that name a problem ----"
grep -n -iE 'error|could not|cannot|not found|no such|failed|denied' "$step" | tail -n 40 || true
grep -n -iE 'error|could not|cannot|not found|no such|failed|denied' "$step" | grep -v 'copyright files' | tail -n 40 || true
echo "---- AppImage step: its last 60 lines (all of it is in $PWD/$step) ----"
tail -n 60 "$step" || true
echo "---- AppImage step: end ----"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "formdam-desktop"
version = "1.32.2"
version = "1.32.3"
description = "formDAM: local-first digital asset manager for photos & video"
edition = "2021"

Expand Down
15 changes: 15 additions & 0 deletions src-tauri/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# src-tauri HASHOUT_LOG · formDAM
current: v1.27.2 · 2026-10-22

### ../setup/build_linux_app · the AppImage tool is shown where the engine keeps its own libraries, and the engine inside the AppImage is checked
- refers-to: ../setup/build_linux_app (`appimage()`: the folders put on `LD_LIBRARY_PATH`, the two checks after the build)
- kind: fix
- logged: v1.32.3 · 2026-11-27

**The cause, from the 1.32.2 build log.** `ERROR: Could not find dependency: liblcms2-ff8c4a65.so.2.0.10`, then `Failed to deploy dependencies for existing files`. The AppImage tool (linuxdeploy) asks `ldd` what every library under `usr/lib` needs and stops at the first one that is not found. The frozen engine holds two libraries that `ldd` cannot resolve where they lie: `_internal/libraw_r.so.25`, a second copy PyInstaller places beside the one in `rawpy/`, whose search path `$ORIGIN/../rawpy.libs` is only right from `rawpy/`; and `libheif`, which carries no search path at all and needs `libde265`. Neither matters when the engine runs: its start program puts `_internal` on the library path, and everything is found. It matters only to a tool that walks the files.

**The fix.** Before the AppImage step the script asks `ldd` the same question over the engine, takes each library that is not found, finds the engine folder that holds it (a `*.libs` folder first), and puts those folders on `LD_LIBRARY_PATH` for that step only. Today that is `pi_heif.libs` and `rawpy.libs`; the list is worked out at build time, so a new wheel with the same habit needs no edit here. Those folders hold only hash-named libraries, so nothing else in the step picks up a different system library because of them.

**The check after it.** The AppImage tool rewrites search paths in the libraries it walks, so a file that builds is not yet an engine that runs. After the build the script looks at the engine in the AppImage's own folder (`target/release/bundle/appimage/FormDAM.AppDir`): every library must find what it needs with only the engine's `_internal` on the path, as at run time, and the engine must pass `--selfcheck` from there. If either fails, the AppImage counts as not built and is removed, so an AppImage with a broken engine is never a release file.

**Still `try`.** Shown here: with the engine from the published 1.32.1 deb, the 1.32.2 step fails on a stand-in for the tool with the build log's error (it names `libde265` first, the other of the two), the new step passes it with the two folders, the engine passes its self-check from the AppImage folder, and an engine with libraries taken out is caught and the file removed. Not shown: the real tool's run. That it reads `LD_LIBRARY_PATH` is its documented way to find libraries in unusual places and is not confirmed here, and it may stop later on something else. One more build decides whether the step becomes `required`.

Also: the block of problem lines no longer lists the tool's "Could not find copyright files" warnings, which buried the error in the 1.32.2 log.

### ../setup/build_linux_app · when the AppImage is not built, the build log says why
- refers-to: ../setup/build_linux_app (the AppImage step: `--verbose`, `target/appimage-step.log`, the two printed blocks)
- kind: fix
Expand Down
Loading