---
# System prepended metadata

title: Untitled

---

## Hiflow3 boost 1.74+ issue workaround

Essentially 1.74 would be used underneath, but instead of linking it to the system libraries, we use spack. This is done to ensure that the boost linked to hiflow is not updated when critical system updates are being installed, wherein it is likey that the boost version will get a bump soon (Think about python virtual environments).

This can also be done by mannual compilation, but spack is more consistent, modular and would make it easier to deploy on HPC nodes.

Step 1: Install spack

```
git clone -c feature.manyFiles=true https://github.com/spack/spack.git ~/spack
cd ~/spack
git checkout releases/v0.19
. share/spack/setup-env.sh (can also copy it to .bashrc / .zshrc)
```
More instructions [here](https://spack-tutorial.readthedocs.io/en/latest/tutorial_basics.html)

Step 2: `spack install boost@1.74`
This step could take around 5 minutes as spack will also install gcc compiler.


Step 3: Find out the boost install location:
```bash
/home/purusharth/.spack/opt/spack/linux-fedora37-zen3/gcc-12.2.1/boost-1.74.0-<ADD_HASH>/include/
```
Full name of the directory will contain a hash, for instance, `boost-1.80.0-m5bk2eilools2ar5wgyc5xweiow6art2`. That hash changes from system to system so it would be esseitnail to copy the correct hash.


After this step, it's just a matter of giving the correct boost location to hiflow's ccmake.

If there exists a system-wide boost installation then it needs to be replaced with spack's boost inclusion path copied in Step 3

If there's no system-wide installation, then the follwing error will be displayed. 

```
Boost_INCLUDE_DIR            *Boost_INCLUDE_DIR-NOTFOUND
```
Even then, just the boost path has to be resolved.
```
Boost_INCLUDE_DIR            */home/purusharth/.spack/opt/spack/linux-fedora37-zen3/gcc-12.2.1/boost-1.74.0-yxyzr53yjuit2znq3zwthvgn43qhjqbl/include
```

