sknebel / wireshark-nfc

Automatically exported from code.google.com/p/wireshark-nfc - just to make sure I have a copy
GNU General Public License v2.0
0 stars 1 forks source link

Cannot build against Wireshark 1.9.0-SVN-45529 #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download, build, and optionally install the aforementioned version of 
Wireshark
2. Modify the Makefile's "WIRESHARK_INCLUDE", and WIRESHARK_LIB variables to 
point to the WS source code directory
3. Attempt to build the plug-in source using "make"

What is the expected output? What do you see instead?
I would expect to receive a shared object file corresponding to the compiled 
plug-in source code - but instead, I see the following:

root@UmBongo:/shuunoubako/wireshark-nfc/plugin# make
gcc -c -g -DWS_VAR_IMPORT=extern -DHAVE_CONFIG_H -DHAVE_STDARG_H -DHAVE_VPRINTF 
-fPIC -I/shuunoubako/wireshark-1.9.0-SVN-45529 -pthread -I/usr/include/glib-2.0 
-I/usr/lib/i386-linux-gnu/glib-2.0/include    packet-llcp.c -o packet-llcp.o
packet-llcp.c: In function ‘llcp_dissect_info’:
packet-llcp.c:315:4: error: too few arguments to function 
‘dissector_try_heuristic’
/shuunoubako/wireshark-1.9.0-SVN-45529/epan/packet.h:274:17: note: declared here
packet-llcp.c: In function ‘proto_reg_handoff_llcp’:
packet-llcp.c:736:3: warning: passing argument 1 of 
‘new_create_dissector_handle’ from incompatible pointer type [enabled by 
default]
/shuunoubako/wireshark-1.9.0-SVN-45529/epan/packet.h:327:27: note: expected 
‘new_dissector_t’ but argument is of type ‘int (*)(struct tvbuff_t *, 
struct packet_info *, struct proto_tree *)’
packet-llcp.c:738:3: warning: passing argument 1 of 
‘new_create_dissector_handle’ from incompatible pointer type [enabled by 
default]
/shuunoubako/wireshark-1.9.0-SVN-45529/epan/packet.h:327:27: note: expected 
‘new_dissector_t’ but argument is of type ‘int (*)(struct tvbuff_t *, 
struct packet_info *, struct proto_tree *)’
make: *** [packet-llcp.o] Error 1
root@UmBongo:/shuunoubako/wireshark-nfc/plugin# 

What version of the product are you using? On what operating system?
Latest Git revision under Ubuntu 11.10

Please provide any additional information below.

I suspect that various APIs related to heuristics in upstream Wireshark have 
changed, since the last time that I succeeded in building against WS 1.7.2.

Original issue reported on code.google.com by tyson....@gmail.com on 16 Oct 2012 at 4:52

GoogleCodeExporter commented 9 years ago
With the attached (untested) patch to the offending files (packet-llcp.c, and 
packet-snep.c) using dissector_try_heuristic(), I can get as far as compiling 
all of the C source code files - although linking fails on my Ubuntu 
installation, since I haven't fully installed the Wireshark libraries, due to 
an unrelated error that prevents relinked-for-installation copies from starting 
up.

Original comment by tyson....@gmail.com on 16 Oct 2012 at 5:11

Attachments:

GoogleCodeExporter commented 9 years ago
For what it's worth, the changes needed to build against SVN revision 47138 are 
pretty much the same; and this time, building, linking, and installation were 
successful. 

Original comment by tyson....@gmail.com on 19 Jan 2013 at 1:26

GoogleCodeExporter commented 9 years ago
The attached patch enables building against Wireshark revision 47138. Only C 
source code file modifications are included, this time.

Original comment by tyson....@gmail.com on 19 Jan 2013 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
On another note, after making those changes - despite the plug-in seemingly 
building without problems, an initial attempt at trying to build the dissectors 
as "built-in" ones (since my current Wireshark built has plug-in loading 
disabled) resulted in:

n/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. 
-I./../.. -I./..    -DINET6 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES 
-DGSEAL_ENABLE -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES  
-D_FORTIFY_SOURCE=2 -I/usr/local/include  
'-DPLUGIN_DIR="/usr/local/lib/wireshark/plugins/1.9.0-SVN-47138"' -Werror -g 
-O2 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels 
-Wpointer-arith -Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security 
-Wold-style-definition -Wstrict-prototypes -Wjump-misses-init -Wvla -Waddress 
-Warray-bounds -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas 
-Wno-overlength-strings -Wwrite-strings -Wno-long-long -Wshadow -Wlogical-op 
-fexcess-precision=fast -pthread -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng12   -MT 
libdissectors_la-packet-ndef.lo -MD -MP -MF 
.deps/libdissectors_la-packet-ndef.Tpo -c -o libdissectors_la-packet-ndef.lo 
`test -f '/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c' || echo 
'./'`/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./../.. -I./.. -DINET6 
-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE 
-DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -D_FORTIFY_SOURCE=2 
-I/usr/local/include 
-DPLUGIN_DIR=\"/usr/local/lib/wireshark/plugins/1.9.0-SVN-47138\" -Werror -g 
-O2 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels 
-Wpointer-arith -Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security 
-Wold-style-definition -Wstrict-prototypes -Wjump-misses-init -Wvla -Waddress 
-Warray-bounds -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas 
-Wno-overlength-strings -Wwrite-strings -Wno-long-long -Wshadow -Wlogical-op 
-fexcess-precision=fast -pthread -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng12 -MT 
libdissectors_la-packet-ndef.lo -MD -MP -MF 
.deps/libdissectors_la-packet-ndef.Tpo -c 
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c  -fPIC -DPIC -o 
.libs/libdissectors_la-packet-ndef.o
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c: In function 
'dissect_ndef_record':
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c:76:49: error: unused 
parameter 'pinfo' [-Werror=unused-parameter]
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c: In function 
'proto_reg_handoff_ndef':
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c:296:2: error: passing 
argument 1 of 'new_create_dissector_handle' from incompatible pointer type 
[-Werror]
../../epan/packet.h:321:27: note: expected 'new_dissector_t' but argument is of 
type 'int (*)(struct tvbuff_t *, struct packet_info *, struct proto_tree *)'
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c:297:2: error: passing 
argument 2 of 'heur_dissector_add' from incompatible pointer type [-Werror]
../../epan/packet.h:278:13: note: expected 'heur_dissector_t' but argument is 
of type 'int (*)(struct tvbuff_t *, struct packet_info *, struct proto_tree *)'
/home/tysonkey/wireshark-nfc/plugin/packet-ndef.c:295:21: error: variable 
'ndef_handle' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[5]: *** [libdissectors_la-packet-ndef.lo] Error 1

It looks as if some more patching might be necessary.

Original comment by tyson....@gmail.com on 19 Jan 2013 at 1:45