Wireshark-dev: Re: [Wireshark-dev] Makefiles for private dissectors
From: Not Me <itisntme6@xxxxxxxxx>
Date: Wed, 31 Aug 2016 14:49:22 +0200
Sorry, I think I did manage to figure it out in the end.

My plugins/Custom.m4 should have looked like this instead:

m4_define([_CUSTOM_AC_OUTPUT_], [
    plugins/private_plugins/foo/Makefile
    plugins/private_plugins/bar/Makefile
])

Thanks!

On Wed, Aug 31, 2016 at 2:35 PM, Not Me <itisntme6@xxxxxxxxx> wrote:
Thanks Anders, I was able to get a bit further now.

I added the following Custom.m4 file:
$ cat plugins/Custom.m4
#

m4_define([_CUSTOM_AC_OUTPUT_], [
    private_plugins/foo/Makefile
    private_plugins/bar/Makefile
])

When running ./autogen.sh, I get the following errors:

$ ./autogen.sh
aclocal -I m4
libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
autoheader
automake --add-missing --gnu
configure.ac:2671: error: required file 'private_plugins/foo/Makefile.in' not found
configure.ac:2671: error: required file 'private_plugins/bar/Makefile.in' not found

Makefile.in should be generated right? The gryphon plugin also does not seem to have one ...
Looks like something is going wrong?

Note that plugins/private_plugins is a symlink to a directory elsewhere, not sure if that could be an issue.

The foo and bar folders both contain a Makefile.am, which is a copy of plugins/gryphon/Makefile.am - where I obviously replaced gryphon by foo or bar.

I'm not interested in building for Windows (only Linux and OSX). OSX works fine with cmake, so I'm focusing on Linux now (I want to build an rpm eventually).

Thanks,
William.


On Tue, Aug 30, 2016 at 12:28 PM, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:

Hi,

You need to edit Custom.m4 and Custom.make in the plugins folder. Fror packaging on windows you also have to look for custom files in /packaging/nsis

Regards

Anders

 

From: wireshark-dev-bounces@wireshark.org [mailto:wireshark-dev-bounces@wireshark.org] On Behalf Of Not Me
Sent: den 30 augusti 2016 12:10
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] Makefiles for private dissectors

 

Dear Wireshark devs,

 

I'm trying to build my own dissectors, and followed a manual where it put all of these in a folder called private_plugins and uses a CMakeListsCustom.txt, which I put at the bottom of this mail (simply setting CUSTOM_PLUGIN_SRC_DIR to foo and bar).

 

I got everything to work, an executable built, and my private dissectors work fine as well. Now, I noticed I am able to package a .dmg file on osx (and an rpm as well) using make osx-package (or make rpm-package). However, I need to switch to Makefiles for that. I noticed my private plugins are no longer picked up, and not part of the actual package built.

 

I searched through many examples on the web, also the doc/ subfolder, and tried many things. But I'm not able to get it to work. Would be great if someone could tell me how to get it working.

 

Maybe I show tell what I currently have... (although I tried many other things).

 

$ cat plugins/Custom.make

#

 

_CUSTOM_SUBDIRS_ = \

            ../private_plugins/foo \

            ../private_plugins/bar \

 

_CUSTOM_EXTRA_DIST_ = \

            Custom.m4 \

            Custom.make

 

_CUSTOM_plugin_ldadd_ = \

            -dlopen ../private_plugins/foo/foo.la \

            -dlopen ../private_plugins/bar/bar.la

 

_CUSTOM_PLUGIN_SRC_ = \

    ../private_plugins/foo/packet-foo.c \

    ../private_plugins/bar/packet-bar.c

 

Configure:

I don't see the configure script output something like "config.status: creating private_plugins/foo/Makefile", which I think it should somehow?

 

Make:

make fails because there's no Makefile

 

Making all in plugins

Making all in ../private_plugins/foo

make[3]: *** No rule to make target `all'.  Stop.

make[2]: *** [all-recursive] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

 

 

 

// This used to work for cmake:

 

$ cat CMakeListsCustom.txt

set(CUSTOM_PLUGIN_SRC_DIR

    private_plugins/foo

    private_plugins/bar

)

 

Thanks,

William.


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe