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] Build failing on SLES 11.2

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Mon, 22 Feb 2016 16:22:14 +0100
On Mon, Feb 22, 2016 at 11:52:41AM +0000, João Valverde wrote:
> On 22-02-2016 10:03, Peter Wu wrote:
> >CMake also checks whether the requested compiler is Clang which is
> >not done by the autotools script. It can also fail based on certain
> >strings in the cc output (besides just checking for a non-zero status
> >code).
> >
> >For now I think you have to add a check clang too before setting the flag.
> 
> Fine with me, but in that case we need a clang check that is more robust
> than AC_WIRESHARK_COMPILER_FLAGS_CHECK, not less.
> 
> I'd still like to understand what the failure is here.

Older versions of gcc report an exit code of 0 even if arguments are not
recognized:

    $ echo 'int main(){}' | gcc-4.3 -xc - -Qunused-arguments; echo $?
    gcc-4.3: unrecognized option '-Qunused-arguments'
    0

Note that the output posted by Anders are not errors, it is just a
diagnostic. Compare it to gcc 5.3:

    $ echo 'int main(){}' | gcc -xc - -Qunused-arguments; echo $?
    gcc: error: unrecognized command line option ‘-Qunused-arguments’
    1

As I mentioned before, CMake can also fail a test based on the
occurrence of the "unrecognized command line option" text. Somehow you
have to teach autotools the same.

Kind regards,
Peter

> >Kind regards,
> >Peter
> >https://lekensteyn.nl
> >(pardon my brevity, top-posting and formatting, sent from my phone)
> >
> >
> >On 22 February 2016 10:06:42 CET, "João Valverde" <joao.valverde@xxxxxxxxxxxxxxxxxx> wrote:
> >>
> >>
> >>On 22-02-2016 09:02, João Valverde wrote:
> >>>
> >>>
> >>>On 22-02-2016 08:55, Anders Broman wrote:
> >>>>Hi,
> >>>>
> >>>>A collegue is trying to build on SLES 11.2 but the build is failing
> >>with
> >>>>
> >>>>eth@linux-q645:~/plugin_dev/
> >>>><mailto:eth@linux-q645:~/plugin_dev/OneWireshark2.10/trunk> > make
> >>>>
> >>>>/usr/bin/perl ./make-version.pl .
> >>>>
> >>>>Version configuration file version.conf not found.  Using defaults.
> >>>>
> >>>>version.h has been updated.
> >>>>
> >>>>make  all-recursive
> >>>>
> >>>>make[1]: Entering directory `/home/eth/plugin_dev/ '
> >>>>
> >>>>Making all in tools
> >>>>
> >>>>make[2]: Entering directory `/home/eth/plugin_dev/ /tools'
> >>>>
> >>>>Making all in lemon
> >>>>
> >>>>make[3]: Entering directory `/home/eth/plugin_dev/ tools/lemon'
> >>>>
> >>>>    CC     lemon-lemon.o
> >>>>
> >>>>gcc: unrecognized option '-Qunused-arguments'
> >>>>
> >>>>this is on a trunk version from sometime last week. Ideas?
> >>>
> >>>See
> >>>
> >>https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3ce0e60b43770543bc5bdd4c9fdf5c1d2f6e134e
> >>
> >>I'm assuming the configure script is not performing this test correctly
> >>
> >>on your colleague's machine. Checking config.log for clues might be
> >>helpful.
> >>
> >>>
> >>>
> >>>>
> >>>>Best regards
> >>>>
> >>>>Anders
> >>>>
> >>>>
> >>>>
> >>>>
> >>___________________________________________________________________________
> >>>>
> >>>>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@xxxxxxxxxxxxx?subject=unsubscribe
> >>>>
> >>>
> >>___________________________________________________________________________
> >>>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@xxxxxxxxxxxxx?subject=unsubscribe
> >>>
> >>___________________________________________________________________________
> >>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@xxxxxxxxxxxxx?subject=unsubscribe
> >
> ___________________________________________________________________________
> 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@xxxxxxxxxxxxx?subject=unsubscribe

-- 
Kind regards,
Peter Wu
https://lekensteyn.nl