[Darshan-commits] [Git][darshan/darshan][master] 2 commits: fix __wrap_H5get_libversion undefined reference

Shane Snyder xgitlab at cels.anl.gov
Mon Jan 8 14:12:55 CST 2018


Shane Snyder pushed to branch master at darshan / darshan


Commits:
604df8cc by Phil Carns at 2018-01-05T12:14:13-08:00
fix __wrap_H5get_libversion undefined reference

- reported by Jialin Liu
- triggered by some HDF5 programs
- solved by eliminating incomplete wrapper mechanisms for H5get_libversion()
  and invoking it directly (Darshan needs to use, not wrap, this
  function)

- - - - -
e0051df0 by Shane Snyder at 2018-01-08T14:12:53-06:00
Merge branch 'dev-H5get_libversion_symbol' into 'master'

fix __wrap_H5get_libversion undefined reference

See merge request darshan/darshan!18
- - - - -


3 changed files:

- ChangeLog
- darshan-runtime/lib/darshan-hdf5.c
- darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts


Changes:

=====================================
ChangeLog
=====================================
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
 Darshan Release Change Log
 --------------------------
 
-Darshan-3.1.5-pre1
+Darshan-3.1.5
 =============
 * modify Darshan MPI instrumentation method to intercept both MPI and
   PMPI symbols to workaround MPI implementations that are calling
@@ -19,6 +19,8 @@ Darshan-3.1.5-pre1
 * add support for DARSHAN_EXCLUDE_DIRS environment variable to
   explicitly disable instrumentation for files in given
   directories. Contributed by Cristian Simarro.
+* correct "undefined reference to `__wrap_H5get_libversion'" linker failure
+  when compiling some HDF5 programs, reported by Jialin Liu
 
 Darshan-3.1.4
 =============


=====================================
darshan-runtime/lib/darshan-hdf5.c
=====================================
--- a/darshan-runtime/lib/darshan-hdf5.c
+++ b/darshan-runtime/lib/darshan-hdf5.c
@@ -36,7 +36,11 @@ typedef int herr_t;     //hf5-1.10.0p1: H5public.h:126
 DARSHAN_FORWARD_DECL(H5Fcreate, hid_t, (const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist));
 DARSHAN_FORWARD_DECL(H5Fopen, hid_t, (const char *filename, unsigned flags, hid_t access_plist));
 DARSHAN_FORWARD_DECL(H5Fclose, herr_t, (hid_t file_id));
-DARSHAN_FORWARD_DECL(H5get_libversion, herr_t, (unsigned *majnum, unsigned *minnum, unsigned *relnum));
+
+/* prototype for HDF symbols that we will call directly from within other
+ * wrappers if HDF is linked in
+ */
+extern herr_t H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum);
 
 /* structure that can track i/o stats for a given HDF5 file record at runtime */
 struct hdf5_file_record_ref
@@ -122,8 +126,7 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
     double tm1;
     unsigned majnum, minnum, relnum;
 
-    MAP_OR_FAIL(H5get_libversion);
-    __real_H5get_libversion(&majnum, &minnum, &relnum);
+    H5get_libversion(&majnum, &minnum, &relnum);
 #ifdef __DARSHAN_ENABLE_HDF5110
     if(majnum < 1 || (majnum == 1 && minnum < 10))
 #else
@@ -171,8 +174,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
     double tm1;
     unsigned majnum, minnum, relnum;
 
-    MAP_OR_FAIL(H5get_libversion);
-    __real_H5get_libversion(&majnum, &minnum, &relnum);
+    H5get_libversion(&majnum, &minnum, &relnum);
 #ifdef __DARSHAN_ENABLE_HDF5110
     if(majnum < 1 || (majnum == 1 && minnum < 10))
 #else


=====================================
darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts
=====================================
--- a/darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts
+++ b/darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts
@@ -2,4 +2,3 @@
 --wrap=H5Fcreate
 --wrap=H5Fopen
 --wrap=H5Fclose
---wrap=H5get_libversion



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/61a1fa010be06a12e258d81715e8f1406e5ffec8...e0051df0d2f73dc3b0454569c5eed517aa723d14

---
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/61a1fa010be06a12e258d81715e8f1406e5ffec8...e0051df0d2f73dc3b0454569c5eed517aa723d14
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20180108/b6c17806/attachment-0001.html>


More information about the Darshan-commits mailing list