This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

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/test.so: /usr/local/lib/wireshark/plugins/1.99.1/test.so: undefined symbol: LZ4_decompress_safe

I have tried to change plugins/plugin_name/Makefile.am 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

miha87
1112
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/visionect2.so
(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

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]/Makefile.am LIBS variable. (already exists but is empty)

    LIBS = -llz4

  2. run autogen.sh script again.

    $./autogen.sh

  3. and then new generated configure script

    $./configure

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

    $make

  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.

    $make

    and optimally

    $sudo make install

permanent link

answered 10 Nov '14, 23:54

miha87's gravatar image

miha87
1112
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×173
×158
×154
×110

question asked: 07 Nov '14, 05:43

question was seen: 3,038 times

last updated: 11 Nov '14, 00:23

p​o​w​e​r​e​d by O​S​Q​A