lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Jul 2022 10:07:29 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jamal Hadi Salim <jhs@...atatu.com>
Cc:     Petr Machata <petrm@...dia.com>, David Ahern <dsahern@...il.com>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: Report: iproute2 build broken?

On Mon, 4 Jul 2022 11:51:39 -0400
Jamal Hadi Salim <jhs@...atatu.com> wrote:

> I have to admit i am being lazy here digging into the
> root cause but normally iproute2 should just build
> standalone regardless especially when it is a stable
> version:
> 
> $ cat include/version.h
> static const char version[] = "5.18.0";
> 
> $make
> ..
> ....
> .....
>   CC       iplink_bond.o
> iplink_bond.c:935:10: error: initializer element is not constant
>   .desc = ipstats_stat_desc_bond_tmpl_lacp,
>           ^
> iplink_bond.c:935:10: note: (near initialization for
> ‘ipstats_stat_desc_xstats_bond_lacp.desc’)
> iplink_bond.c:957:10: error: initializer element is not constant
>   .desc = ipstats_stat_desc_bond_tmpl_lacp,
>           ^
> iplink_bond.c:957:10: note: (near initialization for
> ‘ipstats_stat_desc_xstats_slave_bond_lacp.desc’)
> ../config.mk:40: recipe for target 'iplink_bond.o' failed
> make[1]: *** [iplink_bond.o] Error 1
> Makefile:77: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> There's more if you fix that one given a whole lot
> of dependencies
> 
> cheers,
> jamal


Fixed in main by:


commit 11e41a635cfab54e8e02fbff2a03715467e77ae9
Author: Petr Machata <petrm@...dia.com>
Date:   Tue May 31 13:35:48 2022 +0200

    ip: Convert non-constant initializers to macros
    
    As per the C standard, "expressions in an initializer for an object that
    has static or thread storage duration shall be constant expressions".
    Aggregate objects are not constant expressions. Newer GCC doesn't mind, but
    older GCC and LLVM do.
    
    Therefore convert to a macro. And since all these macros will look very
    similar, extract a generic helper, IPSTATS_STAT_DESC_XSTATS_LEAF, which
    takes the leaf name as an argument and initializes the rest as appropriate
    for an xstats descriptor.
    
    Reported-by: Stephen Hemminger <stephen@...workplumber.org>
    Signed-off-by: Petr Machata <petrm@...dia.com>
    Reviewed-by: Ido Schimmel <idosch@...dia.com>
    Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ