Skip to content

make -j3 binrpm-pkg fails on CentOS9 with unknown type name 'bool' in C90 or gnu=89 #33

@qw3r3wq

Description

@qw3r3wq

Hi, using testing or mainline release

config from: /boot/config-5.14.0-452.el9.x86_64

executing: make -j3 binrpm-pkg

modules enabled:
112 scripts/config -m TCP_CONG_PRAGUE
113 scripts/config -m NET_SCH_DUALPI2
114 scripts/config -m TCP_CONG_DCTCP
115 scripts/config -m TCP_CONG_BBR2
116 history
117 scripts/config --set-str CONFIG_LOCALVERSION "-prague-20240610"

linux-mainline-build]$ make -j3 binrpm-pkg
make -f ./Makefile
  DESCEND objtool
  DESCEND bpf/resolve_btfids
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  HDRTEST usr/include/linux/inet_diag.h
In file included from <command-line>:
./usr/include/linux/inet_diag.h:244:9: error: unknown type name ‘bool’
  244 |         bool    prague_enabled;
      |         ^~~~
make[4]: *** [usr/include/Makefile:106: usr/include/linux/inet_diag.hdrtest] Error 1
make[3]: *** [scripts/Makefile.build:552: usr/include] Error 2
make[2]: *** [Makefile:1898: usr] Error 2
make[2]: *** Waiting for unfinished jobs....
  CHK     kernel/kheaders_data.tar.xz
make[1]: *** [scripts/Makefile.package:66: binrpm-pkg] Error 2
make: *** [Makefile:1606: binrpm-pkg] Error 2

After adding #include <stdbool.h> to usr/include/linux/inet_diag.h

Got errors with

make[3]: *** No rule to make target 'certs/rhel.pem', needed by 'certs/x509_certificate_list'.  Stop.

That is due to copied */boot/config ** solved by:

scripts/config -s CONFIG_SYSTEM_TRUSTED_KEY ""
scripts/config -s CONFIG_MODULE_SIG_KEY ""

Now I see some errors with:

  CC      net/ipv4/inet_connection_sock.o
net/ipv4/inet_connection_sock.c: In function ‘inet_rtx_syn_ack’:
net/ipv4/inet_connection_sock.c:692:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  692 |         int err = req->rsk_ops->rtx_syn_ack(parent, req);
      |         ^~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:289: net/ipv4/inet_connection_sock.o] Error 1
make[3]: *** [scripts/Makefile.build:552: net/ipv4] Error 2

I have moved int err; before the function and it worked.

In general the main error, is that CentOS9 use C90 / std=gnu89 and your code is using newer C version, you should specify it in Makefile? Or other place?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions