All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] ltp build broken on Fedora 40?
Date: Thu, 29 Aug 2024 00:48:50 +0200	[thread overview]
Message-ID: <20240828224850.GA1773775@pevik> (raw)
In-Reply-To: <5295D578-7B15-4613-A1FA-41A425E992FA@oracle.com>

Hi Chuck,

> Hi-

> I'm finding that ltp 20240524 does not build on Fedora 40 due
> to a missing header:

I guess you need to backport gcc-14 fix b0ae1ee239 ("rpc_svc_1: Fix incompatible
pointer type error") [1] (or build with older gcc).

> ltp/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c:46:10: fatal error: linux/genhd.h: No such file or directory
>    46 | #include <linux/genhd.h>
>       |          ^~~~~~~~~~~~~~~
> compilation terminated.

Yes, <linux/genhd.h> was removed back then in v5.18-rc1 [2] (we should use
<linux/blkdev.h>). But that should not cause your build fail. But because we
don't maintain these kernel drivers (there was a plan to move them to kunit
anyway), the build error is ignored [3]:

	# Ignoring the exit status of commands is done to be forward compatible with
	# kernel internal API changes. The user-space test will return TCONF, if it
	# doesn't find the module (i.e. it wasn't built either due to kernel-devel
	# missing or module build failure).
	%.ko: %.c .dep_modules ;

With properly installed kernel headers (WITH_MODULES = yes in
include/mk/config.mk) I get:

$ cd testcases/kernel/device-drivers/acpi
$ make; echo $?
make -C "ltp/lib" -f "ltp/lib/Makefile" all
make[1]: Entering directory 'ltp/lib'
GEN ltp-version.h
make[2]: Nothing to be done for 'all'.
make[2]: Nothing to be done for 'all'.
make[1]: Leaving directory 'ltp/lib'
CC testcases/kernel/device-drivers/acpi/ltp_acpi
Building modules: ltp_acpi_cmds.c
make -C /lib/modules/6.10.6-amd64/build M=ltp/testcases/kernel/device-drivers/acpi
make[1]: Entering directory '/usr/src/linux-headers-6.10.6-amd64'
  CC [M]  ltp/testcases/kernel/device-drivers/acpi/ltp_acpi_cmds.o
ltp/testcases/kernel/device-drivers/acpi/ltp_acpi_cmds.c:39:10: fatal error: linux/genhd.h: No such file or directory
   39 | #include <linux/genhd.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-headers-6.10.6-common/scripts/Makefile.build:249: ltp/testcases/kernel/device-drivers/acpi/ltp_acpi_cmds.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.10.6-common/Makefile:1943: ltp/testcases/kernel/device-drivers/acpi] Error 2
make[1]: *** [/usr/src/linux-headers-6.10.6-common/Makefile:252: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.10.6-amd64'
make: [../../../../include/mk/module.mk:62: .dep_modules] Error 2 (ignored)
=> note "ignored"
rm -rf *.mod.c *.o *.ko.unsigned modules.order .tmp* .*.ko .*.cmd Module.symvers
0

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/commit/b0ae1ee2392d0612cce7d61842b78640a04b26f0
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=322cbb50de711814c42fb088f6d31901502c711a
[3] https://github.com/linux-test-project/ltp/blob/master/include/mk/module.mk#L54-L58

> However the ltp build works on Fedora 39. I'm not sure why
> because I cannot find a linux/genhd.h on that system.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-08-28 22:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 20:00 [LTP] ltp build broken on Fedora 40? Chuck Lever III via ltp
2024-08-28 22:48 ` Petr Vorel [this message]
2024-08-29 20:14   ` Chuck Lever III via ltp
2024-08-29 20:50     ` Petr Vorel
2024-08-29 21:23       ` Chuck Lever III via ltp
2024-08-30  2:10         ` Li Wang
2024-09-03  7:24         ` Petr Vorel
2024-09-03 13:42           ` Chuck Lever III via ltp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240828224850.GA1773775@pevik \
    --to=pvorel@suse.cz \
    --cc=chuck.lever@oracle.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.