Skip to content

Instantly share code, notes, and snippets.

@nimajalali
Created August 12, 2019 14:31
Show Gist options
  • Save nimajalali/ec74950bf97dcb8e6a7a9e48cad46ffb to your computer and use it in GitHub Desktop.
Save nimajalali/ec74950bf97dcb8e6a7a9e48cad46ffb to your computer and use it in GitHub Desktop.
Riak 2.2.5 on FreeBSD 12
# /bin/sh
sudo ASSUME_ALWAYS_YES=YES pkg update
sudo ASSUME_ALWAYS_YES=YES pkg install gcc autoconf gmake flex rsync curl git openssl python sudo devel/readline autoconf fop bash
# Install/Configure kerl
curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl
chmod a+x kerl
echo 'KERL_CONFIGURE_OPTIONS="--disable-hipe --enable-smp-support --enable-threads' >> ~/.kerlrc
echo ' --enable-kernel-poll --without-odbc --enable-64bit"' >> ~/.kerlrc
# Build/Install erlang
./kerl build R16B03-1 R16B03-1
./kerl install R16B03-1 ~/erlang/R16B03-1
. ~/erlang/R16B03-1/activate
# Build Riak 2.2.5
git clone https://github.com/basho/riak.git riak-2.2.5
cd riak-2.2.5
git checkout riak-2.2.5
gmake locked-deps
# FreeBSD 12 made a backward incompatible change to SEMUN for better POSIX compatibility. Reset by:
# CFLAGS='-D_WANT_SEMUN'
# FreeBSD 12 lld does not include a compiled-in search path. Included by:
# LDFLAGS='-L/usr/local/lib -L/usr/lib -L/lib'
# Can't find local and installed dependencies. Fixed by adding this to CXXFLAGS:
# CXXFLAGS='-I. -I./include -I/usr/local/include -I/usr/include'
gmake CFLAGS='-D_WANT_SEMUN' CXXFLAGS='-I. -I./include -I/usr/local/include -I/usr/include' LDFLAGS='-L/usr/local/lib -L/usr/lib -L/lib' rel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment