davidgfnet / wireshark-whatsapp

Whatsapp dissector plugin for wireshark
Other
207 stars 68 forks source link

OSX build fail #16

Closed RobertoD91 closed 9 years ago

RobertoD91 commented 10 years ago

Installed wireshark with headers from brew

Roberto@Jarvis:~/Documents/git/wireshark-whatsapp/build$ cmake .. -DWIRESHARK_INCLUDE_DIRS:FILEPATH=/usr/local/Cellar/wireshark/1.12.1/include/wireshark
-- The C compiler identification is AppleClang 6.0.0.6000051
-- The CXX compiler identification is AppleClang 6.0.0.6000051
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") 
-- checking for one of the modules 'glib-2.0>=2.4.0'
-- Found GLib2: glib-2.0;intl /usr/local/Cellar/glib/2.42.0/include/glib-2.0;/usr/local/Cellar/glib/2.42.0/lib/glib-2.0/include;/usr/local/opt/gettext/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- Looking for include file glib/gchecksum.h
-- Looking for include file glib/gchecksum.h - not found
-- Found libcrypto: /usr/lib/libcrypto.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Roberto/Documents/git/wireshark-whatsapp/build

Roberto@Jarvis:~/Documents/git/wireshark-whatsapp/build$ make
[ 25%] Generating plugin.c
Scanning dependencies of target whatsapp
[ 50%] Building C object CMakeFiles/whatsapp.dir/plugin.c.o
[ 75%] Building C object CMakeFiles/whatsapp.dir/packet-whatsapp.c.o
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:72:50: error: too few arguments to function call, expected 4, have 3
  guint8* buffer = tvb_memdup(tvb, offset, length);
                   ~~~~~~~~~~                    ^
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/epan/tvbuff.h:448:1: note: 'tvb_memdup' declared here
WS_DLL_PUBLIC void *tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb,
^
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/ws_symbol_export.h:142:23: note: expanded from macro 'WS_DLL_PUBLIC'
#define WS_DLL_PUBLIC   WS_DLL_PUBLIC_DEF extern
                        ^
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/ws_symbol_export.h:116:27: note: expanded from macro 'WS_DLL_PUBLIC_DEF'
#define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default")))
                          ^
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:73:16: warning: implicit declaration of function 'whatsapp_data_length' is invalid in C99 [-Wimplicit-function-declaration]
  int wa_len = whatsapp_data_length(buffer, length);
               ^
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:88:47: error: too few arguments to function call, expected 4, have 3
    guint8* buffer = tvb_memdup(tvb, 0, length);
                     ~~~~~~~~~~               ^
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/epan/tvbuff.h:448:1: note: 'tvb_memdup' declared here
WS_DLL_PUBLIC void *tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb,
^
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/ws_symbol_export.h:142:23: note: expanded from macro 'WS_DLL_PUBLIC'
#define WS_DLL_PUBLIC   WS_DLL_PUBLIC_DEF extern
                        ^
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/ws_symbol_export.h:116:27: note: expanded from macro 'WS_DLL_PUBLIC_DEF'
#define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default")))
                          ^
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:89:5: warning: implicit declaration of function 'whatsapp_data_dissect_tree' is invalid in C99 [-Wimplicit-function-declaration]
    whatsapp_data_dissect_tree(buffer, length, subtree, tvb, pinfo);
    ^
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:96:3: warning: implicit declaration of function 'tcp_dissect_pdus' is invalid in C99 [-Wimplicit-function-declaration]
  tcp_dissect_pdus(tvb, pinfo, tree, TRUE, MIN_PAKCET_SIZE,
  ^
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:315:6: warning: passing 'const gboolean *' (aka 'const int *') to parameter of type 'gboolean *' (aka 'int *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                                 &global_enable_decoding);
                                 ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/epan/prefs.h:403:59: note: passing argument to parameter 'var' here
    const char *title, const char *description, gboolean *var);
                                                          ^
/Users/Roberto/Documents/git/wireshark-whatsapp/packet-whatsapp.c:320:50: warning: incompatible pointer types passing 'int (tvbuff_t *, packet_info *, proto_tree *)' to parameter of type 'new_dissector_t' (aka 'int (*)(tvbuff_t *, packet_info *, proto_tree *, void *)') [-Wincompatible-pointer-types]
  whatsapp_handle = new_create_dissector_handle (dissect_whatsapp, proto_whatsapp);
                                                 ^~~~~~~~~~~~~~~~
/usr/local/Cellar/wireshark/1.12.1/include/wireshark/epan/packet.h:432:78: note: passing argument to parameter 'dissector' here
WS_DLL_PUBLIC dissector_handle_t new_create_dissector_handle(new_dissector_t dissector,
                                                                             ^
5 warnings and 2 errors generated.
make[2]: *** [CMakeFiles/whatsapp.dir/packet-whatsapp.c.o] Error 1
make[1]: *** [CMakeFiles/whatsapp.dir/all] Error 2
make: *** [all] Error 2
davidgfnet commented 9 years ago

This is fixed now!