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

Enough to often go nuts working with it but not enough that it rolls off the finger tips.


I actually tried swapping out the Git submodule version of RocksDB which is rocksdb @ bd68bfb for a current one and ran into a new set of errors.

The one requested by the RocksDB pack and the commits of RocksDB are compiling clean by themselves but when built via pack_install/1 or pack_rebuild/1 lead to errors. I tried running make shared_object in the pack directory but that is failing because pack_install/1 is setting up some environment variables that are not there when make is executed directly.

Saw this post that notes

For debugging purposes pack_install creates a shell script in the build location that sets the same variables, so you can run the compiler from any environment.

but I can not find the script or even in the Prolog code where it is created. Needless to say this is my typical scenario with make and C++, try, back step try again, and again and again and then one day wake up lucky and it just works. Then it seems I can never get such things to fail again.