Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel linux 6.10.3 build error #16433

Closed
wmmur opened this issue Aug 10, 2024 · 29 comments
Closed

kernel linux 6.10.3 build error #16433

wmmur opened this issue Aug 10, 2024 · 29 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@wmmur
Copy link

wmmur commented Aug 10, 2024

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 wmmur added the Type: Defect Incorrect behavior (e.g. crash, hang) label Aug 10, 2024
@wmmur
Copy link
Author

wmmur commented Aug 11, 2024

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

@robn robn mentioned this issue Aug 11, 2024
13 tasks
@robn
Copy link
Member

robn commented Aug 11, 2024

Change was torvalds/linux@2c92ca8, 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
Copy link
Author

wmmur commented Aug 11, 2024

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
Copy link
Contributor

lnicola commented Aug 11, 2024

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

@wmmur
Copy link
Author

wmmur commented Aug 11, 2024

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
Copy link

n0xena commented Aug 11, 2024

2.2.5 works on Arch with 6.10.x standard, no dkms - but needs a lot of testing
archzfs/archzfs#542

@Voyvode
Copy link

Voyvode commented Aug 11, 2024

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
Copy link
Author

wmmur commented Aug 11, 2024

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

@Voyvode
Copy link

Voyvode commented Aug 11, 2024

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
Copy link
Author

wmmur commented Aug 11, 2024

@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
Copy link
Member

robn commented Aug 11, 2024

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:

  • config.log from the OpenZFS build
  • the config for the kernel you're building against (probably /boot/config-..., make sure you get the right one)

@wmmur
Copy link
Author

wmmur commented Aug 12, 2024

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
Copy link
Member

robn commented Aug 12, 2024

Uhh

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

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

@wmmur
Copy link
Author

wmmur commented Aug 12, 2024

@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
Copy link
Member

robn commented Aug 12, 2024

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

@robn
Copy link
Member

robn commented Aug 12, 2024

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
Copy link
Author

wmmur commented Aug 12, 2024

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

I tested:

  • I performed a rollback of the system partition
  • re-updating the system without modifying the META file
  • an error occurred again while compiling zfs-dkms

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

@wmmur
Copy link
Author

wmmur commented Aug 12, 2024

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

@lnicola
Copy link
Contributor

lnicola commented Aug 12, 2024

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
Copy link
Author

wmmur commented Aug 12, 2024

@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
Copy link
Contributor

lnicola commented Aug 12, 2024

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
Copy link
Author

wmmur commented Aug 12, 2024

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.

@wmmur wmmur closed this as completed Aug 12, 2024
@tonyhutter tonyhutter reopened this Aug 14, 2024
@tonyhutter
Copy link
Contributor

I'm hitting the error while building in this fix #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
Copy link
Contributor

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
Copy link
Author

wmmur commented Aug 15, 2024

@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
Copy link
Contributor

lnicola commented Aug 15, 2024

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
Copy link
Author

wmmur commented Aug 15, 2024

@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.

@wmmur wmmur closed this as completed Aug 15, 2024
@robn
Copy link
Member

robn commented Aug 24, 2024

Specific issue and partial fix in #16475.

@wmmur
Copy link
Author

wmmur commented Aug 24, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

6 participants