This gist describes steps to install the latest version of OCaml and Owl on FreeBSD. Tested with FreeBSD 12.0-RELEASE-p9 on Hyper-V/Windows 10 Pro 1903.
Install opam
as described How to install opan. EDIT the first line may not work. Install opam
with pkg.
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
opam init
eval $(opam env)
opam switch create 4.08.1
eval $(opam env)
- Install matrix libraries.
pkgconf
(replaced frompkg-config
in pkg) is needed to provide header and library paths during the build of Owl.- Install
gcc9
.
sudo pkg install cblas lapacke openblas pkgconf gcc9
- Set
CFLAGS
to avoid a failure during configuration. - Create symbolic links of
gcc
andg++
. - Copy
openblas.pc
wherepkg-config
(a symbolic link topkgconf
) can find (PKG_CONFIG_PATH
). - Finally install Owl.
export CFLAGS="-I/usr/local/include -L/usr/local/lib -O2"
mkdir ~/bin
cd ~/bin
ln -s /usr/local/bin/gcc9 gcc
ln -s /usr/local/bin/g++9 g++
cp openblas.pc /usr/local/libdata/pkgconfig/
opam install owl