Skip to content

frr: build compile errors #29885

Description

@vochong

Package Name

frr

Maintainer

@lucize

OpenWrt Version

SNAPSHOT

OpenWrt Target/Subtarget

qualcommax/ipq807x

Steps to Reproduce

CONFIG_PACKAGE_frr=y
CONFIG_FRR_OPENSSL=y
# CONFIG_FRR_INTERNAL is not set
CONFIG_FRR_SNMP=y
# CONFIG_FRR_NO_SNMP is not set
CONFIG_PACKAGE_frr-babeld=y
CONFIG_PACKAGE_frr-bfdd=y
CONFIG_PACKAGE_frr-bgpd=y
CONFIG_PACKAGE_frr-eigrpd=y
CONFIG_PACKAGE_frr-fabricd=y
CONFIG_PACKAGE_frr-isisd=y
CONFIG_PACKAGE_frr-ldpd=y
CONFIG_PACKAGE_frr-nhrpd=y
CONFIG_PACKAGE_frr-ospf6d=y
CONFIG_PACKAGE_frr-ospfd=y
CONFIG_PACKAGE_frr-pathd=y
CONFIG_PACKAGE_frr-pbrd=y
CONFIG_PACKAGE_frr-pim6d=y
CONFIG_PACKAGE_frr-pimd=y
CONFIG_PACKAGE_frr-pythontools=y
CONFIG_PACKAGE_frr-ripd=y
CONFIG_PACKAGE_frr-ripngd=y
CONFIG_PACKAGE_frr-staticd=y
CONFIG_PACKAGE_frr-vrrpd=y
CONFIG_PACKAGE_frr-watchfrr=y
CONFIG_PACKAGE_frr-zebra=y

Actual Behaviour

FRR build errors:

OpenWrt-libtool: compile:  aarch64-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -DCONFDATE=0 -I. -I./lib/assert -I. -I./include -I./lib -I. -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.4.0_musl/usr/include -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.4.0_musl/include -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.4.0_musl/include/fortify -fms-extensions -fno-omit-frame-pointer -funwind-tables -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-enum -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wundef -Wimplicit-fallthrough -Wshadow -Wmissing-noreturn -Wformat-extra-args -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wno-error=deprecated-declarations -Waddress-of-packed-member -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/target-aarch64_cortex-a53_musl/usr/include -O2 -pipe -mcpu=cortex-a53+crc+crypto -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/owrt/.owrt/openwrt-nss-edma/build_dir/target-aarch64_cortex-a53_musl/net-snmp-nossl/net-snmp-5.9.5.2=net-snmp-5.9.5.2 -ffunction-sections -fdata-sections -Wl,-z,max-page-size=4096 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wl,-z,pack-relative-relocs -DPIC -fPIC -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -Werror=declaration-after-statement -O2 -pipe -mcpu=cortex-a53+crc+crypto -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/owrt/.owrt/openwrt-nss-edma/build_dir/target-aarch64_cortex-a53_musl/net-snmp-nossl/net-snmp-5.9.5.2=net-snmp-5.9.5.2 -ffunction-sections -fdata-sections -Wl,-z,max-page-size=4096 -Wformat -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wl,-z,pack-relative-relocs -DPIC -fPIC -Ulinux -Dlinux=linux -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.4.0_musl/usr/include -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.4.0_musl/include -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.4.0_musl/include/fortify -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/target-aarch64_cortex-a53_musl/usr/include/libnl-tiny -I/home/owrt/.owrt/openwrt-nss-edma/staging_dir/target-aarch64_cortex-a53_musl/usr/include -std=gnu11 -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/owrt/.owrt/openwrt-nss-edma/build_dir/target-aarch64_cortex-a53_musl/frr-frr-10.6.1=frr-frr-10.6.1 -flto=auto -fno-fat-lto-objects -Wl,-z,max-page-size=4096 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wl,-z,pack-relative-relocs -c bgpd/bgp_snmp_bgp4.c  -fPIC -DPIC -o bgpd/.libs/bgpd_snmp_la-bgp_snmp_bgp4.o
cc1: note: someone does not honour COPTS correctly, passed 3 times
In file included from ./lib/xref.h:14,
                 from ./lib/assert/assert.h:20,
                 from ./lib/zebra.h:74,
                 from bgpd/bgp_snmp_bgp4.c:6:
./bgpd/bgp_route.h: In function 'bgp_pi_hash_add':
./lib/typesafe.h:887:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  887 |         uint32_t hval = hashfn(item), hbits = HASH_KEY(h->hh, hval);           \
      |         ^~~~~~~~
./bgpd/bgp_route.h:749:1: note: in expansion of macro 'DECLARE_HASH'
  749 | DECLARE_HASH(bgp_pi_hash, struct bgp_path_info, pi_hash_link, bgp_pi_hash_cmp, bgp_pi_hash_hashfn);
      | ^~~~~~~~~~~~
./lib/typesafe.h:889:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  889 |         struct thash_item **np = &h->hh.entries[hbits];                        \
      |         ^~~~~~
./bgpd/bgp_route.h:749:1: note: in expansion of macro 'DECLARE_HASH'
  749 | DECLARE_HASH(bgp_pi_hash, struct bgp_path_info, pi_hash_link, bgp_pi_hash_cmp, bgp_pi_hash_hashfn);
      | ^~~~~~~~~~~~
./bgpd/bgp_route.h: In function 'bgp_pi_hash_const_find':
./lib/typesafe.h:910:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  910 |         uint32_t hval = hashfn(item), hbits = HASH_KEY(h->hh, hval);           \
      |         ^~~~~~~~
./bgpd/bgp_route.h:749:1: note: in expansion of macro 'DECLARE_HASH'
  749 | DECLARE_HASH(bgp_pi_hash, struct bgp_path_info, pi_hash_link, bgp_pi_hash_cmp, bgp_pi_hash_hashfn);
      | ^~~~~~~~~~~~
./bgpd/bgp_route.h: In function 'bgp_pi_hash_del':
./lib/typesafe.h:926:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  926 |         uint32_t hval = item->field.hi.hashval, hbits = HASH_KEY(h->hh, hval); \
      |         ^~~~~~~~
./bgpd/bgp_route.h:749:1: note: in expansion of macro 'DECLARE_HASH'
  749 | DECLARE_HASH(bgp_pi_hash, struct bgp_path_info, pi_hash_link, bgp_pi_hash_cmp, bgp_pi_hash_hashfn);
      | ^~~~~~~~~~~~
./bgpd/bgp_route.h: In function 'bgp_pi_hash_const_next':
./lib/typesafe.h:986:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  986 |         uint32_t i = HASH_KEY(h->hh, hitem->hashval) + 1;                      \
      |         ^~~~~~~~
./bgpd/bgp_route.h:749:1: note: in expansion of macro 'DECLARE_HASH'
  749 | DECLARE_HASH(bgp_pi_hash, struct bgp_path_info, pi_hash_link, bgp_pi_hash_cmp, bgp_pi_hash_hashfn);
      | ^~~~~~~~~~~~
./bgpd/bgp_route.h: In function 'bgp_pi_hash_member':
./lib/typesafe.h:1008:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 1008 |         uint32_t hval = item->field.hi.hashval, hbits = HASH_KEY(h->hh, hval); \
      |         ^~~~~~~~
./bgpd/bgp_route.h:749:1: note: in expansion of macro 'DECLARE_HASH'
  749 | DECLARE_HASH(bgp_pi_hash, struct bgp_path_info, pi_hash_link, bgp_pi_hash_cmp, bgp_pi_hash_hashfn);
      | ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [Makefile:11532: bgpd/bgpd_snmp_la-bgp_snmp_bgp4.lo] Error 1
make[4]: Leaving directory '/home/owrt/.owrt/openwrt-nss-edma/build_dir/target-aarch64_cortex-a53_musl/frr-frr-10.6.1'
make[3]: *** [Makefile:6740: all] Error 2
make[3]: Leaving directory '/home/owrt/.owrt/openwrt-nss-edma/build_dir/target-aarch64_cortex-a53_musl/frr-frr-10.6.1'
make[2]: *** [Makefile:233: /home/owrt/.owrt/openwrt-nss-edma/build_dir/target-aarch64_cortex-a53_musl/frr-frr-10.6.1/.built] Error 2
make[2]: Leaving directory '/home/owrt/.owrt/openwrt-nss-edma/feeds/packages/net/frr'
time: package/feeds/packages/frr/compile#203.88#23.87#134.43
    ERROR: package/feeds/packages/frr failed to build.
make[1]: *** [package/Makefile:198: package/feeds/packages/frr/compile] Error 1
make[1]: Leaving directory '/home/owrt/.owrt/openwrt-nss-edma'
make: *** [/home/owrt/.owrt/openwrt-nss-edma/include/toplevel.mk:233: package/feeds/packages/frr/compile] Error 2

Confirmation Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions