Re: libreoffice build error

From: Jung-uk Kim <jkim_at_FreeBSD.org>
Date: Tue, 17 Sep 2013 21:04:14 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-09-17 13:24:41 -0400, Jung-uk Kim wrote:
> I am still working on libc++ issues but it is much more
> complicated. :-(

I fixed almost everything except for exception handling issues.
Unfortunately, libc++/libcxxrt's exception handling is not 100%
compatible with libstdc++'s and I couldn't find a proper fix. :-(

Basically, C++/UNO bridge for LibreOffice/OpenOffice does some clever
hacks, somewhat similar to the example on this blog page:

http://zbigg.blogspot.com/2009/03/catch-on-g.html

libstdc++ works as expected:

$ g++ -g eh.cc
$ ./a.out
exception caught int(321)
exception caught std::string(akuku)
$ clang++ -g eh.cc
$ ./a.out
exception caught int(321)
exception caught std::string(akuku)

libc++/libcxxrt does not:

$ clang++ -stdlib=libc++ -g eh.cc
$ ./a.out
Segmentation fault (core dumped)
$ gdb -c a.out.core a.out
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc++.so.1...done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  execute<void (*)()> (c=0x402240 <akuku()>,
exc_handlers=_at_0x7fffffffd948)
    at typeinfo:86
86          const char* name() const _NOEXCEPT {return __type_name;}

(Note: I intentionally used a slightly old head to demonstrate the
problem but the symptom is exactly same on a latest libc++-only machine.)

Please let me know if you have any clue for me to fix this issue.

Thanks!

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBAgAGBQJSOPwNAAoJECXpabHZMqHO2ycH/3RgOcWXLQtD9pjlAN+KjQ4k
BHAssNp2mPYl/KJDb4QzpvtX+wjGU9y1tg0JGlhRU8LiuoZgbJXhvMCU1wJmJvc4
wxiKtW5c3Z37M3Oz5isoB4gIzt8xuNtwkfKEwQHS4N9MRX77lNpLYx1trjo0ly3s
MdcUvL15iqqnZ9E9A8fSIqrS9s1m6PNNNh29uHQejfN6iOy1f/EsZiLbFXNSoudj
vF9JhGpMME+OLq6ub7abMC1HIuNm0NJyrcwBuQluP10coC7ZRkPzKVuKf2NDLCz5
9gr75gGqydPUF5fXPeF+8tt54Sh8xOKdU3EOMa6+jkjwcXP67lTOD/8G8kUBXb4=
=NsKB
-----END PGP SIGNATURE-----
Received on Tue Sep 17 2013 - 23:06:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:41 UTC