Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An install script update, and a troubleshooting section in the readme #96

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion INSTALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
} || {
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.

Expand Down
Loading