Mailing List Archive

building drbd-9.1.7-rc.1
Hello,

I am trying to build drbd-9.1.7-rc.1 on Slackware 15.0 with kernel 5.15.28 with gcc (GCC) 11.2.0 and I get the following.

Calling toplevel makefile of kernel source tree, which I believe is in
KDIR=/lib/modules/5.15.28/source

make -C /lib/modules/5.15.28/source O=/lib/modules/5.15.28/build M=/root/tp/drbd-9.1.7-rc.1/drbd modules
CC [M] /root/tp/drbd-9.1.7-rc.1/drbd/drbd_dax_pmem.o
/root/tp/drbd-9.1.7-rc.1/drbd/drbd_dax_pmem.c: In function ‘drbd_dax_open’:
/root/tp/drbd-9.1.7-rc.1/drbd/drbd_dax_pmem.c:66:19: error: implicit declaration of function ‘dax_get_by_host’ [-Werror=implicit-function-declaration]
66 | dax_dev = dax_get_by_host(disk_name);
| ^~~~~~~~~~~~~~~
/root/tp/drbd-9.1.7-rc.1/drbd/drbd_dax_pmem.c:66:17: warning: assignment to ‘struct dax_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
66 | dax_dev = dax_get_by_host(disk_name);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /root/tp/drbd-9.1.7-rc.1/drbd/drbd_dax_pmem.o] Error 1
make[1]: *** [Makefile:1868: /root/tp/drbd-9.1.7-rc.1/drbd] Error 2
make: *** [Makefile:132: kbuild] Error 2

Should I attempt to disable -Werror=implicit-function-declaration or not?
I tried with CFLAGS="-Wno-error" for testing but I still got the same build error.

What to do?

Thank you

BR
--
Pierre-Philipp Braun
SMTP Health Campaign: enforce STARTTLS and verify MX certificates
<https://nethence.com/smtp/>
_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user
Re: building drbd-9.1.7-rc.1 [ In reply to ]
On 12/03/2022 10:28, Pierre-Philipp Braun wrote:
> Should I attempt to disable -Werror=implicit-function-declaration or not?
> I tried with CFLAGS="-Wno-error" for testing but I still got the same
> build error.

As nobody is answering I answer to myself. So I learn the hard way that
I need to carefully check ChangeLog of latest DRBD kernel module release
before trying to build it. Latest officially supported Linux kernel
version for v9.1.x was and still is 5.15, so it was irrelevant to try
and build it on 5.16.

At least it's mentioned in the 9.1.7 ChangeLog

* following upstream changes to DRBD up to Linux 5.15 and updated compat

Otherwise one probably needs to figure out which Linux version is
supported by other means, maybe by checking what kernel version latest
supported RHEL and Ubuntu distributions have.

HTH
--
Pierre-Philipp Braun
SMTP Health Campaign: enforce STARTTLS and verify MX certificates
<https://nethence.com/smtp/>
_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user