Release 8.1.4: LINUX Build From Source Fails

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$

Last commit seen:

commit 25b0967dc06e7c04f86327f2e9f4517986d14704
Author: Jan Wielemaker J.Wielemaker@vu.nl
Date: Fri Apr 5 16:51:37 2019 +0200

Updated ssl

Most likely you have mixed versions, your directory says 5.7.x

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

git clean -xfd
git submodule foreach git clean -xfd

That also deletes the build directory, so do this first :slight_smile: 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.

Thanks, guys.I got it to configure and buiild (via make), but ctest fails all over the place.

I’ve reverted back to 7.7.15, where I was. My build environment is old and in need of renewal.

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.