Package: pytsk Version: 20150406-2 Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu wily ubuntu-patch
Dear Maintainer, While doing a rebuild of pytsk to unblock a few things as part of the GCC 5 transition; I've tried running one of the tsk examples (istat, specifically), and noticed that pytsk3 doesn't import at all: $ python -c 'import pytsk3' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: /usr/lib/python2.7/dist-packages/pytsk3.x86_64-linux-gnu.so: undefined symbol: Object_init I've added the patch used, as proposed upstream, to solve the issue: * debian/patches/fix_object_init_undefined.patch: don't inline Object_init, doing so breaks importing pytsk3. This was noticed specifically when unblocking the following: afflib/3.7.6-2ubuntu2 xmount/0.7.3-1build1 sleuthkit/4.1.3-11ubuntu2 dff/1.3.0+dfsg.1-4.1build3 pytsk/ppc64el/20150406-2 The above don't appear to include any special Ubuntu patches that would affect pytsk aside from the GCC 5 transition. Thanks for considering the patch. -- System Information: Debian Release: jessie/sid APT prefers wily-updates APT policy: (500, 'wily-updates'), (500, 'wily-security'), (500, 'wily'), (100, 'wily-backports'), (99, 'wily-proposed') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.1.0-3-generic (SMP w/4 CPU cores) Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru pytsk-20150406/debian/patches/fix_object_init_undefined.patch pytsk-20150406/debian/patches/fix_object_init_undefined.patch --- pytsk-20150406/debian/patches/fix_object_init_undefined.patch 1970-01-01 01:00:00.000000000 +0100 +++ pytsk-20150406/debian/patches/fix_object_init_undefined.patch 2015-08-18 15:27:36.000000000 +0200 @@ -0,0 +1,41 @@ +From: Mathieu Trudel-Lapierre <mathieu...@ubuntu.com> +Subject: Don't inline Object_init + +Inlining here, at least when building with GCC as we do; makes the Object_init +symbols not be found. + +https://github.com/py4n6/pytsk/wiki/Building mentions removing the inline +keywords to fix the issue; and building with clang already wouldn't inline +this. + +--- + class.c | 2 +- + class.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: b/class.c +=================================================================== +--- a/class.c ++++ b/class.c +@@ -22,7 +22,7 @@ + // Noone should instantiate Object directly. this should be already + // allocated therefore: + +-DLL_PUBLIC PYTSK_INLINE void Object_init(Object this) { ++DLL_PUBLIC void Object_init(Object this) { + this->__class__ = &__Object; + this->__super__ = NULL; + }; +Index: b/class.h +=================================================================== +--- a/class.h ++++ b/class.h +@@ -371,7 +371,7 @@ struct Object_t { + #define CLASSOF(obj) \ + ((Object)obj)->__class__ + +-DLL_PUBLIC PYTSK_INLINE void Object_init(Object); ++DLL_PUBLIC void Object_init(Object); + + DLL_PUBLIC extern struct Object_t __Object; + diff -Nru pytsk-20150406/debian/patches/series pytsk-20150406/debian/patches/series --- pytsk-20150406/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ pytsk-20150406/debian/patches/series 2015-08-18 15:17:02.000000000 +0200 @@ -0,0 +1 @@ +fix_object_init_undefined.patch