VTK and MacOS Installation

Submitted by lkuna24 on Fri, 05/24/2019 - 22:39

I'm trying to compile LIGGGHTS on a Mac Mini running macOS High Sierra 10.13.6 and have come across this issue:


Lukaszs-Mac-mini:src lukaszkuna$ make auto
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Creating list of contact models completed.
Makefile:1032: *** 'Could not compile VTK example with VTK_INC="-I/usr/local/Cellar/vtk/8.2.0/include/vtk-8.2", VTK_LIB="-L/usr/local/Cellar/vtk/8.2.0/lib" and VTK_ADDLIBS=" -lvtkCommonCore-8.2 -lvtkIOCore-8.2 -lvtkIOXML-8.2 -lvtkIOLegacy-8.2 -lvtkIOImage-8.2 -lvtkCommonDataModel-8.2 -lvtkIOParallelXML-8.2 -lvtkParallelCore-8.2 -lvtkParallelMPI-8.2 -lvtkCommonExecutionModel-8.2 -lvtkFiltersCore-8.2 -lvtksys-8.2 -lvtkCommonMisc-8.2 -lvtkCommonTransforms-8.2 -lvtkCommonMath-8.2 -lvtkIOXMLParser-8.2 -lvtkCommonSystem-8.2 -lvtkDICOMParser-8.2 -lvtkmetaio-8.2"'. Stop.
make: *** [auto] Error 2

Does anyone have any suggestions? vtk was installed via HomeBrew hence the usr/local/Cellar/ directory but I didn't think that would affect it. Is this because it is a new version of vtk? As opposed to the 6.x.x in the install instructions?

Thanks for your time,
Lukasz

lkuna24 | Fri, 05/24/2019 - 22:47

I also tried using make serial, and didnt get the vtk error but instead the code started to compile until it got to:

../finish.cpp:722:40: error: ordered comparison between pointer and zero ('int *' and 'int')
if (neighbor->lists[m]->numneigh > 0) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
1 error generated.
make[1]: *** [finish.o] Error 1
make: *** [serial] Error 2

which just looks like an error in the code itself?

rohinibc | Thu, 06/13/2019 - 00:25

I got the same error as reported by user Ikuna24. I wasn't able to get the VTK installation to work on auto make file even after pointing to the correct directories. When I excluded the VTK option, i.e. made USE_VTK = OFF; I obtained the exact same error in the finish.cpp file.

../finish.cpp:722:40: error: ordered comparison between pointer and zero ('int *' and 'int')
if (neighbor->lists[m]->numneigh > 0) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
1 error generated.
make[1]: *** [finish.o] Error 1
make: *** [auto] Error 2

Thanks,

rohinibc | Fri, 06/14/2019 - 00:44

Ikuna24, I followed the instructions posted by Gowtham as below and it works with VTK;

for the finish.cpp isuse just remove the > 0. Hope this helps.

gowthaman | Fri, 01/26/2018 - 22:24

POSSIBLE SOLUTION FOUND
Hi guys,
I had similar installation error likes Gonzalo and Martin and I guess it is due to untypical installation of vtk. But, the following link helped me install VTK 8.1.0 without any issues:

https://www.ctcms.nist.gov/oof/oof3d/vtk5elcap.html

I just made following changes in the installation:

* Downloaded vtk 8.1.0 instead of 5.10.1

* Skipped steps 1 and 3 ( I was not sure of the consequences of step 3)

* Changed only CMAKE_BUILD_TYPE to release and Toggled MPI option to ON

There were no issues after following the procedure. I haven't run any of my own models but the examples were simulated successfully. Thanks, this thread helped me to understand the problem. Hope this procedure won't create any further errors and might help someone.