I can’t find instatiations for these FUNCTORS anywhere.
[ 2%] Building C object src/CMakeFiles/libswipl.dir/pl-gc.c.o
/home/jeffr/SWIProlog/5.7.x/pl-devel/src/pl-gc.c: In function ‘unify_gc_reason’:
/home/jeffr/SWIProlog/5.7.x/pl-devel/src/pl-gc.c:616: error: ‘FUNCTOR_gc6’ undeclared (first use in this function)
/home/jeffr/SWIProlog/5.7.x/pl-devel/src/pl-gc.c:616: error: (Each undeclared identifier is reported only once
/home/jeffr/SWIProlog/5.7.x/pl-devel/src/pl-gc.c:616: error: for each function it appears in.)
/home/jeffr/SWIProlog/5.7.x/pl-devel/src/pl-gc.c: In function ‘unify_gc_stats’:
/home/jeffr/SWIProlog/5.7.x/pl-devel/src/pl-gc.c:643: error: ‘FUNCTOR_gc_stats8’ undeclared (first use in this function)
make[2]: *** [src/CMakeFiles/libswipl.dir/pl-gc.c.o] Error 1
make[1]: *** [src/CMakeFiles/libswipl.dir/all] Error 2
make: *** [all] Error 2
jeffr@jeffr-SX2803:~/SWIProlog/5.7.x/pl-devel/build$
These are generated in src/pl-funct.ih and src/pl-funct.ic from src/ATOMS. AFIAK this works nice and automatically using the ninja generator. Seems something goes wrong using make. I propose to try this from the build directory.
rm src/pl-*.i[ch]
and run make again.
@swi’s remark also makes sense. If you switch to the CMake build, make sure to build in a separate build directory, e.g.,
mkdir build
cd build
cmake ..
And make sure the original build directory is free of old build products. The best way is
That also deletes the build directory, so do this first Next make sure git status says your working directory is nicely up to data and clean. This is a one time thing after moving from a pre CMake build to the CMake build in the same directory.
Sounds weird. A possible version mismatch due to environment variables such as LD_LIBRARY_PATH or SWI_HOME_DIR? The CMake run warns against this, but as make runs separately it cannot do anything about this. Otherwise, any unix-like system should build and test successfully if all dependencies have been installed before running CMake, CMake is at least 3.5 and I think it is hard to find other dependencies still alive that do not work.
C compilers give different warnings. Compilation is completely silent on current Ubuntu, Fedora and MacOS. On other platforms a few warnings are not impossible. All tests should pass, except for a timezone test because the naming conventions of time zones vary and the test might not have all variations. Also the float NaN representation tests can be problematic considering variations allowed by the IEEE.
Missing dependencies such as libgmp can also cause test failures because some of the tests need unbounded arithmetic and now all such tests have been made conditionally.