Make of example plugin fails

asked 2019-03-29 09:29:05 +0000

asd gravatar image

updated 2019-04-01 11:42:06 +0000

I am unable to build the example plugin. The cmake stages completes successfully, when I run make it fails with the following error:

user@pc:~/path/example/build$ make
Scanning dependencies of target hello
[ 50%] Building C object CMakeFiles/hello.dir/hello.c.o
/home/path/example/hello.c: In function ‘plugin_register’:
/home/path/example/hello.c:59:12: error: unknown type name ‘proto_plugin’
     static proto_plugin plug;
            ^~~~~~~~~~~~
/home/path/example/hello.c:61:9: error: request for member ‘register_protoinfo’ in something not a structure or 
union
     plug.register_protoinfo = proto_register_hello;
         ^
/home/path/example/hello.c:62:9: error: request for member ‘register_handoff’ in something not a structure or 
union
     plug.register_handoff = proto_reg_handoff_hello; /* or NULL */
         ^
/home/path/example/hello.c:63:5: warning: implicit declaration of function ‘proto_register_plugin’; did you mean 
‘proto_register_prefix’? [-Wimplicit-function-declaration]
     proto_register_plugin(&plug);
     ^~~~~~~~~~~~~~~~~~~~~
    proto_register_prefix
make[2]: *** [CMakeFiles/hello.dir/build.make:63: CMakeFiles/hello.dir/hello.c.o] Error 1 
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/hello.dir/all] Error 2 
make: *** [Makefile:130: all] Error 2

How can I resolve this?

tshark -v:

$ tshark -v

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed

(process:29330): GLib-CRITICAL **: 13:39:42.572: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
TShark (Wireshark) 2.6.6 (Git v2.6.6 packaged as 2.6.6-1~ubuntu18.10.0)

Copyright 1998-2019 Gerald Combs <[email protected]> and contributors.
License GPLv2+: GNU GPL version 2 or later <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with libpcap, with POSIX capabilities (Linux), with libnl 3,
with GLib 2.58.1, with zlib 1.2.11, with SMI 0.4.8, with c-ares 1.14.0, with Lua
5.2.4, with GnuTLS 3.6.4, with Gcrypt 1.8.3, with MIT Kerberos, with MaxMind DB
resolver, with nghttp2 1.32.1, with LZ4, with Snappy, with libxml2 2.9.4.

Running on Linux 4.18.0-16-generic, with Intel(R) Core(TM) i7-8550U CPU @
1.80GHz (with SSE4.2), with 15807 MB of physical memory, with locale
LC_CTYPE=en_US.UTF-8, LC_NUMERIC=de_DE.UTF-8, LC_TIME=de_DE.UTF-8,
LC_COLLATE=en_US.UTF-8, LC_MONETARY=de_DE.UTF-8, LC_MESSAGES=en_US.UTF-8,
LC_PAPER=de_DE.UTF-8, LC_NAME=de_DE.UTF-8, LC_ADDRESS=de_DE.UTF-8,
LC_TELEPHONE=de_DE.UTF-8, LC_MEASUREMENT=de_DE.UTF-8,
LC_IDENTIFICATION=de_DE.UTF-8, with libpcap version 1.8.1, with GnuTLS 3.6.4,
with Gcrypt 1.8.3, with zlib 1.2.11, binary plugins supported (14 loaded).

Built using gcc 8.2.0.
edit retag flag offensive close merge delete

Comments

asd, can you edit your post to add tshark -v? It is helpful for diagnostics.

Ross Jacobs gravatar imageRoss Jacobs ( 2019-03-29 20:55:00 +0000 )edit

@Ross Jacobs updated the question.

asd gravatar imageasd ( 2019-04-01 11:42:45 +0000 )edit

The GLib-CRITICALerrors look funny. That looks like this seg fault: https://osqa-ask.wireshark.org/questi..., although you're seeing this just for tshark -v.

I think something in your build might be funky. Can you reinstall wireshark with sudo apt install --reinstall wireshark and/or build latest 3.0.0 from source?

Ross Jacobs gravatar imageRoss Jacobs ( 2019-04-02 13:26:58 +0000 )edit