This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

compile error with v. 1.10.5 on fedora 17

0

I downloaded v. 1.10.5 and the build failed. I simply ran ./configure without any options. The error was:

  CC     wireshark-capture-pcap-util.o
capture-pcap-util.c:569:1: error: static declaration of ‘pcap_datalink_name_to_val’ follows non-static declaration
In file included from /usr/include/pcap.h:45:0,
                 from capture-pcap-util.h:30,
                 from capture-pcap-util.c:48:
/usr/include/pcap/pcap.h:380:5: note: previous declaration of ‘pcap_datalink_name_to_val’ was here
capture-pcap-util.c:584:1: error: static declaration of ‘pcap_datalink_val_to_name’ follows non-static declaration
In file included from /usr/include/pcap.h:45:0,
                 from capture-pcap-util.h:30,
                 from capture-pcap-util.c:48:
/usr/include/pcap/pcap.h:381:13: note: previous declaration of ‘pcap_datalink_val_to_name’ was here

Which definition should be removed or modified?

Thank you, Chuck Crisler

asked 15 Jan '14, 06:51

ChuckCrisler's gravatar image

ChuckCrisler
11223
accept rate: 0%

edited 15 Jan '14, 07:02

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

0

Which definition should be removed or modified?

Neither.

Instead, you need to file a Wireshark bug at the Wireshark Bugzilla, and attach the config.log file in the build directory; apparently, the configure script thought your version of libpcap doesn't have pcap_datalink_name_to_val() or pcap_datalink_val_to_name(), but it does.

answered 15 Jan '14, 16:16

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

OK, I will do that tomorrow. Thank you for the info. However, I do still need the build. How do I get it to work?

Thank you, Chuck

(15 Jan '14, 17:00) ChuckCrisler

Edit config.h and make sure it defines HAVE_PCAP_DATALINK_NAME_TO_VAL, HAVE_PCAP_DATALINK_VAL_TO_NAME, and HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION. This may, or may not, make the compile of that file succeed, and, if it does make the compile of that file succeed, there may be other problems, if the configure script made other errors.

(15 Jan '14, 17:29) Guy Harris ♦♦

I have a similar issue with build 1.10.2, but it only happens when I use --enable-static in the configure.

(02 Jul '14, 08:48) FlanOSU