schwehr / hdf5-old

Hierarchical Data Format (HDF) 5
Other
0 stars 0 forks source link

failed build - error: redefinition of 'H5P_CLS_ROOT_g' with a different type: 'H5P_genclass_t *' #12

Closed schwehr closed 10 years ago

schwehr commented 10 years ago

I think this is likely a #define issue triggered by the configure options I am using.

CPPFLAGS="-Wall -Wextra" ../hdf5-1.9.182/configure --enable-shared --enable-cxx --with-zlib=/usr \
  --without-mpe --with-szlib=/sw --without-pthread --disable-parallel \
  --enable-build-all  --enable-maintainer-mode  --enable-codestack \
  --enable-debug=all --disable-silent-rules
make

Fails with many errors like this:

make[2]: Leaving directory `/Users/schwehr/Desktop/hdf5/build'
/bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I../../hdf5-1.9.182/test -I../src  -I/sw/include    -UNDEBUG -DH5AC_DEBUG -DH5B_DEBUG -DH5B2_DEBUG -DH5D_DEBUG -DH5E_DEBUG -DH5F_DEBUG -DH5G_DEBUG -DH5HG_DEBUG -DH5HL_DEBUG -DH5I_DEBUG -DH5MF_DEBUG -DH5MM_DEBUG -DH5O_DEBUG -DH5P_DEBUG -DH5S_DEBUG -DH5T_DEBUG -DH5V_DEBUG -DH5Z_DEBUG -DH5_DEBUG_API -I../../hdf5-1.9.182/src -I../src -Wall -Wextra   -MT h5test.lo -MD -MP -MF .deps/h5test.Tpo -c -o h5test.lo ../../hdf5-1.9.182/test/h5test.c
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I../../hdf5-1.9.182/test -I../src -I/sw/include -UNDEBUG -DH5AC_DEBUG -DH5B_DEBUG -DH5B2_DEBUG -DH5D_DEBUG -DH5E_DEBUG -DH5F_DEBUG -DH5G_DEBUG -DH5HG_DEBUG -DH5HL_DEBUG -DH5I_DEBUG -DH5MF_DEBUG -DH5MM_DEBUG -DH5O_DEBUG -DH5P_DEBUG -DH5S_DEBUG -DH5T_DEBUG -DH5V_DEBUG -DH5Z_DEBUG -DH5_DEBUG_API -I../../hdf5-1.9.182/src -I../src -Wall -Wextra -MT h5test.lo -MD -MP -MF .deps/h5test.Tpo -c ../../hdf5-1.9.182/test/h5test.c  -fno-common -DPIC -o .libs/h5test.o
In file included from ../../hdf5-1.9.182/test/h5test.c:33:
In file included from ../../hdf5-1.9.182/src/H5Gpkg.h:37:
In file included from ../../hdf5-1.9.182/src/H5HFprivate.h:35:
In file included from ../../hdf5-1.9.182/src/H5Oprivate.h:38:
In file included from ../../hdf5-1.9.182/src/H5ACprivate.h:37:
../../hdf5-1.9.182/src/H5Pprivate.h:84:27: error: redefinition of 'H5P_CLS_ROOT_g' with a different type: 'H5P_genclass_t *'
      (aka 'struct H5P_genclass_t *') vs 'hid_t' (aka 'int')
H5_DLLVAR H5P_genclass_t *H5P_CLS_ROOT_g;
                          ^
/sw/include/H5Ppublic.h:174:17: note: previous definition is here
H5_DLLVAR hid_t H5P_CLS_ROOT_g;
                ^
schwehr commented 10 years ago

This is a clash with the hdf5 installed via fink. Note the "/sw/include/H5Ppublic.h"