RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1955659 - Feature: allow compilation of kvdo using clang with clang compiled kernels
Summary: Feature: allow compilation of kvdo using clang with clang compiled kernels
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: kmod-kvdo
Version: 9.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: vdo-internal
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-30 15:27 UTC by Nikolay Kichukov
Modified: 2022-01-23 02:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-23 02:03:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nikolay Kichukov 2021-04-30 15:27:08 UTC
Description of problem:
Allow kvdo to be compiled with clang and against clang compiled kernels. Ref:
https://www.kernel.org/doc/html/latest/kbuild/llvm.html


Version-Release number of selected component (if applicable): kvdo, unstable branch, ie - latest.


How reproducible:
Compile kernel 5.10.27 with clang and they try to compile kvdo kernel module.


Steps to Reproduce:
1. Compile your kernel 5.10.27 with clang
2. compile kvdo for clang:
make V=1 LLVM=1 -j1 -C /usr/src/linux M=/var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999


Actual results:
make: Entering directory '/usr/src/linux-5.10.27-gentoo'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)
make -f ./scripts/Makefile.build obj=/var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999 \
single-build= \
need-builtin=1 need-modorder=1
make -f ./scripts/Makefile.build obj=/var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds \
 \
need-builtin=1 \
need-modorder=1
  clang -Wp,-MMD,/var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/.buffer.o.d -nostdinc -isystem /usr/lib/llvm/11/bin/../../../../lib/clang/11.1.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Qunused-arguments -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -no-integrated-as -Werror=unknown-warning-option -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -mno-80387 -mstack-alignment=8 -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -mno-global-merge -Wno-unused-const-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare -fno-builtin-memset -Wframe-larger-than=400 -Wno-declaration-after-statement -DUDS_VERSION=\"8.1.0.231\" -I/var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds  -DMODULE  -DKBUILD_BASENAME='"buffer"' -DKBUILD_MODNAME='"uds"' -c -o /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/buffer.o /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/buffer.c
In file included from /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/buffer.c:26:
In file included from /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/memoryAlloc.h:28:
/var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/cpu.h:60:4: error: argument to '__builtin_prefetch' must be a constant integer
                        __builtin_prefetch(address, for_write);
                        ^                           ~~~~~~~~~
1 error generated.
make[2]: *** [scripts/Makefile.build:279: /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds/buffer.o] Error 1
make[1]: *** [scripts/Makefile.build:496: /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999/uds] Error 2
make: *** [Makefile:1810: /var/tmp/portage/sys-block/kvdo-9999/work/kvdo-9999] Error 2
make: Leaving directory '/usr/src/linux-5.10.27-gentoo'



Expected results:
Compile cleanly.


Additional info:
amd64 arch
clang 11.1.0
llvm 11.1.0
clang compiled kernel: 5.10.27

Comment 5 Andy Walsh 2022-01-23 02:03:58 UTC
We are not going to fix this in a RHEL release.  It should be fixed on the primary branch of our upstream projects on github.


Note You need to log in before you can comment on or make changes to this bug.