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

Build a Plugin on Linux

0

Hello community,

I successfully developed two Dissectors for my companies own network protocols. They are compiling without problems on Windows. But now I have to build them for Linux, too. I have no idea how to do this.

On Windows I just go into the plugin folder and run "nmake Makefile.nmake", on Linux I found a Makefile in the ethercat folder, but how do I generate a Makefile for my plugin. Do I have to write my own? Is there maybe a README for this.

Thankfully lal12

asked 05 Jun '15, 03:48

lal12's gravatar image

lal12
367712
accept rate: 33%


One Answer:

1

Yes doc/README.plugins

answered 05 Jun '15, 04:15

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

Yes, I looked into README.plugins, but there was no information about how to create the Makefile, it is just mentioned there, that I have to add it to the AC_OUTPUT in configure.ac (Section 3.2.4)

(05 Jun '15, 04:35) lal12
1

The Makefile is just copied, see section 2. of README.plugins.

Section 3. of README.plugins for the changes to core Wireshark files to integrate your plugin.

You have two build options on Linux, using Autotools or using CMake. If using Autotools you'll need to do the autogen.sh and configure steps again after modifying the files.

(05 Jun '15, 05:53) grahamb ♦

I did several changes, don't know which one helped, but now the build seems to work. But there is no foo.so file in my plugin/foo folder. Just a foo.la, I assume it has to be linked, but how can I archieve this.

(19 Jun '15, 07:53) lal12
2

the .so file is located in the hidden .libs subfolder of your plugin folder.

(19 Jun '15, 08:33) Pascal Quantin

Thank You. Maybe it should be added do the README?

(22 Jun '15, 00:39) lal12

I still got a problem. I found the .so files, but they are only 10K sized. The dll files are much bigger and different sized (60K to 130K). I have the same issue with three different dissectors (all self developed and working on windows).

If I try to load themid wireshark, the following error occurs:

undefined symbol: proto_register_myprotocol

I assume this is kind of a linker error. So I tried to run ./configure with the --enable-static parameter. Which didn't changed the size.

(22 Jun '15, 05:53) lal12

I now used CMake which worked. But still would be interesting where is the problem with autotools.

(22 Jun '15, 09:52) lal12
showing 5 of 7 show 2 more comments