Hi Wolfgang

I think Luca's previous post on this problem captures the main issue: an incorrect mixture of gcc libraries between MacOSX10.5 and 10.6 and the somewhat buggy support for 64bit architectures in 10.5.

Using the gcc 4.5 libraries from http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz?download that Luca recommended all works perfectly and there is no need to convert the dynamic_cast to a static_cast.

The configure script identifies the version of mac running 10.6 as
checking host system type... i386-apple-darwin10.0.0
 Rather than using a
 #ifdef SOME_MAGIC_THAT_IDENTIFIES_MAC_OS_X
   ...
 #endif
in the code, I would suggest that the install instructions are modified so that MacOSX10.6 users are encouraged to use the above version of gcc and that the install script checks the version of gcc against the OS version. It seems the correct solution here is to use a "decent" gcc compilation for mac rather than changing deal itself.

Andrew


On 25 Nov 2009, at 2:09 AM, Wolfgang Bangerth wrote:


All you Mac OS X people: where do we now stand with this issue? From what I understand from your posts it appears to me that this could be an issue with
the installation, but I'm not sure.


The Subscriptor works fine, but the errors occur in the Assert
(dynamic_cast<...>...) part.  My "solution" (quotes necessary) was to
replace the dynamic_cast with static_cast. This is not a real solution though, merely a work-around for already working code; we really have no
idea the validity of the cast (if we did, the Assert would be
unnecessary).... I don't really know what the underlying problem is, but the dynamic_cast's such as this one give problems on Mac OS 10.6. I'm
definitely open to any other ideas.

As you mention, replacing the dynamic_cast by a static_cast defeats the purpose of the assertion. That said, this is well-tested code, and so I would not object to dropping the assertion, or only do so only on Mac OS X. So how
about this: we add
 #ifdef SOME_MAGIC_THAT_IDENTIFIES_MAC_OS_X
   ...
 #endif
around this place to make it invisible to you guys but keep it around for
everyone else?

The next question is what a useful SOME_MAGIC_THAT_IDENTIFIES_MAC_OS_X would be? We use __APPLE__ in other places. Is it possible to make it a bit more
specific to the OS X or compiler version you are using?

Best
W.

--
-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to