Open heiheshang opened 1 year ago
I think is is currently very hard to compile SWI-Prolog on CentOS. The original compiler (gcc 4.8.5) is too old and getting a working setup for a more recent compiler and matching dependencies is non-trivial. The advice is to use a more up-to-date Linux distro. If this is commercial and you need CentOS, contact info@swi-prolog.com. Possibly we can work something out.
gcc --version gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
I switched to a more recent version. Nothing changed.maybe some other libraries need to be updated
I see that the compiler can't find files for opensll, maybe I need to specify its location somehow, how to do it?
The compiler is fine. There has been a similar discussion here some time ago. Baseline is that you need a consistent set of development tools and libraries. Given what CentOS 7 is offering out of the box, that is not easy to get going. Possibly you can do so with the right packages or compiling the dependencies yourself. Possibly you can work around this using conan
. It is surely not trivial. You can also go some versions backward with SWI-Prolog.
`In file included from /home/oper/Programs/swipl-devel/src/pl-incl.h:132:0, from /home/oper/Programs/swipl-devel/src/pl-atom.h:36, from /home/oper/Programs/swipl-devel/src/pl-atom.c:38: /home/oper/Programs/swipl-devel/src/pl-builtin.h:331:41: error: missing binary operator before token "("
if defined(GNUC) && __has_attribute(error)`
gcc --version gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
` cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"`