[Paraview-developers] failed to compile H5detect.c
Favre Jean
jfavre at cscs.ch
Tue Mar 21 03:46:48 EDT 2017
I have run into a hurdle compiling 5.3 on a Linux box with gcc version 5.3.0 (cmake 3.4.1)
the error is:
/dev/shm/jfavre/ParaView/ParaView-v5.3.0/VTK/ThirdParty/hdf5/vtkhdf5/src/H5detect.c:87:19: error: unknown type name ‘sigjmp_buf’
#define H5JMP_BUF sigjmp_buf
^
/dev/shm/jfavre/ParaView/ParaView-v5.3.0/VTK/ThirdParty/hdf5/vtkhdf5/src/H5detect.c:163:8: note: in expansion of macro ‘H5JMP_BUF’
static H5JMP_BUF jbuf_g;
the error is caused by using the compilation flag -std=c99. Replacing it with -std=gnu99, then the compilation succeeds. Consequently, I patched the file VTK/ThirdParty/hdf5/vtkhdf5/CMakeLists.txt
- set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common")
+ set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=gnu99 -fomit-frame-pointer -finline-functions -fno-common")
I am not sure if this is applicable to other systems. This posting is for documentation. It may be useful to someone else.
-----------------
Jean/CSCS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170321/5719de5c/attachment.html>
More information about the Paraview-developers
mailing list