Hi all:

There appears to be a bug in Apple's gcc shipping with OS X 10.6 related to run 
time type identification, templated derived classes, and shared libraries. 
While this is not a bug in libmesh, it affects libmesh.  Using libmesh version 
3802, examples 9 and 14 (among others) compile but throw a run time exception 
because a dynamic cast fails.

I was able to work around this problem by changing the line

libmesh_CXXSHAREDFLAG = -dynamiclib 
-Wl,-undefined,dynamic_lookup,-flat_namespace

in Make.common to

libmesh_CXXSHAREDFLAG = -ldylib1.o -dynamiclib 
-Wl,-undefined,dynamic_lookup,-flat_namespace,-no_compact_linkedit

The dynamic casts are now fine.  There are instances of a few other projects 
out there running into this bug:

http://openradar.appspot.com/7512422
http://raichoo.blogspot.com/2009/09/bug-snow-leopards-dynamiccast-und.html
http://www.mail-archive.com/[email protected]/msg00974.html

It might be worthwhile to update libmesh's configure with a workaround.

David Maxwell


------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to