Never gonna give up :D -> SWI-Prolog works now

This commit is contained in:
Morgan Wattiez 2019-08-15 00:13:45 +02:00
parent 587c52a21d
commit dd10108010

View File

@ -131,53 +131,23 @@ echo 'export PATH="/root/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc source ~/.zshrc
# Prepare swipl install # Prepare swipl install
pyenv install 3.6.0 yum -y install epel-release
ln -snf /root/.pyenv/versions/3.6.0/bin/python /usr/bin/python3.6 yum groupinstall -y "Development Tools"
yum -y install python36 # because pyenv installs python in a way that do not help installing cmake3 yum -y install ninja-build libunwind freetype-devel gmp-devel java-1.8.0-openjdk-devel jpackage-utils libICE-devel libjpeg-turbo-devel libSM-devel libX11-devel libXaw-devel libXext-devel libXft-devel libXinerama-devel libXmu-devel libXpm-devel libXrender-devel libXt-devel ncurses-devel openssl-devel pkgconfig readline-devel libedit-devel unixODBC-devel zlib-devel uuid-devel libarchive-devel libyaml-devel
yum -y install cmake3
yum -y install ninja-build # Needed for cmake3 target
git clone https://github.com/SWI-Prolog/swipl-devel.git
cd swipl-devel
git submodule update --init
mkdir build ## Prepare cmake3 install
cd build #pyenv install 3.6.0
yum install -y ninja-build #ln -snf /root/.pyenv/versions/3.6.0/bin/python /usr/bin/python3.6
dnf install -y \ #yum -y install python36 # because pyenv installs python in a way that do not help installing cmake3
cmake \
ninja-build \
libunwind \
freetype-devel \
gmp-devel \
java-1.8.0-openjdk-devel \
jpackage-utils \
libICE-devel \
libjpeg-turbo-devel \
libSM-devel \
libX11-devel \
libXaw-devel \
libXext-devel \
libXft-devel \
libXinerama-devel \
libXmu-devel \
libXpm-devel \
libXrender-devel \
libXt-devel \
ncurses-devel \
openssl-devel \
pkgconfig \
readline-devel \
libedit-devel \
unixODBC-devel \
zlib-devel \
uuid-devel \
libarchive-devel \
libyaml-devel
ln -snf /usr/bin/cmake3 /usr/bin/cmake
cmake3 -DCMAKE_INSTALL_PREFIX=/usr/local ..
# TODO install swipl...
#brew "logtalk"
yum -y install cmake3 && ln -snf /usr/bin/cmake3 /usr/bin/cmake
git clone --depth 1 https://github.com/SWI-Prolog/swipl.git && cd swipl && git submodule update --init && mkdir build && cd build
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -G Ninja ..
ninja-build install
# Now SWI-Prolog is ready, let's install logtalk
yum -y install https://logtalk.org/files/logtalk-3.28.0-1.noarch.rpm
# Logtalk should be available at /usr/local/share/ , for instance you can launch logtalk with swipl integration, using /usr/local/share/logtalk-3.28.0-stable/integration/swilgt.sh
# Prepare terraform install # Prepare terraform install
yum -y install jq wget yum -y install jq wget
tf_current_version=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version') tf_current_version=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')