Cannot install because of VTK

Submitted by venkatkrisshna on Thu, 01/06/2022 - 20:09

Please help, the installation guide asks me to contact a "local expert" but I've looked on my classifieds and there tragically is no LIGGGHTS expert in town. I'm trying to install and compile (make auto) LIGGGHTS on my MacOS 12.1 and receive this error -
"""
sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Creating list of contact models completed.
Makefile:945: *** 'Could not determine suitable appendix of VTK library with VTK_INC="-I/usr/local/include/vtk-8.1", VTK_LIB="" and VTK_APPENDIX="-8.1"'. Stop.
make: *** [auto] Error 2

"""
I have tried installing vtk several times to no avail. Every single thing I do results in an error. Please help me install this thing.

venkatkrisshna | Fri, 01/07/2022 - 23:05

Thanks Matthew, I added the VTK_LIB_USR and still get a similar error
```
sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Creating list of contact models completed.
Makefile:945: *** 'Could not determine suitable appendix of VTK library with VTK_INC="-I/usr/local/include/vtk-8.1", VTK_LIB="-L/usr/local/lib/" and VTK_APPENDIX="-8.1"'. Stop.
make: *** [auto] Error 2
```

mschramm | Fri, 01/14/2022 - 05:22

Hello,
Unfortunately, I do not know where to go from here... I am not a Mac expert...
I would recommend trying Spack
https://github.com/spack/spack

This will install and link everything for you automagically...

Spack is a python program built for hpc cluster installations that compiles and links everything for you.
Once spack is installed and loaded (sourced...) you would install liggghts with vtk
spack install liggghts^openmpi@3.1.6

then to get the liggghts executable, you would run the command
spack load liggghts

venkatkrisshna | Fri, 01/14/2022 - 19:31

Thank you all, I gave up on installing in my Mac. I switched to an ubuntu machine and had similar VTK issues on that as well. But I installed using cmake and did sudo apt install LIGGGHTS in the build folder and I am now able to execute LIGGGHTS from src/build. Example works. Thank you.