[wireshark] fixed libwireshark.so.1: cannot open shared object file error message on startup + also fixed python

Jan Šafránek jsafrane at fedoraproject.org
Tue Sep 4 15:04:03 UTC 2012


commit 2accc86fdaa2cf3cb840348d1653aef2469f9e91
Author: Jan Safranek <jsafrane at redhat.com>
Date:   Wed Aug 29 13:07:36 2012 +0200

    fixed libwireshark.so.1: cannot open shared object file error message on startup
    + also fixed python linking, see http://www.mail-archive.com/wireshark-dev@wireshark.org/msg25938.html.

 wireshark-1.6.0-soname.patch         |    2 +-
 wireshark-1.8.2-python-symbols.patch |   29 +++++++++++++++++++++++++++++
 wireshark.spec                       |    8 +++++++-
 3 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/wireshark-1.6.0-soname.patch b/wireshark-1.6.0-soname.patch
index 95f063d..6b266bd 100644
--- a/wireshark-1.6.0-soname.patch
+++ b/wireshark-1.6.0-soname.patch
@@ -11,7 +11,7 @@ diff -up wireshark-1.6.0/epan/wspython/wspy_libws.py.soname wireshark-1.6.0/epan
      return 'libwireshark.dll'
    else:
 -    return 'libwireshark.so'
-+    return 'libwireshark.so.1'
++    return 'libwireshark.so.2'
  
  def get_libws_handle():
    global __libwireshark
diff --git a/wireshark-1.8.2-python-symbols.patch b/wireshark-1.8.2-python-symbols.patch
new file mode 100644
index 0000000..0743a0c
--- /dev/null
+++ b/wireshark-1.8.2-python-symbols.patch
@@ -0,0 +1,29 @@
+tshark / wireshark shows
+"/lib64/libwireshark.so.2: undefined symbol: py_create_dissector_handle"
+on startup. This patch ensures that the python symbols are compiled in.
+
+diff -up wireshark-1.8.2/epan/Makefile.am.orig wireshark-1.8.2/epan/Makefile.am
+--- wireshark-1.8.2/epan/Makefile.am.orig	2012-08-29 09:39:06.860107175 +0200
++++ wireshark-1.8.2/epan/Makefile.am	2012-08-29 09:39:11.311137553 +0200
+@@ -195,7 +195,7 @@ if !HAVE_PLUGINS
+ def_sym_filter_symbols += /^register_all_wiretap_modules/ || /^register_all_plugin_tap_listeners/ || /^plugin_list/ {next;};
+ endif
+ 
+-if HAVE_LIBPY
++if !HAVE_LIBPY
+ # If we're not building python, these symbols don't get built.
+ # Keep them out of the symbol list.
+ def_sym_filter_symbols += /^py_create_dissector_handle/ || /^py_dissector_args/  {next;};
+diff -up wireshark-1.8.2/epan/libwireshark.def.old wireshark-1.8.2/epan/libwireshark.def
+--- wireshark-1.8.2/epan/libwireshark.def.old	2012-08-29 10:15:28.136123323 +0200
++++ wireshark-1.8.2/epan/libwireshark.def	2012-08-29 10:18:28.905483905 +0200
+@@ -1248,3 +1248,9 @@ xml_escape
+ xml_get_attrib
+ xml_get_cdata
+ xml_get_tag
++py_create_dissector_handle
++py_dissector_args
++hf_register_info_add
++hf_register_info_create
++hf_register_info_destroy
++
diff --git a/wireshark.spec b/wireshark.spec
index 300cd48..509abad 100644
--- a/wireshark.spec
+++ b/wireshark.spec
@@ -13,7 +13,7 @@
 Summary:	Network traffic analyzer
 Name:		wireshark
 Version:	1.8.2
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	GPL+
 Group:		Applications/Internet
 Source0:	http://wireshark.org/download/src/%{name}-%{version}.tar.bz2
@@ -31,6 +31,7 @@ Patch2:		wireshark-1.2.4-enable_lua.patch
 Patch3:		wireshark-libtool-pie.patch
 Patch4:		wireshark-1.6.1-group-msg.patch
 Patch5:		wireshark-1.6.0-soname.patch
+Patch6:		wireshark-1.8.2-python-symbols.patch
 
 Url:		http://www.wireshark.org/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -118,6 +119,7 @@ and plugins.
 %patch3 -p1 -b .v4cleanup
 %patch4 -p1 -b .group-msg
 %patch5 -p1 -b .soname
+%patch6 -p1 -b .python-symbols
 
 %build
 %ifarch s390 s390x sparcv9 sparc64
@@ -347,6 +349,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/aclocal/*
 
 %changelog
+* Wed Aug 29 2012 Jan Safranek <jsafrane at redhat.com> - 1.8.2-2
+- fixed "libwireshark.so.1: cannot open shared object file" error
+  message on startup
+
 * Thu Aug 16 2012 Jan Safranek <jsafrane at redhat.com> - 1.8.2-1
 - upgrade to 1.8.2
 - see http://www.wireshark.org/docs/relnotes/wireshark-1.8.2.html


More information about the scm-commits mailing list