[SFDK][4.1] Problem or PEBKAC? Database environment version mismatch installing dependencies

I was trying to build calligra (for calligraconverter) for aarch64, using the new EA build targets, but i’m getting:

attah@obsidian ~/repos/calligra $ sfdk config target=SailfishOS-4.1.0.23EA-aarch64
[D] SOFT ASSERT: "!path.isEmpty()" in file ../../../../sailfish-qtcreator/src/libs/sfdk/vboxvirtualmachine.cpp, line 123
attah@obsidian ~/repos/calligra $ sfdk build
[D] SOFT ASSERT: "!path.isEmpty()" in file ../../../../sailfish-qtcreator/src/libs/sfdk/vboxvirtualmachine.cpp, line 123

The following 40 NEW packages are going to be installed:
  bison boost-atomic boost-chrono boost-container boost-date-time boost-devel boost-exception boost-filesystem boost-graph boost-iostreams boost-locale boost-log boost-math boost-program-options boost-random
  boost-regex boost-serialization boost-signals boost-stacktrace boost-test boost-timer boost-type_erasure boost-wave extra-cmake-modules flex gettext gettext-devel gettext-libs icu libeigen3-devel libgomp
  libicu-devel libkf5archive-devel libtextstyle m4 qt5-qtprintsupport-devel qt5-qtscript qt5-qtscript-devel qt5-qttest-devel shared-mime-info-devel

40 new packages to install.
Overall download size: 0 B. Already cached: 17.9 MiB. After the operation, additional 17.9 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y

Installation of boost-atomic-1.66.0+git2-1.2.4.jolla.aarch64 failed:
Error: Subprocess failed. Error: RPM failed: error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db4 -  (-30971)
error: cannot open Packages database in /var/lib/rpm

Abort, retry, ignore? [a/r/i] (a): a
Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.

Turs out it is the same for armv7hl too. I tried a fulll reinstall of the SDK, but no change. I have both current and EA targets installed.

Thanks to @elros1 on IRC, a sb2 -t <target> -m sdk-install -R rm -rf /var/lib/rpm/__db.00* fixes it.

So it seems the SDK breaks itself during update?

2 Likes

Not exactly. It’s the EA targets which have the RPM database in wrong format. It’s nice that you already found a workaround. This will be fixed in the next SDK release, which shouldn’t be too far away.

1 Like