[vtk-developers] Compilation error hdf5

Berk Geveci berk.geveci at kitware.com
Wed Feb 10 11:22:38 EST 2016


Hi Lonni,

Do you happen to have an HDF5 distribution on your default include path? I
ran into this issue when I installed HDF5 through Homebrew on my Mac. I
switched to using system HDF5 and NetCDF to avoid these errors. The problem
is that VTK include certain include paths where external libraries reside,
such as /usr/local/include, before it includes the internal HDF5 include
path. So the HDF5 files in VTK end up being compiled with include files
from the system.

Best,
-berk

On Wed, Feb 10, 2016 at 11:19 AM, Lonni Besançon <lonni.besancon at gmail.com>
wrote:

> Hello everyone,
>
> I used to be able to build my android examples just fine. But since I
> rebuilt vtk I seem to have a problem.
> I get the following errors:
>
> /In file included from
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:46:0:
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c: In
> function 'print_header':
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:191:30:
> error: 'struct passwd' has no member named 'pw_gecos'
>       if((comma = HDstrchr(pwd->pw_gecos, ','))) {
>                               ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5private.h:1224:37: note: in
> definition of macro 'HDstrchr'
>      #define HDstrchr(S,C)    strchr(S,C)
>                                      ^
> In file included from
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:46:0:
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:192:56:
> error: 'struct passwd' has no member named 'pw_gecos'
>    n = MIN(sizeof(real_name) - 1, (unsigned)(comma - pwd->pw_gecos));
>                                                         ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5private.h:331:28: note: in
> definition of macro 'MIN'
>  #define MIN(a,b)    (((a)<(b)) ? (a) : (b))
>                             ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:192:56:
> error: 'struct passwd' has no member named 'pw_gecos'
>    n = MIN(sizeof(real_name) - 1, (unsigned)(comma - pwd->pw_gecos));
>                                                         ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5private.h:331:41: note: in
> definition of macro 'MIN'
>  #define MIN(a,b)    (((a)<(b)) ? (a) : (b))
>                                          ^
> In file included from
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:46:0:
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:193:27:
> error: 'struct passwd' has no member named 'pw_gecos'
>    HDstrncpy(real_name, pwd->pw_gecos, n);
>                            ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5private.h:1257:41: note: in
> definition of macro 'HDstrncpy'
>      #define HDstrncpy(X,Y,Z)  strncpy(X,Y,Z)
>                                          ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5make_libsettings.c:197:27:
> error: 'struct passwd' has no member named 'pw_gecos'
>    HDstrncpy(real_name, pwd->pw_gecos, sizeof(real_name));
>                            ^
> /Users/user/VTK/ThirdParty/hdf5/vtkhdf5/src/H5private.h:1257:41: note: in
> definition of macro 'HDstrncpy'
>      #define HDstrncpy(X,Y,Z)  strncpy(X,Y,Z)
>                                          ^
> make[3]: ***
>
> [ThirdParty/hdf5/vtkhdf5/src/CMakeFiles/H5make_libsettings.dir/H5make_libsettings.c.o]
> Error 1
> make[2]: ***
> [ThirdParty/hdf5/vtkhdf5/src/CMakeFiles/H5make_libsettings.dir/all] Error 2
> make[1]: ***
> [Examples/Android/VolumeRender/CMakeFiles/VolumeRender-apk-debug.dir/rule]
> Error 2
> make: ***
> [Examples/Android/VolumeRender/CMakeFiles/VolumeRender-apk-debug.dir/rule]
> Error 2
> /
>
> I guess I'm not the only one to whom it's happening since I saw this post
> as
> well:  http://www.vtk.org/pipermail/vtk-developers/2013-August/014195.html
> <http://www.vtk.org/pipermail/vtk-developers/2013-August/014195.html>
> However, no solution is provided in this post.
>
> Would you happen to know what's responsible for that error and how I can
> fix
> it (or at the very least bypass it)?
>
> Thanks in advance
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Compilation-error-hdf5-tp5736481.html
> Sent from the VTK - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160210/bf0158e1/attachment.html>


More information about the vtk-developers mailing list