Current status of SWI-Prolog with RocksDB packages installed using MSYS2

This topic seems to have died :thinking:

In doing some leg work to get RocksDB working with SWI-Prolog via MSYS2 using Jan’s two repos

did this as an exercise to learn more

As many of you know but I just discovered, SWI-Prolog interface for RocksDB is built as a static library and not a DLL or shared object. (ref) The norm seems to be that a DLL or shared object is preferred and a static library is the expectation. (ref)

As Jan W. noted here

  • The static lib is not compiled with -fPIC and can thus not be used to create a shared object.

but then @mgondan1 notes here

I have recompiled rocksdb with RTTI and PIC on msys (RTTI was already set to on, PIC needed an extra run), so the main challenge is to remove it from the prolog pack

Any further updates? Care to share the MSYS2 build steps? Why the need to remove it from the prolog pack?

@peter.ludemann does note the make for Linux which which sets -fPIC USE_RTTI=

make -C $SRC/rocksdb SUBMODULE_UPDATE= SWIPL=$BUILD_DIR/src/swipl PACKSODIR=/tmp/rocksdb-so SOEXT=so CFLAGS=“-fPIC -pthread -I$SRC/swipl-devel/src -I$SRC/swipl-devel/src/os -I$SRC/swipl-devel/packages/cpp” plugin check

which is helpful.

@paule32 has provided a GItHub repo that I need to look at in more detail.

Thanks to all involved.


Side note

For me this is just a stepping stone to

  1. Build SWI-Prolog using Microsoft Visual Studio (ref)
  2. Add the RocskDB functionality for the Windows build using Microsoft Visual Studio