Skip to content

Instantly share code, notes, and snippets.

@dmcbane
Created May 4, 2018 10:03
Show Gist options
  • Save dmcbane/19253f54c5b9a83d676bf031419a55df to your computer and use it in GitHub Desktop.
Save dmcbane/19253f54c5b9a83d676bf031419a55df to your computer and use it in GitHub Desktop.
Build and Install Guile 2.2 under MSYS
#! /usr/bin/env bash
# install dependencies
pacman -S --noconfirm gcc binutils flex bison autoconf automake-wrapper libtool \
pkg-config gettext texinfo gdb git libunistring-devel libgc-devel \
gmp-devel libiconv-devel libffi-devel libreadline-devel intltool \
gettext-devel
# optional
pacman -S --noconfirm libsqlite-devel # libmysqlclient-devel libsqlite3-devel libpq-devel
# clone the source repo
if [ ! -d ~/src ]; then
mkdir -p ~/src
fi
cd ~/src
git clone git://git.sv.gnu.org/guile.git
# create a branch for the release tag
cd guile
git branch branch2.2.3 v2.2.3
git checkout branch2.2.3
# configure and build
./autogen.sh --no-configure && ./configure --prefix=/usr --disable-static \
--docdir=/usr/share/doc/guile-2.2.3 && make && make html && makeinfo \
--plaintext -o doc/r5rs/r5rs.txt doc/r5rs/r5rs.texi && makeinfo --plaintext \
-o doc/ref/guile.txt doc/ref/guile.texi && ./check-guile
# install
make install && make install-html && mv /usr/lib/libguile-*-gdb.scm \
/usr/share/gdb/auto-load/usr/lib && \
mv /usr/share/doc/guile-2.2.3/{guile.html,ref} && \
mv /usr/share/doc/guile-2.2.3/r5rs{.html,} && \
find examples -name "Makefile*" -delete && \
cp -vR examples /usr/share/doc/guile-2.2.3
for DIRNAME in r5rs ref; do
install -v -m644 doc/${DIRNAME}/*.txt \
/usr/share/doc/guile-2.2.3/${DIRNAME}
done &&
unset DIRNAME
# cleanup
make clean
# optional guile-dbi build and install
cd ~/src
git clone https://github.com/eestrada/guile-dbi.git
cd guile-dbi/guile-dbi && ./autogen.sh --no-configure && mkdir build && cd \
build && ../configure --prefix=/usr && make && make install && make clean
# cd ~/src/guile-dbi/guile-dbd-mysql && ./autogen.sh --no-configure && mkdir \
# build && cd build && ../configure --prefix=/usr && make && make install \
# && make clean
# if [ ! -f /usr/include/postgresql/libpq-fe.h ]; then
# ln -s /usr/include/libpq-fe.h /usr/include/postgresql/libpq-fe.h
# fi
# cd ~/src/guile-dbi/guile-dbd-postgresql && ./autogen.sh --no-configure && \
# mkdir build && cd build && ../configure --prefix=/usr && make && make \
# install && make clean
cd ~/src/guile-dbi/guile-dbd-sqlite3 && ./autogen.sh --no-configure && mkdir \
build && cd build && ../configure --prefix=/usr && make && make install \
&& make clean
@dmcbane
Copy link
Author

dmcbane commented May 4, 2018

Run the MSYS bash shell as Admin and then execute this script. It will install dependencies, build guile, and install it under /usr. The other Guile 2.2 build gists that I have created recently install guile-dbi with SQLite, MySQL and PostgreSQL support. This one only support SQLite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment