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

`make -C plugins` fails looking for target tools/lemon/lemon.c

0

I'm running on Ubuntu 16.04 LTS (xenial).

I cloned the source from: https://code.wireshark.org/review/wireshark

This is the output of ./configure

The Wireshark package has been configured with the following options:
                       GLib version : v2.48.0
                    Build wireshark : yes (with Qt4 v4.8.7)
                Build wireshark-gtk : no
                       Build tshark : yes
                      Build tfshark : no
                     Build capinfos : yes
                      Build captype : yes
                      Build editcap : yes
                      Build dumpcap : yes
                     Build mergecap : yes
                   Build reordercap : yes
                    Build text2pcap : yes
                      Build randpkt : yes
                       Build dftest : yes
                     Build rawshark : yes
                  Build androiddump : yes
                      Build sshdump : no
                    Build ciscodump : no
                  Build randpktdump : yes
                        Build echld : no

Save files as pcap-ng by default : yes Install dumpcap with capabilities : no Install dumpcap setuid : no Use dumpcap group : (none) Use plugins : yes Use external capture sources : yes Use Lua library : no Build Qt RTP player : no Build GTK+ RTP player : no Build profile binaries : no Use pcap library : yes Use zlib library : yes Use kerberos library : no Use c-ares library : no (name resolution will be disabled) Use SMI MIB library : no Use GNU gcrypt library : yes Use SSL crypto library : no Use GnuTLS library : no Use POSIX capabilities library : yes Use GeoIP library : no Use libssh library : no Have ssh_userauth_agent : no Use nl library : no Use SBC codec library : no

This is the output of $make -C plugins:

make: Entering directory '/root/wireshark/plugins'
…
Making all in mate
make[1]: Entering directory '/root/wireshark/plugins/mate'
gcc -g -O2    ../../tools/lemon/lemon.c   -o ../../tools/lemon/lemon
../../tools/lemon/lemon.c:10:20: fatal error: config.h: No such file or directory
compilation terminated.
<builtin>: recipe for target '../../tools/lemon/lemon' failed
make[1]: *** [../../tools/lemon/lemon] Error 1
make[1]: Leaving directory '/root/wireshark/plugins/mate'
Makefile:564: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
make: Leaving directory '/root/wireshark/plugins'

Any ideas on what’s wrong and how to fix?

asked 28 Apr ‘16, 05:54

embr's gravatar image

embr
11115
accept rate: 0%

edited 28 Apr ‘16, 05:57


2 Answers:

1

It seems you need to make lemon first:

make -C tools/lemon

I'll submit a change so that's not necessary.

answered 28 Apr '16, 07:48

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

(28 Apr '16, 07:52) JeffMorriss ♦

I am currently in the process of compiling wireshark (which, I figure, includes tools/lemon). Once it finishes I'll clean it and try again by making lemon alone.

(28 Apr '16, 07:52) embr

Ok, I'm still having trouble compiling my custom plugin, but I'm now a step closer. Thanks for the help.

(28 Apr '16, 08:21) embr

1
  1. You should not build this (or any) package as root
  2. build wireshark proper, before going into building plugins

answered 28 Apr '16, 07:24

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

  1. Can you explain why? I am working on a VM built for the sole purpose of experimenting with wireshark plugins. If there is a technical reason why building packages as root is going to mess up the process I'd like to hear it.
(28 Apr '16, 07:42) embr

It's not going to mess up the process it's just a Really Bad Idea.

It's just a general rule: don't do anything as root unless it can't be done as a normal (non-root) user.

(28 Apr '16, 07:53) JeffMorriss ♦