cacao-org / cacao

Compute And Control for Adaptive Optics
GNU General Public License v3.0
24 stars 9 forks source link

Install instruction experience #14

Closed Zarathustrared closed 2 years ago

Zarathustrared commented 2 years ago

Hiccups on Cacao install path:

"Install pre-requisite packages as needed. For example, under Ubuntu :"

sudo apt install git make dpkg-dev libc6-dev cmake pkg-config python3-dev libcfitsio-dev pybind11-dev python3-pybind11 libgsl-dev libfftw3-dev libncurses-dev libbison-dev libfl-dev libreadline-dev pkg-config gcc-10 g++-10

This is not the complete list, from the documentation, also needed to be installed:

sudo apt-get install libcfitsio3 libcfitsio3-dev libreadline6-dev libncurses5-dev libfftw3-dev libgsl0-dev flex bison

The list generates a number of errors:

libcfitsio3 does not exist as that name; libcfitsio3-dev, also does not, it installs as libcfitsio-dev. It is unclear if this is the correct library or if problems ensue.

There are additional missing libraries, "bash dialog", also needs to be installed, as does tmux.

A later step runs SystemConfig, which will error if you do not have netstat installed. It attempts to download netstat, however, the program installer is net-tools, not netstat. Therefore also install net-tools prior to running SystemConfig.

The list of dependent libraries to install and run Cacao so far then, requires the install of:

sudo apt install git make dpkg-dev libc6-dev cmake pkg-config python3-dev libcfitsio-dev pybind11-dev python3-pybind11 libgsl-dev libfftw3-dev libncurses-dev libbison-dev libfl-dev libreadline-dev pkg-config gcc-10 g++-10 libcfitsio-dev libreadline6-dev libncurses5-dev libfftw3-dev libgsl0-dev flex bison bash dialog tmux net-tools xterm

Once installed, install Cacao with:

sudo git clone https://github.com/milk-org/milk.git
cd milk
sudo ./fetch_cacao_dev.sh
sudo MILK_PYTHON="OFF" ./compile.sh
cd _build; sudo make install

For it to work, you will need to set a number of environmental variables, place them in your .bashrc. Some of these are not disclosed, I have edited them to how it installs on my system, xubuntu:

export MILK_ROOT=${HOME}/milk # point to source code directory. Edit as needed.
export MILK_INSTALLDIR=/usr/local/milk-1.03.00
export PATH=${PATH}:${MILK_INSTALLDIR}/bin
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${MILK_INSTALLDIR}/lib/pkgconfig

Additionally, these too need to be added:

echo "/usr/local/lib" > usrlocal.conf
sudo mv usrlocal.conf /etc/ld.so.conf.d/
sudo ldconfig -v

Finally, these also need to be added:

echo "tmpfs /milk/shm tmpfs rw,nosuid,nodev" | sudo tee -a /etc/fstab
sudo mkdir -p /milk/shm
sudo mount /milk/shm
export MILK_SHM_DIR=/milk/shm

Additionally, this symbolic link is required:

sudo ln -s /usr/local/milk-1.03.00 /usr/local/milk

FITSIO install, fill in current version from link:

sudo wget http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.1.0.tar.gz
sudo tar –xf cfitsio-4.1.0.tar.gz
cd cfitsio-4.1.0
sudo ./configure --prefix=/usr
sudo make 
sudo make install

Everything should be installed now, run .bashrc or reboot.

Finally, if you attempt to run ./syncscripts, in /home/youruser/milk/plugins/cacao-src/AOloopControl/scripts/ it will error, you need to open it with an editor and change:

/usr/local/cacao/bin/cacao

to

/usr/local/milk-1.03.00/bin/cacao

This is it for now, I will add additional bugs as I find them trying to get it to run my setup.

Very useful setup information available here: https://github.com/cacao-org/cacao/tree/dev/AOloopControl/doc