From 9f87bbfe2d2497437b4e6a4dfc977b05614a49da Mon Sep 17 00:00:00 2001 From: Roy Ward Date: Wed, 21 Aug 2024 15:51:42 -0700 Subject: [PATCH 1/3] some install/doc fixes --- INSTALL.sh | 2 +- README.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/INSTALL.sh b/INSTALL.sh index 8c318db1337..f5c973b7777 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -108,7 +108,7 @@ build_swi_prolog_from_src() { local build_deps="build-essential autoconf git cmake libpython3-dev libgmp-dev libssl-dev unixodbc-dev \ libreadline-dev zlib1g-dev libarchive-dev libossp-uuid-dev libxext-dev \ libice-dev libjpeg-dev libxinerama-dev libxft-dev libxpm-dev libxt-dev \ - pkg-config libdb-dev libpcre3-dev libyaml-dev" + pkg-config libdb-dev libpcre3-dev libyaml-dev libedit-dev" sudo apt-get install -y $build_deps && { echo -e "${GREEN}Build dependencies installed successfully.${NC}" } || { diff --git a/README.md b/README.md index 53073b04b30..6be5db7207d 100755 --- a/README.md +++ b/README.md @@ -124,6 +124,36 @@ The output is saved as an HTML file in the same directory. mettalog --test --clean ./tests/baseline-compat ``` +### Troubleshooting + +## Some prolog commands not found + +If already have a recent enough version of swi-prolog installed, that will be used instead of mettalog installing its own. Some of the packages might not be installed, and mettalog might give an error such as: + +``` +ERROR: save_history/0: Unknown procedure el_write_history/2 +``` + +In that case, you need rebuild your swi-prolog installation to include the missing packages. The most reliable way to do this is to make sure the following Debian/Ubuntu packages are installed using: + +``` +sudo apt install build-essential autoconf git cmake libpython3-dev libgmp-dev libssl-dev unixodbc-dev \ + libreadline-dev zlib1g-dev libarchive-dev libossp-uuid-dev libxext-dev \ + libice-dev libjpeg-dev libxinerama-dev libxft-dev libxpm-dev libxt-dev \ + pkg-config libdb-dev libpcre3-dev libyaml-dev libedit-dev +``` + +then rebuild swi-prolog using the instructions from The [SWI-Prolog -- Installation on Linux, *BSD (Unix)](https://www.swi-prolog.org/build/unix.html). The main part of this (assuming that you are in the `swipl` or `swipl-devel` directory) is: + +``` +cmake -DCMAKE_INSTALL_PREFIX=$HOME -DCMAKE_BUILD_TYPE=PGO -G Ninja .. +ninja +ctest -j $(nproc) --output-on-failure +ninja install + +``` +If you installed swi-prolog as a package from your linux distribition and run into issues, it is likely that you will need to `apt remove` it and then either build from source or rerun the `INSTALL.sh` script. + ## :raised_hands: Acknowledgments Thanks to the Hyperon Experimental MeTTa, PySWIP teams, and Flybase for their contributions to this project. From 5afadd3ed42cd1b3ef7d25144036f14bf1fd28a5 Mon Sep 17 00:00:00 2001 From: Roy Ward Date: Wed, 21 Aug 2024 15:54:18 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6be5db7207d..64d1ba5d2e5 100755 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ mettalog --test --clean ./tests/baseline-compat ### Troubleshooting -## Some prolog commands not found +#### Some prolog commands not found If already have a recent enough version of swi-prolog installed, that will be used instead of mettalog installing its own. Some of the packages might not be installed, and mettalog might give an error such as: From f017de494a0122279fe52960a187670584c9c868 Mon Sep 17 00:00:00 2001 From: Roy Ward Date: Wed, 21 Aug 2024 15:55:54 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 64d1ba5d2e5..678c98da850 100755 --- a/README.md +++ b/README.md @@ -128,13 +128,13 @@ mettalog --test --clean ./tests/baseline-compat #### Some prolog commands not found -If already have a recent enough version of swi-prolog installed, that will be used instead of mettalog installing its own. Some of the packages might not be installed, and mettalog might give an error such as: +If already have a recent enough version of SWI-prolog installed, that will be used instead of mettalog installing its own. Some of the packages might not be installed, and mettalog might give an error such as: ``` ERROR: save_history/0: Unknown procedure el_write_history/2 ``` -In that case, you need rebuild your swi-prolog installation to include the missing packages. The most reliable way to do this is to make sure the following Debian/Ubuntu packages are installed using: +In that case, you need rebuild your SWI-prolog installation to include the missing packages. The most reliable way to do this is to make sure the following Debian/Ubuntu packages are installed using: ``` sudo apt install build-essential autoconf git cmake libpython3-dev libgmp-dev libssl-dev unixodbc-dev \ @@ -152,7 +152,7 @@ ctest -j $(nproc) --output-on-failure ninja install ``` -If you installed swi-prolog as a package from your linux distribition and run into issues, it is likely that you will need to `apt remove` it and then either build from source or rerun the `INSTALL.sh` script. +If you installed swi-prolog as a package from your linux distribition and run into issues, it is likely that you will need to `apt remove` it and then either build SWI-prolog from source or rerun the metta-wam `INSTALL.sh` script. ## :raised_hands: Acknowledgments Thanks to the Hyperon Experimental MeTTa, PySWIP teams, and Flybase for their contributions to this project.