Wireshark-dev: Re: [Wireshark-dev] Problem while compiling wireshark master
From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Tue, 4 Jul 2017 14:19:54 +0200
Guy, do you remember because of which libnl version you moved net/if.h inclusion after libnl ones in 592a0fcf04c3f7f9f23476525877763303a1a87d?
Should we include net/if.h first when compiling with libnl3 to cope with this (newly introduced?) redefinition?

Pascal.

2017-07-04 14:06 GMT+02:00 Remy Leone <remy.leone@xxxxxxxx>:
I get similar problems with Ubuntu:

        "Unable to open /tmp/wireshark-master/.svn/entries",
        "/tmp/wireshark-master/wiretap/ascend_scanner.c: In function 'yy_get_next_buffer':",
        "/tmp/wireshark-master/wiretap/ascend_scanner.c:2502:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]",
        "  if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {",
        "                                               ^",
        "k12text.c: In function 'yy_get_next_buffer':",
        "k12text.c:1711:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]",
        "  if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {",
        "                                               ^",
        "In file included from /tmp/wireshark-master/caputils/iface_monitor.c:55:0:",
        "/_usr/include/net/if.h:129:0: error: \"IFNAMSIZ\" redefined [-Werror]",
        " # define IFNAMSIZ IF_NAMESIZE",
        " ^",
        "In file included from /usr/include/libnl3/netlink/netlink.h:24:0,",
        "                 from /usr/include/libnl3/netlink/msg.h:15,",
        "                 from /tmp/wireshark-master/caputils/iface_monitor.c:40:",
        "/usr/include/libnl3/netlink/netlink-compat.h:21:0: note: this is the location of the previous definition",
        " #define IFNAMSIZ 16",
        " ^",
        "cc1: all warnings being treated as errors",
        "make[2]: *** [caputils/CMakeFiles/caputils.dir/iface_monitor.c.o] Error 1",
        "make[1]: *** [caputils/CMakeFiles/caputils.dir/all] Error 2",
        "make[1]: *** Waiting for unfinished jobs....",
        "make: *** [all] Error 2"


2017-07-04 13:46 GMT+02:00 Remy Leone <remy.leone@xxxxxxxx>:
I'm not sure. Maybe it's only related to the debian stable version. I'm going to see if it also fails on a ubuntu 16.04.
A solution to test that would be to add the last debian stable version to buildbot. Would that be complicated to set up? 

2017-07-04 13:39 GMT+02:00 Pascal Quantin <pascal.quantin@xxxxxxxxx>:


2017-07-04 13:37 GMT+02:00 Pascal Quantin <pascal.quantin@xxxxxxxxx>:
Hi Remy,

2017-07-04 13:13 GMT+02:00 Remy Leone <remy.leone@xxxxxxxx>:
Hello,

I stumble upon this error in wireshark master. I use debian stretch with system packages installed from the apt-get build-dep tshark. Does it sound familiar?

        "/tmp/wireshark-master/epan/dissectors/packet-parlay.c:5381:27: warning: 'org_csapi_policy_TpPolicyConditionListType' defined but not used [-Wunused-const-variable=]",
        " static const value_string org_csapi_policy_TpPolicyConditionListType[] = {",
        "                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
        "/tmp/wireshark-master/epan/dissectors/packet-parlay.c:4151:27: warning: 'org_csapi_fw_TpLoadStatusError' defined but not used [-Wunused-const-variable=]",
        " static const value_string org_csapi_fw_TpLoadStatusError[] = {",
        "                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
        "/tmp/wireshark-master/epan/dissectors/packet-parlay.c:4084:27: warning: 'org_csapi_fw_TpFWExceptionType' defined but not used [-Wunused-const-variable=]",
        " static const value_string org_csapi_fw_TpFWExceptionType[] = {",
        "                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
        "/tmp/wireshark-master/epan/dissectors/packet-parlay.c:4041:27: warning: 'org_csapi_fw_TpAPIUnavailReason' defined but not used [-Wunused-const-variable=]",
        " static const value_string org_csapi_fw_TpAPIUnavailReason[] = {",
        "                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
        "Unable to open /tmp/wireshark-master/.svn/entries",
        "In file included from /tmp/wireshark-master/caputils/iface_monitor.c:55:0:",
        "/_usr/include/net/if.h:129:0: error: \"IFNAMSIZ\" redefined [-Werror]",
        " # define IFNAMSIZ IF_NAMESIZE",
        " ",
        "In file included from /usr/include/libnl3/netlink/netlink.h:24:0,",
        "                 from /usr/include/libnl3/netlink/msg.h:15,",
        "                 from /tmp/wireshark-master/caputils/iface_monitor.c:40:",
        "/usr/include/libnl3/netlink/netlink-compat.h:21:0: note: this is the location of the previous definition",
        " #define IFNAMSIZ 16",
        " ",
        "cc1: all warnings being treated as errors",
        "make[2]: *** [caputils/CMakeFiles/caputils.dir/iface_monitor.c.o] Error 1",
        "make[1]: *** [caputils/CMakeFiles/caputils.dir/all] Error 2",
        "make[1]: *** Waiting for unfinished jobs....",
        "make: *** [all] Error 2"

It looks like iface_monitor.c should be modified so as to include net/if.h before netlink/msg.h. Could you give it a try?

That said the comments in the file suggest that net/if.h needs to be included after libnl include (at least for some versions). But netlink-compat.h defines IFNAMESIZ only if it not defined yet... Another chicken and egg situation?


Pascal.


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe



___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe