On Wed, Feb 27, 2008 at 1:03 PM, Adam Portley <[EMAIL PROTECTED]> wrote:

> Hi Arun,
>
> I'm using a version from savannah mentioned in perftools:
>
> http://download.savannah.nongnu.org/releases/libunwind/libunwind-snap-070410.tar.gz
> but I can try downloading from git if it's likely to be more up-to-date.
>

I was afraid that you were using the 0.98 release. The above tar ball should
work ok mostly for x86.



>
> Thanks very much for the linking suggestion.  I couldn't find -lgcc_eh
> (maybe because my gcc was compiled with "--enable-shared=libstdc++"?) but I
> was able to compile using "libgcc.a libunwind.a libstdc++.a".  Are there
> any drawbacks to using this instead?


No. This should be fine.



>   Just for curiosity's sake, why does adding libgcc resolve the multiple
> definition error?


C++ exception handling API:

http://www.linux-foundation.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/libgcc-sman.html

is implemented by both libunwind.a and libgcc*.a. On ia64 (Itanium), gcc
uses the implementation in libunwind.a. On most other platforms, the
implementation comes from libgcc*.a.

When you link in libunwind, you might be inadvertently using the libunwind
implementation for C++ exception handling (which may work just fine). One
possibility is to provide a config option that uses libunwind only when the
application explicitly invokes it (and not implicitly for C++ exception
handling).



>
>
> I guess the warnings in perftools/INSTALL about static linkage apply to my
> case (since I'm linking with the *.a files).  I will add the --eh-frame-hdr
> linker option as suggested.  Do you know of any other caveats?


No. I think I documented most of them in the google perftools INSTALL file.


> I'd prefer to not have to install these libraries everywhere if possible -
> do you think this setup will work given that the app is compiled on a 32 bit
> machine and run on x86_64?
>

Should work fine. Although I personally test 64 bit on x86_64 case more.

 -Arun
_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to