Skip to content

ZFS failing to compile inline against 5.12.4-gentoo kernel #12056

Closed
@thehaven

Description

@thehaven

System information

Type Version/Name
Distribution Name Gentoo
Distribution Version 17.1
Linux Kernel 5.12.4-gentoo
Architecture x86_64
ZFS Version 7457b02 (HEAD)
SPL Version

Describe the problem you're observing

Compling ZFS as builtin to the 5.12.4 kernel is failing.

Describe how to reproduce the problem

Compiling ZFS into the kernel using this script:

GCC version is 11.1.0

Include any warning/errors/backtraces from the system logs

Kernel build error (second run to highlight the issue):

builder /usr/src/linux # make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  CC      fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.o
In file included from <command-line>:
./include/linux/compiler-gcc.h:39:66: error: pasting ")" and "6" does not give a valid preprocessing token
   39 | #define __noretpoline __attribute__((__indirect_branch__("keep")))
      |                                                                  ^
././include/linux/compiler_types.h:59:23: note: in definition of macro ‘___PASTE’
   59 | #define ___PASTE(a,b) a##b
      |                       ^
./include/linux/init.h:201:9: note: in expansion of macro ‘__PASTE’
  201 |         __PASTE(__iid, id))))
      |         ^~~~~~~
./include/linux/init.h:255:17: note: in expansion of macro ‘__initcall_name’
  255 |                 __initcall_name(initcall, __iid, id),           \
      |                 ^~~~~~~~~~~~~~~
./include/linux/init.h:259:9: note: in expansion of macro ‘__unique_initcall’
  259 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
      |         ^~~~~~~~~~~~~~~~~
././include/linux/compiler_types.h:60:22: note: in expansion of macro ‘___PASTE’
   60 | #define __PASTE(a,b) ___PASTE(a,b)
      |                      ^~~~~~~~
./include/linux/init.h:189:9: note: in expansion of macro ‘__PASTE’
  189 |         __PASTE(__KBUILD_MODNAME,                               \
      |         ^~~~~~~
././include/linux/compiler_types.h:60:22: note: in expansion of macro ‘___PASTE’
   60 | #define __PASTE(a,b) ___PASTE(a,b)
      |                      ^~~~~~~~
./include/linux/init.h:190:9: note: in expansion of macro ‘__PASTE’
  190 |         __PASTE(__,                                             \
      |         ^~~~~~~
././include/linux/compiler_types.h:60:22: note: in expansion of macro ‘___PASTE’
   60 | #define __PASTE(a,b) ___PASTE(a,b)
      |                      ^~~~~~~~
./include/linux/init.h:191:9: note: in expansion of macro ‘__PASTE’
  191 |         __PASTE(__COUNTER__,                                    \
      |         ^~~~~~~
././include/linux/compiler_types.h:60:22: note: in expansion of macro ‘___PASTE’
   60 | #define __PASTE(a,b) ___PASTE(a,b)
      |                      ^~~~~~~~
./include/linux/init.h:192:9: note: in expansion of macro ‘__PASTE’
  192 |         __PASTE(_,                                              \
      |         ^~~~~~~
././include/linux/compiler_types.h:60:22: note: in expansion of macro ‘___PASTE’
   60 | #define __PASTE(a,b) ___PASTE(a,b)
      |                      ^~~~~~~~
./include/linux/init.h:193:9: note: in expansion of macro ‘__PASTE’
  193 |         __PASTE(__LINE__,                                       \
      |         ^~~~~~~
./include/linux/init.h:10:27: note: in expansion of macro ‘__noretpoline’
   10 | #define __noinitretpoline __noretpoline
      |                           ^~~~~~~~~~~~~
./include/linux/init.h:50:74: note: in expansion of macro ‘__noinitretpoline’
   50 | #define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
      |                                                                          ^~~~~~~~~~~~~~~~~
././include/linux/compiler_types.h:59:23: note: in expansion of macro ‘__init’
   59 | #define ___PASTE(a,b) a##b
      |                       ^
././include/linux/compiler_types.h:60:22: note: in expansion of macro ‘___PASTE’
   60 | #define __PASTE(a,b) ___PASTE(a,b)
      |                      ^~~~~~~~
./include/linux/init.h:194:9: note: in expansion of macro ‘__PASTE’
  194 |         __PASTE(_, fn))))))
      |         ^~~~~~~
./include/linux/init.h:259:42: note: in expansion of macro ‘__initcall_id’
  259 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
      |                                          ^~~~~~~~~~~~~
./include/linux/init.h:261:35: note: in expansion of macro ‘___define_initcall’
  261 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
      |                                   ^~~~~~~~~~~~~~~~~~
./include/linux/init.h:290:41: note: in expansion of macro ‘__define_initcall’
  290 | #define device_initcall(fn)             __define_initcall(fn, 6)
      |                                         ^~~~~~~~~~~~~~~~~
./include/linux/init.h:295:24: note: in expansion of macro ‘device_initcall’
  295 | #define __initcall(fn) device_initcall(fn)
      |                        ^~~~~~~~~~~~~~~
./include/linux/module.h:86:25: note: in expansion of macro ‘__initcall’
   86 | #define module_init(x)  __initcall(x);
      |                         ^~~~~~~~~~
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:267:1: note: in expansion of macro ‘module_init’
  267 | module_init(_init);
      | ^~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:271: fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.o] Error 1
make[2]: *** [scripts/Makefile.build:514: fs/zfs/zfs] Error 2
make[1]: *** [scripts/Makefile.build:514: fs/zfs] Error 2
make: *** [Makefile:1851: fs] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Triage NeededNew issue which needs to be triagedType: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions