I tried. The DLL search (i.e., use_module(library(process)) is indeed not successful, it does not find process.dll (see below). The interesting thing is that the error below occurs already during the build phase, not after installation.
[955/959] Generating tests/test_certs/generated
FAILED: packages/ssl/tests/test_certs/generated C:/msys64/home/Matthias/swipl-devel/build.mingw64/packages/ssl/tests/test_certs/generated
cmd.exe /C "cd /D C:\msys64\home\Matthias\swipl-devel\build.mingw64\packages\ssl && C:\msys64\mingw64\bin\cmake.exe -E make_directory tests && C:\msys64\home\Matthias\swipl-devel\build.mingw64\src\swipl.exe -f none --no-packs C:/msys64/home/Matthias/swipl-devel/build.mingw64/packages/ssl/mkcerts.pl --source=C:/msys64/home/Matthias/swipl-devel/packages/ssl/tests --dest=tests && touch tests/test_certs/generated"
ERROR: c:/msys64/home/matthias/swipl-devel/build.mingw64/home/library/process.pl:58:
ERROR: c:/msys64/home/matthias/swipl-devel/build.mingw64/home/library/process.pl:58: Initialization goal raised exception:
ERROR: '$open_shared_object'/3: Das angegebene Modul wurde nicht gefunden.
ERROR: c:/msys64/home/matthias/swipl-devel/build.mingw64/packages/ssl/mkcerts.pl:40:
ERROR: Exported procedure process:process_set_method/1 is not defined
ERROR: c:/msys64/home/matthias/swipl-devel/build.mingw64/packages/ssl/mkcerts.pl:40:
Under Windows, I can see all the DLLs (including process.dll) in (builddir)/src already after building, so the build also “installs” something, probably driven by the lines at the bottom of src/CMakeLists.txt . If I understand correctly, the path to foreign(…) is expanded here (swipl.rc),
user:file_search_path(library, swi(packages)).
user:file_search_path(foreign, AppDir) :-
current_prolog_flag(windows, true),
current_prolog_flag(executable, Exe),
file_directory_name(Exe, AppDir).
Under Linux, the DLLs such as process.so stays in (builddir)/packages/clib. What I am wondering now is, how does the linux version find the “.so”-files? Here’s a hint,
%! add_package_path(+PkgBinDir) is det.
%
% Add the source and binary directories for the package to the
% `library` and `foreign` search paths. Note that we only need to add
% the binary directory if it contains shared objects, but it is
% probably cheaper to add it anyway.
add_package_path(PkgBinDir) :-
( current_prolog_flag(windows, true)
-> true
; assertz(user:file_search_path(foreign, PkgBinDir))
).
Obviously, assertz is skipped under Windows. swipl.rc is not available as a source file, but generated by boot/build_home.pl. If I remove the check for the windows-Flag, the build process is actually working. So, partial success. [I still see problems after ninja install]
Of course, a new prolog flag is needed (“msys2”). Do you think this is a viable solution?