On Sun, 27 Oct 2013, Bryan N Iotti wrote:

Hi all,

got a little question for you that's been driving me crazy.

I'm trying to compile the FEBio finite element analysis software on OI hipster 
151a8.

Studio 12.3 CC compilation is not working at all, with hundreds of errors, so 
for now I turned to g++.

g++ compiles fine with -g -m64 (I want the debug flags for now) and runs. However 
when I try to open a file from the verification suite it sends a SIGCABRT and 
terminates with "terminate called after throwing an instance of 
'XMLReader::EndOfFile'
terminate called recursively".

This is quite likely from a libtool-related bug which shows up with -m64 on Solaris when using GCC. The bug causes C++ exception catching to not work reliably. I have attached the patch which was submitted to libtool. This fix will be in the next (soon forthecoming) libtool release.

Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
On Solaris, catch code for C++ exceptions is in libgcc_s.  The libc has
default catch code as well, that does an abort.  GCC by default emits on
purpose -lgcc_s -lc -lgcc_s.  libtool's de-duplication magic turns this
into -lc -lgcc_s, which unsurprisingly is the wrong order, since
exceptions will be seen by libc first.  Disable de-duplication for this
reason, such that we can have working C++ libtool built libraries.

--- libltdl/config/ltmain.m4sh
+++ libltdl/config/ltmain.m4sh
@@ -398,7 +398,7 @@
   test "$opt_debug" = : || func_append preserve_args " --debug"
 
   case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
+    *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2*)
       # don't eliminate duplications in $postdeps and $predeps
       opt_duplicate_compiler_generated_deps=:
       ;;
--- libltdl/config/ltmain.sh
+++ libltdl/config/ltmain.sh
@@ -1180,7 +1180,7 @@
   test "$opt_debug" = : || func_append preserve_args " --debug"
 
   case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
+    *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2*)
       # don't eliminate duplications in $postdeps and $predeps
       opt_duplicate_compiler_generated_deps=:
       ;;
_______________________________________________
OpenIndiana-discuss mailing list
[email protected]
http://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to