I cannot compile swi prolog 9.2.5

I get the error while compiling:


[ 72%] Built target plugin_snowball
[ 72%] Built target snowball
[ 72%] Built target nlp
[ 72%] Built target pldoc
[ 72%] Generating pldoc2tex
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/utf8proc/unicode.pl:44:
ERROR:    /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/utf8proc/unicode.pl:44: Initialization goal raised exception:
ERROR:    open_shared_object/3: unicode4pl: cannot open shared object file: No such file or directory
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/utf8proc/unicode.pl:150:
ERROR:    call_goal_expansion/5: Unknown procedure: unicode:unicode_option_mask/2
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/utf8proc/unicode.pl:161:
ERROR:    call_goal_expansion/5: Unknown procedure: unicode:unicode_option_mask/2
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/utf8proc/unicode.pl:168:
ERROR:    call_goal_expansion/5: Unknown procedure: unicode:unicode_option_mask/2
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/utf8proc/unicode.pl:176:
ERROR:    call_goal_expansion/5: Unknown procedure: unicode:unicode_option_mask/2
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/pldoc/doc_latex.pl:1674:
ERROR:    Exported procedure unicode:unicode_nfkc/2 is not defined
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/pldoc/doc_latex.pl:1674:
ERROR:    Exported procedure unicode:unicode_nfkd/2 is not defined
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/pldoc/doc_latex.pl:1674:
ERROR:    Exported procedure unicode:unicode_nfc/2 is not defined
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/pldoc/doc_latex.pl:1674:
ERROR:    Exported procedure unicode:unicode_map/3 is not defined
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/pldoc/doc_latex.pl:1674:
ERROR:    Exported procedure unicode:unicode_nfd/2 is not defined
ERROR: /home/ox_external_source/sources_external/swi-prolog-9.2.5/build/home/library/ext/pldoc/doc_latex.pl:1675:
ERROR:    call_goal_expansion/5: Unknown procedure: unicode:unicode_option_mask/2
Warning: Halting with status 1 due to 11 errors and 0 warnings
make[2]: *** [man/CMakeFiles/pldoc2tex_state.dir/build.make:81: man/pldoc2tex] Error 1
make[1]: *** [CMakeFiles/Makefile2:3272: man/CMakeFiles/pldoc2tex_state.dir/all] Error 2
make: *** [Makefile:182: all] Error 2


Thanks in Advance

Try deleting the “build” directory and try again - sometimes Cmake gets confused (or the dependencies aren’t quite right, or both).

You might want to update to the latest GitHub sources (9.3.7), although the utf8proc package hasn’t changed in a long time.

Also: which OS, compiler are you using? (Although this probably won’t make a difference)

lsb_release -a
uname -a
gcc --version
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

$ uname -a
Linux debian64 5.10.0-29-amd64 #1 SMP Debian 5.10.216-1 (2024-05-03) x86_64 GNU/Linux

$ gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cmake --version
cmake version 3.18.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

AFAIK, this is a dependency problem that is fixed in the 9.3.x series as well as in the GIT version of the stable series.

In theory you should be able to hack around it by first running

 make utf8proc

and then run the normal make. Or, run the above after trapping the failure and run make again.

1 Like