Pack RocksDB, build fails on Ubuntu 22.04 LTS on WSL on Windows (reproducible)

So, an error on my part and a bug in pack_install/2.

My error: should have used upgrade(true) instead of update(true).

And I’m sending a PR for the bug in pack_install/2 - FIXED: pack_install/2 upgrade version check by kamahen · Pull Request #1005 · SWI-Prolog/swipl-devel · GitHub

As is, the rocksdb submodule is pulled if it doesn’t exist and nothing is updated or built as long as rocksdb/librocksdb.a exists. I don’t know whether there is a reasonable solution for this. That also depends on how reliable it is to pull rocksdb and run make there to get a proper new version of the library. The solutions I can think of either rebuild rocksdb itself always or get dependent on low level stuff I rather not depend on. For example, the file .git/modules/rocksdb/refs/heads/master should tell us whether the module is installed as well as when it was last updated. We could use that instead of rocksdb/INSTALL.md to trigger the build. Depending on this type of low-level git details is a recipe for making things break though :frowning:

Or, just use a FORCE dependency in the Makefile, to rebuild rocksdb/librocksdb.a. I’m in the process of making some other changes, so I can put this in and see how if it works as expected.