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

Link dissector plugin to shared library.


I am writing a dissector for protocol, that has most of its data compressed with lz4 compression. The thing I need to do is to link my plug-in with external lz4 shared library to uncompress the compressed data. (liblz4-dev on Ubuntu)

The problem is that unfortunately I don't understand the Wireshark Autools build system very well and I can't figure it out how to do it. I always get the following error, when I start the wireshark.

 Couldn't load module /usr/local/lib/wireshark/plugins/1.99.1/ /usr/local/lib/wireshark/plugins/1.99.1/ undefined symbol: LZ4_decompress_safe

I have tried to change plugins/plugin_name/ without any success. LIBS = -llz4

I would be very grateful if somebody could explain me how to do it? How do I link plug in with another shared library?

asked 07 Nov '14, 05:43

miha87's gravatar image

accept rate: 0%

edited 11 Nov '14, 00:23

What's printed if you run the command

ldd /usr/local/lib/wireshark/plugins/1.99.1/
(07 Nov '14, 19:12) Guy Harris ♦♦

Nobody has the answer?

I was sure it is trivial and that it is jut me who can't figure it out. Anyway I'm sure I'm not the first one with this problem and I am not he first one who wants to link his plugin with some external lib.

(07 Nov '14, 23:58) miha87

Perhaps nobody has enough information to give you an answer. You were asked a question; perhaps the answer to the question you were asked will help somebody give you an answer.

I was sure it is trivial

Perhaps it isn't.

(08 Nov '14, 00:09) Guy Harris ♦♦

Sorry I have somehow managed to miss your question. I am sorry again. My mistake. I will post the answer ass soon as I get to may computer. :) Thank you

(08 Nov '14, 04:22) miha87

One Answer:


Ok I have found the solution that works for me. Actually the steps are the same as before. I have probably spiked something before and this is the reason I had problems before. If you add dependency you should probably go trough all described steps again.

  1. Add dependency to the plugin/[plugin_name]/ LIBS variable. (already exists but is empty)

    LIBS = -llz4

  2. run script again.


  3. and then new generated configure script


  4. And finally make. I am not sure if running "make -C plugins" is sufficient.


  5. If you want to install

$sudo make install

  1. Once you do this you do not need to go trough all steps again to recompile. Just do.


    and optimally

    $sudo make install

answered 10 Nov '14, 23:54

miha87's gravatar image

accept rate: 0%