Menu

#184 tsk 3.2.2 missing libstdc++ in static build

open
nobody
Other (13)
5
2011-07-29
2011-07-29
No

The static build of the sleuthkit 3.2.2 is missing the C++ standard library.
Bindings that use the static library fail to find __cxa_pure_virtual

A work around is run:
LDFLAGS=-lstdc++ ./configure
LDFLAGS=-lstdc++ make

Discussion

  • Brian Carrier

    Brian Carrier - 2011-09-20

    Is there a autoconf/automake solution for this? I haven't experienced this problem yet when using the library.

     
  • Joachim Metz

    Joachim Metz - 2011-09-20

    The issue surfaced when building a static version of pytsk on Ubuntu.
    http://code.google.com/p/grr/wiki/ServerInstallation

    A straightforward autoconf/make solution would be to detect and include the library.

    An alternative solution could be to implement your own __cxa_pure_virtual function

    From: http://stackoverflow.com/questions/920500/what-is-the-purpose-of-cxa-pure-virtual

    The __cxa_pure_virtual function is an error handler that is invoked when a pure virtual function is called.

    If you are writing a C++ application that has pure virtual functions you must supply your own __cxa_pure_virtual error handler function. For example:

    extern "C" void __cxa_pure_virtual() { while (1); }

     
  • Michael Cohen

    Michael Cohen - 2011-09-20

    We have fixed this issue in pytsk by explicitly linking in libstdc++ as a workaround but this should really not be needed because pytsk itself does not require libstdc++. It would be cleaner to have tsk link it instead.

     
  • Joachim Metz

    Joachim Metz - 2011-10-25

    The same issue shows up when building a deb package, in this case as warnings.

    dpkg-shlibdeps: warning: symbol __cxa_pure_virtual used by debian/sleuthkit/usr/lib/libtsk3.so.3.4.0 found in none of the libraries.
    dpkg-shlibdeps: warning: symbol __gxx_personality_v0 used by debian/sleuthkit/usr/lib/libtsk3.so.3.4.0 found in none of the libraries.
    dpkg-shlibdeps: warning: symbol _ZTVN10__cxxabiv120__si_class_type_infoE used by debian/sleuthkit/usr/lib/libtsk3.so.3.4.0 found in none of the libraries.
    dpkg-shlibdeps: warning: symbol _ZdlPv used by debian/sleuthkit/usr/lib/libtsk3.so.3.4.0 found in none of the libraries.
    dpkg-shlibdeps: warning: symbol _ZTVN10__cxxabiv117__class_type_infoE used by debian/sleuthkit/usr/lib/libtsk3.so.3.4.0 found in none of the libraries.

     
  • Joachim Metz

    Joachim Metz - 2011-10-25

    Proposed fix add the following statement to configure.ac:
    AC_CHECK_LIB(stdc++, main)

     

Log in to post a comment.