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

Hi,

I'm having trouble compiling multiple source files. Following the README.plugins, I added the DISSECTOR_INCLUDES and DISSECTOR_SUPPORT_SRC variables to Makefile.common. Additionally, according to this correspondence, I added the DISSECTOR_SUPPORT_SRC variable under my dissector_la_SOURCES variable. However, when I make, it says that there is nothing to be done. I've also tried copying other what plugins have (opcua, to be precise), which also includes adding the DISSECTOR_* variables to Makefile, Makefile.in, Makefile.am, etc. I'm developing on Wireshark 1.0.15 (for reasons).

EDIT: Here is what my Makefile.common looks like

...
PLUGIN_NAME = xxx
DISSECTOR_SRC = \
   packet-xxx.c
DISSECTOR_INCLUDES = \
   xxxhelper.h
DISSECTOR_SUPPORT_SRC = \
   xxxhelper.c
...

EDIT2: Here is my Makefile

...
xxx_la_SOURCES = \
    plugin.c \
    moduleinfo.h \
    $(DISSECTOR_SRC) \
    $(DISSECTOR_INCLUDES) \
    $(DISSECTOR_SUPPORT_SRC)
...

EDIT3: Here's the make -d output: https://www.dropbox.com/s/gwtybcv73cyfh24/output.txt

asked 05 Jun '14, 11:10

barney's gravatar image

barney
6225
accept rate: 100%

edited 06 Jun '14, 11:27

1

Is that really with a colon at the end of xxxhelper.c:

Did you go trough the autogen.sh && ./configure && make dance or just make?

(05 Jun '14, 12:55) Jaap ♦

No, my bad, that was a typo. Also, yes, I tried to autogen/configure/make and still no luck.

(05 Jun '14, 13:19) barney

what is the output of the following command?

make -d

(05 Jun '14, 13:59) Kurt Knochner ♦

I'm a little clueless about make, should I post the entire output (~22k lines)? The tail of it is:

...
       Prerequisite `/usr/local/include/protobuf-c/protobuf-c.h' is older than target `packet-xxx.lo'.
      No need to remake target `packet-xxx.lo'.
     Finished prerequisites of target file `xxx.la'.
     Prerequisite `plugin.lo' is older than target `xxx.la'.
     Prerequisite `packet-xxx.lo' is older than target `xxx.la'.
    No need to remake target `xxx.la'.
   Finished prerequisites of target file `all-am'.
  Must remake target `all-am'.
  Successfully remade target file `all-am'.
 Finished prerequisites of target file `all'.
Must remake target `all'.
Successfully remade target file `all'.
make: Nothing to be done for `all'.

The .c file I'm trying to include is a Google Protocol Buffer model (compiled using protobuf-c), if that makes a difference.

(05 Jun '14, 14:24) barney

can you post the whole file on google drive or dropbox and post the link here?

(05 Jun '14, 14:52) Kurt Knochner ♦
(05 Jun '14, 15:33) barney
showing 5 of 6 show 1 more comments

I figured it out by stepping through a diff. You also need to add to the Makefile at least two more lines, one for the .Plo (e.g. include ./$(DEPDIR)/xxxhelper.c.Plo) and the other for the .lo file (add the line to xxx_la_OBJECTS).

permanent link

answered 06 Jun '14, 14:04

barney's gravatar image

barney
6225
accept rate: 100%

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
×37
×18

question asked: 05 Jun '14, 11:10

question was seen: 1,976 times

last updated: 06 Jun '14, 14:04

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