-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
multiple definition of `HIST_isError' compiling against linux-5.16.1-gentoo kernel #12988
Comments
5.16 is known to have a number of failures with even git tip, though this one is new and different. I would suggest using an older kernel until that changes. |
This one can also be reproduced in zfs-2.1.3 with 5.16 linux kernel.
|
Can you share your distro and kernel .config?
I just tried this with 2.1.3 and Fedora 35's 5.16.8-200.fc35.x86_64, and it
built and loaded happily.
- Rich
…On Fri, Mar 11, 2022 at 10:01 PM Rin Cat (鈴猫) ***@***.***> wrote:
This one can also be reproduced in zfs-2.1.3 with 5.16 linux kernel.
ld.lld: error: duplicate symbol: HIST_isError
>>> defined at zstd.c:810 (fs/zfs/zstd/lib/zstd.c:810)
>>> zfs/zstd/lib/zstd.o:(HIST_isError) in archive fs/built-in.a
>>> defined at error_private.h:45 (lib/zstd/compress/../common/error_private.h:45)
>>> zstd/compress/hist.o:(.text+0x0) in archive lib/built-in.a
make: *** [Makefile:1161: vmlinux] Error 1
—
Reply to this email directly, view it on GitHub
<#12988 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUI7M3CT4TXGOWVXTDE3LU7QCHRANCNFSM5MKFHPZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Oh, I see, they're doing builtin, I didn't notice that until I looked at
the example build output in the original issue.
That'll be slightly more time-consuming to test this fix in, but doing so...
…On Sat, Mar 12, 2022 at 3:34 AM Rich ***@***.***> wrote:
Can you share your distro and kernel .config?
I just tried this with 2.1.3 and Fedora 35's 5.16.8-200.fc35.x86_64, and
it built and loaded happily.
- Rich
On Fri, Mar 11, 2022 at 10:01 PM Rin Cat (鈴猫) ***@***.***>
wrote:
> This one can also be reproduced in zfs-2.1.3 with 5.16 linux kernel.
>
> ld.lld: error: duplicate symbol: HIST_isError
> >>> defined at zstd.c:810 (fs/zfs/zstd/lib/zstd.c:810)
> >>> zfs/zstd/lib/zstd.o:(HIST_isError) in archive fs/built-in.a
> >>> defined at error_private.h:45 (lib/zstd/compress/../common/error_private.h:45)
> >>> zstd/compress/hist.o:(.text+0x0) in archive lib/built-in.a
> make: *** [Makefile:1161: vmlinux] Error 1
>
> —
> Reply to this email directly, view it on GitHub
> <#12988 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AABUI7M3CT4TXGOWVXTDE3LU7QCHRANCNFSM5MKFHPZQ>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
System information
Using Clang + ld.lld, kernel + zfs builtin. |
As a quick-fix, I have an inkling the following diff might Just Fix this: diff --git a/module/zstd/include/zstd_compat_wrapper.h b/module/zstd/include/zstd_compat_wrapper.h
index c39dfa2db..422556806 100644
--- a/module/zstd/include/zstd_compat_wrapper.h
+++ b/module/zstd/include/zstd_compat_wrapper.h
@@ -473,3 +473,4 @@
#define repStartValue zfs_repStartValue
#define FSE_isError zfs_FSE_isError
#define HUF_isError zfs_HUF_isError
+#define HIST_isError zfs_HIST_isError |
Probably. I made a branch that adds all the outstanding symbols I saw, not just that one, but haven't had a chance to test it builtin on 5.16 yet. |
Christ. There's gotta be a better way to at least enforce this. After coming up with that way, I think that patch, as written, is a slight overreaction, since most of those are local; the globals I get on my system (but it should be the same everywhere) from the vanilla objects are:
(There's a few more from the rest of zzstd.ko, but I don't think we care.) |
Closes: openzfs#12988 Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes: openzfs#12988 Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes: openzfs#12988 Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes: openzfs#12988 Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]>
System information
Same issue with compiling ZFS with built-in. Will likely apply fix in PR #13209 shortly, and rebuild ZFS and kernel, as have been waiting for OpenZFS 2.1.3 to release for Linux 5.16 support specifically. |
Closes: openzfs#12988 Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12988 Closes #13209
This issue still persists with version 2.1.4 of OpenZFS and version 5.17.0 of the kernel when building the module in-tree.
|
2.1.x didn't cherrypick that, AFAICS, so that's not surprising. Something for 2.1.5, I suppose. |
Ah, yes, then it indeed is no surprise. Thanks. |
This looks simple enough that I can cherry pick it into Gentoo, at least once it's in the staging branch. Not sure I want to sit there and do it manually 😉 |
No, I'm blind, it landed in 2.1.2. That's fascinating. e: sorry, no, I'm just reading too fast, similar symbol, I was right the first time. |
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209 (cherry picked from commit 6ef0019)
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209 (cherry picked from commit 6ef0019)
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12988 Closes #13209 (cherry picked from commit 6ef0019)
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12988 Closes openzfs#13209
I'm sure we could teach checkstyle to look for symbols that match the
prefixes from the zstd code without an accompanying "zfs_" prefix.
…On Sun, Mar 13, 2022 at 10:15 AM наб ***@***.***> wrote:
Christ. There's gotta be a better way to at least enforce this. I think
that patch, as written, is a slight overreaction, since most of those are
local.
The globals I get on my system from the vanilla objects are:
***@***.***:~/store/code/zfs/module/zstd$ objdump -t $vanilla_objs | awk '/file format/ {print} $2 == "g" && !/ zfs_/'
lib/common/entropy_common.o: file format elf64-x86-64
lib/common/error_private.o: file format elf64-x86-64
lib/common/fse_decompress.o: file format elf64-x86-64
lib/common/pool.o: file format elf64-x86-64
lib/common/zstd_common.o: file format elf64-x86-64
lib/compress/fse_compress.o: file format elf64-x86-64
lib/compress/hist.o: file format elf64-x86-64
0000000000000290 g F .text 000000000000000f HIST_isError
lib/compress/huf_compress.o: file format elf64-x86-64
lib/compress/zstd_compress_literals.o: file format elf64-x86-64
lib/compress/zstd_compress_sequences.o: file format elf64-x86-64
lib/compress/zstd_compress_superblock.o: file format elf64-x86-64
lib/compress/zstd_compress.o: file format elf64-x86-64
lib/compress/zstd_double_fast.o: file format elf64-x86-64
lib/compress/zstd_fast.o: file format elf64-x86-64
lib/compress/zstd_lazy.o: file format elf64-x86-64
lib/compress/zstd_ldm.o: file format elf64-x86-64
lib/compress/zstd_opt.o: file format elf64-x86-64
lib/decompress/huf_decompress.o: file format elf64-x86-64
lib/decompress/zstd_ddict.o: file format elf64-x86-64
lib/decompress/zstd_decompress.o: file format elf64-x86-64
lib/decompress/zstd_decompress_block.o: file format elf64-x86-64
(There's a few more from the rest of zzstd.ko, but I don't think we care)
—
Reply to this email directly, view it on GitHub
<#12988 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUI7OBBKFBNWFPUTU6ZALU7X2ALANCNFSM5MKFHPZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
System information
Describe the problem you're observing
Compiling zfs HEAD inline against linux-5.16.1-gentoo gives the following build fail on make:
Describe how to reproduce the problem
ZFS build script located at:
The text was updated successfully, but these errors were encountered: