Ligggts doesn't build witth vtk-8.2.0

Submitted by yurivict on Fri, 02/01/2019 - 19:32

See errors below.

--- CMakeFiles/liggghts_obj.dir/dump_mesh_vtk.cpp.o ---
In file included from /wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.cpp:46:
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:59:41: error: expected class name
class DumpMeshVTK : public Dump, public DumpVTK {
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:78:5: error: unknown type name 'DumpMesh'
DumpMesh *dumpMesh_;
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:81:5: error: no template named 'vtkSmartPointer'
vtkSmartPointer mbSet_;
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:81:21: error: use of undeclared identifier 'vtkMultiBlockDataSet'
1042,1 96%
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:78:5: error: unknown type name 'DumpMesh'
DumpMesh *dumpMesh_;
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:81:5: error: no template named 'vtkSmartPointer'
vtkSmartPointer mbSet_;
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.h:81:21: error: use of undeclared identifier 'vtkMultiBlockDataSet'
vtkSmartPointer mbSet_;
^
/wrkdirs/usr/ports/science/liggghts/work/LIGGGHTS-PUBLIC-3.8.0/src/dump_mesh_vtk.cpp:58:10: fatal error: 'vtkDataSet.h' file not found
#include
^~~~~~~~~~~~~~
5 errors generated.

richti83's picture

richti83 | Wed, 02/06/2019 - 08:41

Mhn seems as you try a CMake build, can you tell us which one you used ? (The one delivered with src folder or the alternative CMake build environment
The error shows that (one or all) VTK include header files could not be found

fatal error: 'vtkDataSet.h' file not found

Check the build dir of your vtk installation (did you compile it yourself or do you use the "system wide" installation (eg. apt-get / dnf / yum install).
Than check the VTK_DIR parameter in you cmake configure step. (should point to ~/VTK-8.2.0/build/)

arnom's picture

arnom | Thu, 02/21/2019 - 10:44

I have not yet tried installing LIGGGHTS with VTK 8.2 but I would be surprised if there is an issue. Can you please try and compile with make auto and see where this gets you?
Kind regards,
Arno

DCS team member & LIGGGHTS(R) core developer

rohinibc | Thu, 06/13/2019 - 01:10

I wasn't able to get the VTK installation to work on the auto make file even after pointing to the correct directories. I used the make auto file with the default settings; and change the makeuser file to reflect the directory changes and still got the following error. Should we also set a path for the VTK_APPENDIX?

Makefile:940: *** 'Could not determine suitable appendix of VTK library with VTK_INC="-I/usr/local/opt/vtk/include/vtk-8.2", VTK_LIB="-L/usr/local/opt/vtk/lib" and VTK_APPENDIX="-8.2"'. Stop.
make: *** [auto] Error 2

When I excluded the VTK option, i.e. made USE_VTK = OFF; I was able to run the make file but got a different 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

Any suggestions on how to resolve this issue?

Thanks,