On Fri, 08 Jan 2010 10:21:22 Favre Jean wrote:
> I have tried compiling pv3.6.2 with my system's hdf5 and have run into the
>  following issue:
> 
> regardless of what api-version I use to configure & compile hdf5 (v16 or
>  v18), I cannot compile pv because of the following error:
> 
> /apps-vis/ParaView3-6-2/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:174: error:
>  braces around scalar initializer for type ‘herr_t (*)(H5FD_t*, unsigned
>  char*, unsigned int, hbool_t)’ Badly placed (.
> /apps-vis/ParaView3-6-2/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:174: error:
>  invalid conversion from ‘haddr_t (*)(H5FD_t*)’ to ‘herr_t (*)(H5FD_t*,
>  H5FD_mem_t, hid_t, haddr_t, hsize_t)’ Badly placed (.
> 
> etc.
> 
> here is my last config for hdf5:
> 
> ./configure --enable-parallel --enable-linux-lfs --enable-shared
>  --with-default-api-version=v18
> 
> The good news:
> 
> I was able to make the compilation finish after copying XdmfH5Driver.cxx
>  from the CVS version of ParaView. And so far in execution trials, nothing
>  has broken.
> 
> Has anyone else seen this? I had initially configured hdf5 with the default
>  (i.e without specifying the last option  --with-default-api-version=v??).
>  I then tried with v16, and v18, and in both cases, I could not compile,
>  until I overwrote the source with the cvs copy.
> 
In Gentoo we have a patch for XdmfH5Driver.cxx - It was introduced for 
paraview 3.6.1 but it may still be current. 
I am attaching for reference. One thing to note conditional compilation is
introduced for HDF5 v1.6 and 1.8. From the look of the patch the code
that is left alone is geared to HDF5 v1.8 but paraview ship with version 1.6
so paraview version may have been patched to include some v1.8 bits.
Most interesting are these 2 bits that are not conditional:
 @@ -159,6 +165,7 @@
     H5FD_dsm_close,             /*close         */
     H5FD_dsm_cmp,               /*cmp           */
     NULL,                       /*query         */
+    NULL,                       /*type map      */
     NULL,                       /*alloc         */
     NULL,                       /*free          */
     H5FD_dsm_get_eoa,           /*get_eoa       */
@@ -168,6 +175,7 @@
     H5FD_dsm_read,              /*read          */
     H5FD_dsm_write,             /*write         */
     NULL,                       /*flush         */
+    NULL,                       /*truncate      */
     NULL,                       /*lock          */
     NULL,                       /*unlock        */
     H5FD_FLMAP_SINGLE           /*fl_map        */

this is in the definition of H5FD_class_t H5FD_dsm_g, that would fit with your 
error message ie line 174 the definition supplied is too short and misses some 
fields.
diff -Naur ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx ParaView3.new/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx
--- ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx	2009-07-20 15:39:10.000000000 -0400
+++ ParaView3.new/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx	2009-07-22 16:05:22.000000000 -0400
@@ -132,9 +132,15 @@
 static herr_t H5FD_dsm_flush(H5FD_t *_file);
 #endif
 static int H5FD_dsm_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+#ifdef H5_USE_16_API
+static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t);
+static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t, haddr_t addr);
+static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file);
+#else
 static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file);
 static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr);
 static haddr_t H5FD_dsm_get_eof(H5FD_t *_file);
+#endif
 static herr_t H5FD_dsm_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
            DSM_HSIZE_T size, void *buf);
 static herr_t H5FD_dsm_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
@@ -159,6 +165,7 @@
     H5FD_dsm_close,             /*close         */
     H5FD_dsm_cmp,               /*cmp           */
     NULL,                       /*query         */
+    NULL,                       /*type map      */
     NULL,                       /*alloc         */
     NULL,                       /*free          */
     H5FD_dsm_get_eoa,           /*get_eoa       */
@@ -168,6 +175,7 @@
     H5FD_dsm_read,              /*read          */
     H5FD_dsm_write,             /*write         */
     NULL,                       /*flush         */
+    NULL,                       /*truncate      */
     NULL,                       /*lock          */
     NULL,                       /*unlock        */
     H5FD_FLMAP_SINGLE           /*fl_map        */
@@ -594,7 +602,11 @@
  *-------------------------------------------------------------------------
  */
 static haddr_t
+#ifdef H5_USE_16_API
+H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t)
+#else
 H5FD_dsm_get_eoa(H5FD_t *_file)
+#endif
 {
     H5FD_dsm_t  *file = (H5FD_dsm_t*)_file;
 
@@ -622,7 +634,11 @@
  *-------------------------------------------------------------------------
  */
 static herr_t
+#ifdef H5_USE_16_API
+H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t, haddr_t addr)
+#else
 H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr)
+#endif
 {
     H5FD_dsm_t  *file = (H5FD_dsm_t*)_file;
 
@@ -663,7 +679,11 @@
  *-------------------------------------------------------------------------
  */
 static haddr_t
+#ifdef H5_USE_16_API
+H5FD_dsm_get_eof(const H5FD_t *_file)
+#else
 H5FD_dsm_get_eof(H5FD_t *_file)
+#endif
 {
     H5FD_dsm_t  *file = (H5FD_dsm_t*)_file;
 
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to