Wireshark-dev: Re: [Wireshark-dev] Mac Build Error
From: David Morsberger <[email protected]>
Date: Wed, 20 Jan 2016 15:41:37 -0500

On Wed, Jan 20, 2016 at 3:22 PM, Guy Harris <[email protected]> wrote:
On Jan 20, 2016, at 11:09 AM, David Morsberger <[email protected]> wrote:

> This is what I am also tracking down. It has to do with the way cmake is instantiating the compiler. The --serialized-diagnostics option is what appears to be hiding the error.

--serialize-diagnostics takes an argument, which is the name of a file to which the diagnostics are written, in a binary format.

Yes, there is a binary .dia file generated and I cannot find any information on the format or tools to read it.

Clang documentation sucks.  Srsly.  The man page doesn't enumerate the -W options; the website:


does, but I'm not sure how to get the manual for an *arbitrary* version of Clang (the GCC folks are kind enough to provide online manuals, complete with listings of compiler flags, for multiple versions), and the word "serialize" appears nowhere on that page.

Welcome to my world :) I've searched all over for information and searched my filesystem for any reference to it.

It might be that, when the tests are done, ld is being run directly, rather than by the gcc/clang driver, and that -as-needed isn't getting passed to it.  It obviously is getting passed when the actual *build* is done.

I may ask the gcc/clang team why the different behavior when --serialized argument is and is not used.

Perhaps when CMake was being designed, its designers should have looked at the documentation for another configuration system - I think it's called "autoconf" or something such as that - and noticed that it offered not only macros to try compiling a file ("compiling" as in "turning a source file into an object file, without trying to link anything"), but macros to try *linking* things, which can come in handy if, say, to pick a purely *hypothetical* example, you're trying to see whether a given linker flag works.

Think of how "boring" life would be if there was only one way of doing things.

Or perhaps they mistakenly had the attitude that "we take care of all the platform details, so you don't have to".

I WILL find out how they take care of the platform details.