On Wed, 24 May 2017, Boyce Griffith wrote:

> (Elijah, it might be a good idea to have an optional flag that lets
> users say which libMesh method to use, and to default to dbg for
> debugging builds and to opt for non-debugging builds.)

Be careful, if you're not just scarfing our CXXFLAGS and CPPFLAGS:
libmesh dbg builds are *not* typically ABI-compatible with opt builds!

1. If you build against libstdc++ and you don't configure with
--disable-glibcxx-debugging, then half the standard library container
classes get different ABIs in dbg mode.  In theory I think this should
result in a link-time failure, but in practice I've never seen a mixed
build produce a link error and I have seen mixed builds produce plenty
of segfaults.

2. If you don't configure with --disable-reference-counting, then the
struct layout of ReferenceCounter and subclasses (a.k.a. practically
every heavyweight libMesh object) depends on whether or not the
preprocessor macro DEBUG is defined.

3. The error in (2) is just the only one I can name off the top of my
head, because it was the first one that caused a mixed build to
segfault on clang.  Since we don't strive for ABI consistency between
build options, I wouldn't be surprised to find other ABI changes that
the failing application just never reached.

4. Matt, if any of the above makes it into a future version of you
guys' "Firetran" parody, try to strip off embarrassing identifying
details?  Thanks.
---
Roy

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to