On Tue, Mar 17 2020, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote:
> +cc sleuthkit maintainer
>
> On Tue, Mar 17 2020, Remi Pointel <remi.poin...@xiri.fr> wrote:
>> On 2020-03-16 10:25, Remi Pointel wrote:
>>> Hi,
>>>
>>> I need to update sleuthkit for the new version of plaso.
>>>
>>> Attached is the updated version of sleuthkit. It builds fine, but if
>>> I run the regress tests of the py-tsk port it segfaults on the libtsk.
>>>
>>> If I add LDFLAGS="-lstdc++", it works fine but it's not the good way
>>> to fix it.
>>>
>>> Any idea?
>>>
>>> To test: build & install the sleuthkit port attached, and make test in
>>> the py-tsk port attached.
>
> So the issue is that libtsk.so isn't linked against c++ support
> libraries.  The problem already happens in -current,
> patches/patch-configure_ac tried to fix archs that don't have libstdc++
> but it breaks loading libtsk.so from non-c++ programs.
>
> Here's an updated diff that uses the appropriate libtool magic to force
> linking with a c++ library.  It also refreshes SHARED_LIBS (the major
> bump appears warranted, says check_sym).  Note the AUTORECONF line,
> I did not uncomment it since the default worked fine.
>
> With this updated diff and your py-tsk update, the py-tsk tests succeed
> on amd64.

[...]

> Index: patches/patch-tsk_Makefile_am
> ===================================================================
> RCS file: patches/patch-tsk_Makefile_am
> diff -N patches/patch-tsk_Makefile_am
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-tsk_Makefile_am     17 Mar 2020 13:13:31 -0000
> @@ -0,0 +1,17 @@
> +$OpenBSD$
> +
> +Tell libtool to link libtsk as a C++ library.
> +
> +Index: tsk/Makefile.am
> +--- tsk/Makefile.am.orig
> ++++ tsk/Makefile.am
> +@@ -4,6 +4,9 @@ SUBDIRS = base img vs fs hashdb auto pool util
> + # Merge the libraries into one
> + lib_LTLIBRARIES = libtsk.la
> + libtsk_la_SOURCES =
> ++# hack to force linkage with a c++ compiler
> ++# 
> https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html
> ++nodist_EXTRA_libtsk_la_SOURCES = dummy.cc

Upstream may prefer dummy.cpp, that's the extension used for C++ files
in the rest of the tarball.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to