openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.57k stars 1.74k forks source link

kernel linux 6.10.3 build error #16433

Closed wmmur closed 2 months ago

wmmur commented 2 months ago

System information

Type Version/Name
Distribution Name Devuan(Debian)
Distribution Version testing/sysvinit
Kernel Version 6.10.3-amd64 and 6.10.3.1-rt-amd64
Architecture x86_64
OpenZFS Version zfs-2.2.5 and zfs-2.2.99

Describe the problem you're observing

error: macro "__assign_str" passed 2 arguments, but takes just 1 65 | ); | ^~
during ~standard~ (i using META CDDL->GPL) dkms compilation in devuan(debian) system when installing linux kernel 6.10.3-amd64 and linux-6.10/3-rt-amd64 kernel

make.log:

In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:419, from /usr/src/linux-headers-6.10.3-common-rt/include/trace/define_trace.h:102, from /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:80, from /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/trace.c:44: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:65:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 65 ); ^~
In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:375: /usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h: In function ‘trace_event_raw_event_zfs_dprintf_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:62:13: error: ‘__assign_str’ undeclared (first use in this function) 62 __assign_str(msg, msg); ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:402:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 402 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:61:9: note: in expansion of macro ‘TP_fast_assign’ 61 TP_fast_assign( ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:62:13: note: each undeclared identifier is reported only once for each function it appears in 62 __assign_str(msg, msg); ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:402:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 402 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:61:9: note: in expansion of macro ‘TP_fast_assign’ 61 TP_fast_assign( ^~~~~~ In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:75, from /usr/src/linux-headers-6.10.3-common-rt/include/trace/define_trace.h:103: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:65:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 65 ); ^~
In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:7: /usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h: In function ‘perf_trace_zfs_dprintf_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:62:13: error: ‘__assign_str’ undeclared (first use in this function) 62 __assign_str(msg, msg); ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:51:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 51 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbgmsg.h:61:9: note: in expansion of macro ‘TP_fast_assign’ 61 TP_fast_assign( ^~~~~~ In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:419, from /usr/src/linux-headers-6.10.3-common-rt/include/trace/define_trace.h:102, from /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:158, from /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/trace.c:45: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:113:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 113 ); ^~
In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:375: /usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:113:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 113 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:113:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 113 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
CC [M] /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/zfs_dir.o CC [M] /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/zfs_file_os.o CC [M] /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/zfs_ioctl_os.o /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: In function ‘trace_event_raw_event_zfs_dbuf_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:64:25: error: ‘__assign_str’ undeclared (first use in this function) 64 __assign_str(os_spa, \ ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:402:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 402 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:111:9: note: in expansion of macro ‘TP_fast_assign’ 111 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:111:24: note: in expansion of macro ‘DBUF_TP_FAST_ASSIGN’ 111 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:121:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 121 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:121:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 121 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:121:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 121 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: In function ‘trace_event_raw_event_zfs_dbuf_state_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:64:25: error: ‘__assign_str’ undeclared (first use in this function) 64 __assign_str(os_spa, \ ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:402:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 402 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:119:9: note: in expansion of macro ‘TP_fast_assign’ 119 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:119:24: note: in expansion of macro ‘DBUF_TP_FAST_ASSIGN’ 119 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:143:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 143 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:143:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 143 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:143:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 143 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: In function ‘trace_event_raw_event_zfs_dbuf_evict_one_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:64:25: error: ‘__assign_str’ undeclared (first use in this function) 64 __assign_str(os_spa, \ ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/trace_events.h:402:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 402 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:141:9: note: in expansion of macro ‘TP_fast_assign’ 141 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:141:24: note: in expansion of macro ‘DBUF_TP_FAST_ASSIGN’ 141 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~~ In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:75, from /usr/src/linux-headers-6.10.3-common-rt/include/trace/define_trace.h:103: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:113:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 113 ); ^~
In file included from /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:7: /usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:113:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 113 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:113:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 113 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: In function ‘perf_trace_zfs_dbuf_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:64:25: error: ‘__assign_str’ undeclared (first use in this function) 64 __assign_str(os_spa, \ ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:51:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 51 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:111:9: note: in expansion of macro ‘TP_fast_assign’ 111 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:111:24: note: in expansion of macro ‘DBUF_TP_FAST_ASSIGN’ 111 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:121:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 121 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:121:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 121 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:121:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 121 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: In function ‘perf_trace_zfs_dbuf_state_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:64:25: error: ‘__assign_str’ undeclared (first use in this function) 64 __assign_str(os_spa, \ ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:51:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 51 { assign; } \ ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:119:9: note: in expansion of macro ‘TP_fast_assign’ 119 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:119:24: note: in expansion of macro ‘DBUF_TP_FAST_ASSIGN’ 119 TP_fast_assign(DBUF_TP_FAST_ASSIGN), ^~~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: At top level: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:143:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 143 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:143:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 143 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \
/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:143:1: error: macro "__assign_str" passed 2 arguments, but takes just 1 143 ); ^~
/usr/src/linux-headers-6.10.3-common-rt/include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here 34
#define __assign_str(dst) \

/var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h: In function ‘perf_trace_zfs_dbuf_evict_one_class’: /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:64:25: error: ‘__assign_str’ undeclared (first use in this function) 64 | __assign_str(os_spa, \ | ^~~~ /usr/src/linux-headers-6.10.3-common-rt/include/trace/perf.h:51:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’ 51 | { assign; } \ | ^~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:141:9: note: in expansion of macro ‘TP_fast_assign’ 141 | TP_fast_assign(DBUF_TP_FAST_ASSIGN), | ^~~~~~ /var/lib/dkms/zfs/2.2.99/build/include/os/linux/zfs/sys/trace_dbuf.h:141:24: note: in expansion of macro ‘DBUF_TP_FAST_ASSIGN’ 141 | TP_fast_assign(DBUF_TP_FAST_ASSIGN), | ^~~~~~~ CC [M] /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/zfs_racct.o CC [M] /var/lib/dkms/zfs/2.2.99/build/module/os/linux/zfs/zfs_sysfs.o

wmmur commented 2 months ago

Kernel 6.10.3 v3 xanmod, dkms compilation runs without errors, the problem occurs when compiling in the original Debian Linux kernel!

robn commented 2 months ago

Change was torvalds/linux@2c92ca849fcc6ee7d0c358e9959abc9f58661aea, since 6.10. However this doesn't trip for me, and I'm not sure which set of kernel and/or OpenZFS options will arrange for DECLARE_EVENT_CLASS to be available (it never is on any of my builds back to 4.4).

@wmmur its not clear from your original report: does this only fail to build on the -rt kernel, or on both?

wmmur commented 2 months ago

building the zfs-dkms kernel module is impossible on the regular debian linux-6.10.3-amd64 kernel and on the linux-6.10.3-rt-amd64 kernel. I managed to build zfs-dkms on linux-6.10.3-xanmod kernel. I tested zfs-2.2.5 and zfs-master.

lnicola commented 2 months ago

Which version of zfs-dkms and Debian? Debian 13 still has 2.2.4-2, Sid has 2.2.5-1.

wmmur commented 2 months ago

Which version of zfs-dkms and Debian? Debian 13 still has 2.2.4-2, Sid has 2.2.5-1.

Devuan(Debian) Sid actually has zfs 2.2.5.1. When the compilation error occurred, I built zfs-master native-deb. the compilation error repeated itself on Debian 6.10.3 kernel.

n0xena commented 2 months ago

2.2.5 works on Arch with 6.10.x standard, no dkms - but needs a lot of testing https://github.com/archzfs/archzfs/pull/542

Voyvode commented 2 months ago

Also had a DKMS compilation error on Debian Sid, until now. A couple of libs and gcc were upgraded today, maybe it’s related.

Currently running Debian Sid with Linux 6.10.3 and zfs 2.2.5.1. 👍

wmmur commented 2 months ago

@Voyvode I updated the system but I still have the build zfs-dkms error.

Voyvode commented 2 months ago

Too bad, and strange. In fact, I didn't even expect it to compile today, like that. 😅

Maybe a missing patch in Devuan Ceres for now? gcc and others are 14.2.0-2 in Debian Sid.

wmmur commented 2 months ago

@Voyvode Devuan Ceres shares archives with Debian Sid, changes include removing systemd and using sysvinit, runit and OpenRC. also the debian kernel is still compiled using gcc-13.3 so zfs-dkms also uses gcc-13.3 I applied @robn's patch "remove HAVE_DECLARE_EVENT_CLASS", it solves the problem.

robn commented 2 months ago

As a rule, don't add experimental or incomplete patches to your OpenZFS builds unless you really know what you're doing; it may appear to work but may be subtly broken in ways that may damage your pool.

(highly unlikely in this case, but it bears mentioning).

Can you please post:

wmmur commented 2 months ago

config.log from the OpenZFS build kernel 6.10.3-rt-amd64

I'm sorry, but I only have kernel-rt and kernel xanmod installed at the moment config-6.10.3-rt-amd64.txt config-6.10.4-x64v3-xanmod1.txt

@robn I analyzed the impact of the "remove HAVE_DECLARE_EVENT_CLASS" patch on my build. I still wonder why the problem occurs on Devuan Ceres, which uses the identical kernel as Debian Sid, but does not occur on Debian Sid. I remember that the problem with HAVE_DECLARE_EVENT_CLASS occurred previously in the case of kernel 6.9.8, the reason was the lack of ";".

robn commented 2 months ago

Uhh

configure:15020: checking zfs license
configure:15022: result: GPL

Have you modified your META file to say GPL instead of CDDL?

wmmur commented 2 months ago

@robn yes, I modified the META CDDL->GPL file. I've been using it for ~2 years when it was the only way to compile zfs-dkms. do you think this is the reason?

robn commented 2 months ago

Yeah, that's a wholly unsupported configuration. Next time please mention that up front.

robn commented 2 months ago

Unless I misunderstand something, trace stuff that uses __assign_str is gated behind HAVE_DECLARE_EVENT_CLASS, which can only be set if DECLARE_EVENT_CLASS is not gated behind GPL exports in the kernel, which has not been the case since the 3.x kernel series, maybe before. This means either you haven't properly reverted META, or you've got something else going on.

We're basically starting over now. From here you need to meticulously lay out exactly what you're doing, commands, outputs, logs, everything.

wmmur commented 2 months ago

@robn modifying the meta file does not cause zfs-dkms compilation problems!

I tested:

make.log file still shows error error: macro "__assign_str" passed 2 arguments, but takes just 1

wmmur commented 2 months ago

I executed the commands in the terminal apt-get update && apt-get dist-upgeade

lnicola commented 2 months ago

I was able to build zfs-dkms in a Debian Sid container by running sed -i 's/main/main contrib/' /etc/apt/sources.list.d/debian.sources && apt update && apt dist-upgrade -y && apt install linux-headers-amd64 zfs-dkms -y, Notably,

checking whether DECLARE_EVENT_CLASS() is available... no
wmmur commented 2 months ago

@lnicola and this is the source of the problem because for me it is: checking whether DECLARE_EVENT_CLASS() is available

define HAVE_DECLARE_EVENT_CLASS 1

lnicola commented 2 months ago

Also works for me with devuan/devuan:unstable, with some minor differences (you need to specify the container entry point, to update /etc/apt/sources.list, and I don't see the configure output). Feel free to give it a try, I tend to believe it's something specific to your system.

How did you edit that META file in the first place?

wmmur commented 2 months ago

the reason for changing CDDL->GPL in the META file was the compilation of zfs-dkms to kernel-rt! from 2020 I had to apply this change #11097 . @robn you were right the compilation error for kernel 6.10.3-amd64 was only caused by the modification of the META file, but the compilation error kernel-6.10.3- rt still requires modification of the META CDDL->GPL file. @robn's patch "remove HAVE_DECLARE_EVENT_CLASS" is a solution to my problems compiling zfs-dkms on kernel-6.10.3-rt-amd64.

tonyhutter commented 2 months ago

I'm hitting the error while building in this fix https://github.com/openzfs/zfs/pull/16450 as built-in to the 6.10.5 kernel (aka using https://github.com/openzfs/zfs/blob/master/copy-builtin):

/mnt/kernel/linux-6.10.5$ make
  CALL    scripts/checksyscalls.sh
  DESCEND objtool
  INSTALL libsubcmd_headers
  CC      fs/zfs/os/linux/zfs/trace.o
In file included from ./include/trace/trace_events.h:419,
                 from ./include/trace/define_trace.h:102,
                 from ./include/zfs/os/linux/zfs/sys/trace_dbgmsg.h:80,
                 from fs/zfs/os/linux/zfs/trace.c:44:
./include/zfs/os/linux/zfs/sys/trace_dbgmsg.h:65:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   65 | );
      | ^~            
In file included from ./include/trace/trace_events.h:375:
./include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)                                               \
tonyhutter commented 2 months ago

The easy way to reproduce is to enable HAVE_DECLARE_EVENT_CLASS in zfs_config.h right after running ./configure:

/* DECLARE_EVENT_CLASS() is available */                                         
#define HAVE_DECLARE_EVENT_CLASS 1     
wmmur commented 2 months ago

@tonyhutter this error occurs for kernel linux >=linux-6.10.0, I closed the topic because I thought that the problem only concerns kernel linux-rt, I am glad that my time spent looking for a solution to the problem also helped in your case. I irritated @robn many times, but he helped me find the source of the problem.

lnicola commented 2 months ago

In the table at the top you mentioned both the 6.10.3-amd64 and 6.10.3.1-rt-amd64 and kernels, does it also happen on the non-rt one?

wmmur commented 2 months ago

@lnicola since 2020 (the only way I know how to compile zfs-dkms on the linux-rt kernel) I have been using the META CDDL->GPL file modification. I compiled the zfs-dkms module for kernel linux-rt and for kernel linux (non rt). if I use the original META file, zfs-dkms-2.2.5 for kernel linux-6.10.x-amd64 compiles without errors. Errors occur, if I use modified CDDL->GPL META file, zfs-dkms-2.2.5 for kernel linux-6.10.x-amd64 and linux-6.10.x-rt-amd64.

robn commented 2 months ago

Specific issue and partial fix in #16475.

wmmur commented 2 months ago

@robn it is not my intention to interfere with your work. I pointed out an error in the code that occurred, but which may cause compilation errors in special cases. you indicated a permanent solution to the problem, but it was blocked. I understand, it's up to you to decide. it's sad that helping you find bugs is perceived as an attack. now I won't report bugs if my reports are ignored or cause aggression. I'm sorry I tried to help.