From: Anders Broman
Sent: den 13 oktober 2017 13:49
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: RE: [Wireshark-dev] Building Wireshark on SuSE 11.4 fails, configure does not find pcap functions.
-----Original Message-----
From: Wireshark-dev [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx]
On Behalf Of Guy Harris
Sent: den 12 oktober 2017 19:22
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Building Wireshark on SuSE 11.4 fails, configure does not find pcap functions.
On Oct 12, 2017, at 4:02 AM, João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx> wrote:
On 12-10-2017 11:25, Anders Broman wrote:
Is this a built from a git checkout or from a release tarball? If it's from a git checkout, what happens if you do a "make maintainer-clean", a "./autogen.sh", and then a >"./configure"?
It's from an svn clone of the old svn repo kept up to date with the
latest git version. I did check a fresh svn checkout. I could try to build the standard Wireshark From trunk.
Probably related to https://code.wireshark.org/review/#/c/23329/.
The problem still needs to be investigated, the autoconf macro is complex and impossible to test for all platforms and libpcap versions.
The comment in your change says
# We have pcap-config; we assume that means we have libpcap
# installed and that pcap-config will tell us whatever
# libraries libpcap needs.
As the creator of pcap-config, I can state unequivocally that if that assumption is incorrect, that would indicate that the pcap-config on the machine in question is buggy. Whether the bug is the fault of
tcpdump.org or of the platform on the machine is another matter.
Anders, what does running
pcap-config --libs
and
pcap-config --libs --static
on the SuSE and Ubuntu machines print?
On SuSE:
pcap-config --libs
If 'pcap-config' is not a typo you can run the following command to lookup the package that contains the binary:
command-not-found pcap-config
On Ubuntu 14.04
$ pcap-config --libs
-L/usr/lib/x86_64-linux-gnu -lpcap
$ pcap-config --libs --static
-L/usr/lib/x86_64-linux-gnu -lpcap
Regards
Anders
Hi,
It’s SuSE 11.3 not OpenSuse and using zypper I have the latest available libpcap libraries for this version installed.
sudo zypper se libpcap
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+----------------+--------------------------------+-----------
| libpcap | A Library for Network Sniffers | srcpackage
i | libpcap-devel | A Library for Network Sniffers | package
i | libpcap0 | A Library for Network Sniffers | package
| libpcap0-32bit | A Library for Network Sniffers | package
Information for package libpcap0:
Repository: SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109
Name: libpcap0
Version: 0.9.8-50.10.1
:
Name: libpcap-devel
Version: 0.9.8-50.10.1
Regards
Anders
This patch seems to fix the problem, I’m not sure if it’s the right thing to do though.
diff --git a/acinclude.m4 b/acinclude.m4
index a5d9642..57ea289 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -210,6 +210,7 @@ AC_DEFUN([AC_WIRESHARK_PCAP_CHECK],
if test -d $pcap_dir ; then
if test x$pcap_dir != x/usr/include -a x$pcap_dir != x/usr/local
/include ; then
PCAP_CFLAGS="-I$pcap_dir"
+ PCAP_LIBS="-L$pcap_dir/lib -lpcap"
fi
found_pcap_dir=" $found_pcap_dir -I$pcap_dir"
break