Right after cloning the latest swipl-devel repo, following CMAKE.md, I did
cd swipl-devel
mkdir build
cd build
cmake -G Ninja ..
Which produced the following error messages
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
How can I fix this, to proceed with the build and later installation.
Sorry, I’m new to CMAKE, if there is a resource I should read first, it will be welcome. On the other hand, if you have some quick-fix commands, that will really help.
Thanks for the quick reply. That allows me to move one step forward. Still with some issues. I will try to summarize fixes, or issues if I reach a blocking one.
I installed the ubuntu python packages mentioned in the above reference, but still get the same error, after repeating the whole build and installation sequence.
What I really need for my project is access from Python to Prolog, but it would be a lot nicer to have a completely clean installation, just in case I might need that package, eventually (might be likely).
Thanks a lot for the suggestion. Yes, I ended up noticing that and made sure to install from the same source repo. I found something else: when I try to use the library from swipl, I get this message:
ERROR: open_shared_object/3: libpython3.12.so.1.0: cannot open shared object file: No such file or directory
I installed python3.12, still with no better results.
After I removed all python3.12 components from my system, the build was completely successful, including package Janus. For your reference, I am running on python3.13.3
I think it is particularly vital that the versions of the Python dev package matches the version of the running Python system. Embedding Python into Prolog links to a particular version of the Python .so file. There is unfortunately no way around that (AFAIK).