Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Help to build Wireshark

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 24 May 2007 09:32:14 -0700
bruno.mor@xxxxxxxxxxx wrote:

But, as i sayed in the last message, when i do "make", a amazing number of
warning are wrotten.
It's a matter for me, because i would like to change the wireshark code, and
i never can do that, if i can't see my errors when i compile ( for yet i
can't see my errors because of the amazing number of warning).
So, how people do to change wireshark code, does they use a special code
wittrer environnement ?????

I tend to filter out "dissect_.*defined but not used" with grep, and the number of warnings that remain is small enough that I can usually find the warnings.

This is especially true if you've modified your dissector after a complete compile of Wireshark, so that most of the warnings don't show up because a re-"make" won't compile most of the files.

We're currently working on trying to use "-Werror" for as many source files as we can, and removing the warnings. Unfortunately, as per my other mail, currently some files generated from ASN.1 files have a *LOT* of warnings (those are the "dissect_.*defined but not used" warnings I filter out), so you still get warnings; however, if you list your dissector as one of the "clean" dissectors, so that it's compiled with -Werror, the compile will stop if you have warnings.

My other matter, it's that now i can build wireshark as it sayed when i do
"./configuration" but i wait 10 min for the end of the "make" execution but
it was not enough.
It is normal that i need to wait more than 10 min to compile wireshark ???

If your machine isn't fast enough to compile and link 1.8 million lines of code into one medium-sized shared library, one really big shared library, and several applications including one GUI-based application that links with both of those shared libraries, in 10 minutes or less:

  $ wc -l `find . -name '*.[ch]' -print | egrep -v 'asn1/'` | tail -1
   1821102 total

then, yes, it's normal that you need to wait more than 10 minutes to compile Wireshark from scratch.

And even if you're recompiling after you've changed your dissector, so that most of those lines of code aren't recompiled, the really big shared library still needs to be relinked (unless your dissector is a plugin).