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=: ;;