Bug 502553 - flatpak not building, sqlcipher build error
Summary: flatpak not building, sqlcipher build error
Status: CONFIRMED
Alias: None
Product: skrooge
Classification: Applications
Component: general (other bugs)
Version First Reported In: Trunk from git
Platform: Flatpak Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: skierpage
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-08 09:36 UTC by skierpage
Modified: 2025-10-11 10:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2025-04-08 09:36:55 UTC
SUMMARY
The nightly Skrooge flatpak hasn't been built for a while. When it does build it fails building the sqlcipher module.

STEPS TO REPRODUCE
1. In https://invent.kde.org/office/skrooge/-/pipelines find a recent skrooge update that isn't just translations
2. Look at its status.
3. If necessary trigger the build flatpak step manually.

OBSERVED RESULT

The "deploy flatpak" step sometimes shows the "Stage deploy flatpak" task with a gear icon instead of a red or green checkmark, e.g. https://invent.kde.org/office/skrooge/-/pipelines?page=2&scope=all , because "This job requires a manual action ".

The last time the step ran, https://invent.kde.org/office/skrooge/-/pipelines/918152 , it failed. And when I kicked off flatpak build, and it failed the same way, https://invent.kde.org/office/skrooge/-/jobs/2740458
The last error seems to be building sqlcipher: 
    Building module sqlcipher in /builds/office/skrooge/.flatpak-builder/build/sqlcipher-1
    ...
    autoreconf: export WARNINGS=
    autoreconf: error: 'configure.ac' is required

EXPECTED RESULT

I'm not sure why that recent checkin don't trigger building a new flatpak.
flatpak builds should succeed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 

ADDITIONAL INFORMATION
If you look at .flatpak-manifest.json, the sqlcipher module has some specialized build steps, and if you look at https://github.com/sqlcipher/sqlcipher.git , a recent change is "Updates README.md with new build instructions and required CFLAGS". So something needs updating
Comment 1 skierpage 2025-04-09 23:53:57 UTC
In branch work/flatpak_sqlcipher_fix I tried simplifying the sqlcipher module recipe in the flatpak manifest based on qTox's much simpler recipe, and the pipeline failed 😕.
Comment 2 skierpage 2025-06-04 04:10:35 UTC
sqlcipher v4.7.0 has "complete upstream SQLite refactoring of build system to use autosetup". See its changelog  https://github.com/sqlcipher/sqlcipher/blob/master/CHANGELOG.md for all the BREAKING CHANGES, including:
- No more configure.ac, hence the flatpak build that invokes autoreconf fails.
- Instead it gives  ./configure options you need to specify.
- It changes the name of the library it builds from libsqlcipher to libsqlite3 "for alignment with SQLite".
  - this seems very prone to error since a Linux distribution and/or the flatpak runtime probably already have "vanilla" libsqlite3 and sqlite3.pc that don't have the cipher support!
- In builds, it uses `jimsh` instead of `tclsh`, so perhaps it no longer requires building tclsh.

As a workaround, merge request !73 changes .flatpak-manifest.json to build sqlcipher v4.6.1 (same as skrooge stable on flathub), not latest sqlcipher version from git.
Comment 3 skierpage 2025-06-10 20:03:48 UTC
>   - this seems very prone to error since a Linux distribution and/or the flatpak runtime probably already have "vanilla" libsqlite3 and sqlite3.pc that don't have the cipher support!

Yes, the sqlite and sqlcipher packages would conflict in Fedora (which is still shipping 4.5.2). I filed https://github.com/sqlcipher/sqlcipher/issues/556 asking for help to build with the old name.