[PATCH] use libunwind only when both header and lib available
Rob Latham
robl at mcs.anl.gov
Thu Jan 14 12:56:14 CST 2016
libunwind has runtime libraries and compile-time heaers. Some systems
might provide libunwind without the corresponding -dev package. Be more
careful about when to choose libunwind.
---
src/mpl/src/bt/mpl_bt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/mpl/src/bt/mpl_bt.c b/src/mpl/src/bt/mpl_bt.c
index 5abd999d..3102a7a3 100644
--- a/src/mpl/src/bt/mpl_bt.c
+++ b/src/mpl/src/bt/mpl_bt.c
@@ -44,7 +44,11 @@ static inline void backtrace_libback(FILE *output)
btstate = backtrace_create_state(NULL, 1, NULL, NULL);
backtrace_print(btstate, 0, output);
}
-#elif defined MPL_HAVE_LIBUNWIND
+/* we need not only the symbols but the header file too (for the cursor and
+ * context), so tighten up when we take the libunwind path. Thanks
+ * Siegmar.Gross at informatik.hs-fulda.de for the bug report about systems with
+ * libunwind libraries but no libunwind development headers */
+#if defined MPL_HAVE_LIBUNWIND && defined(MPL_HAVE_LIBUNWIND_H)
static inline void backtrace_libunwind(FILE *output)
{
unw_cursor_t cursor;
--
2.5.0
--------------090807000004070201090607
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
--------------090807000004070201090607--
More information about the discuss
mailing list