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

Duplicate symbol error in Linux 6.13 with builtin module #16932

Open
12101111 opened this issue Jan 7, 2025 · 1 comment
Open

Duplicate symbol error in Linux 6.13 with builtin module #16932

12101111 opened this issue Jan 7, 2025 · 1 comment
Labels
Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@12101111
Copy link
Contributor

12101111 commented Jan 7, 2025

System information

Type Version/Name
Distribution Name Gentoo Linux
Distribution Version 2.17
Kernel Version 6.13 rc6
Architecture arm64
OpenZFS Version 2.3.0 rc5

Describe the problem you're observing

#16831 say no code change is needed for Linux 6.13, so I test it.

When build zfs with --enable-linux-builtin and enable CONFIG_ZFS=y, CONFIG_BPF_SYSCALL=y, I got 3 duplicate symbol error.

The code change in Linux: torvalds/linux@b795379

Describe how to reproduce the problem

Build bpf and zfs as builtin module in Linux 6.13

Include any warning/errors/backtraces from the system logs

  LD      vmlinux.o
ld.lld: error: duplicate symbol: range_tree_destroy
>>> defined at range_tree.c
>>>            kernel/bpf/range_tree.o:(range_tree_destroy) in archive vmlinux.a
>>> defined at range_tree.c
>>>            fs/zfs/zfs/range_tree.o:(.text.range_tree_destroy+0x8) in archive vmlinux.a

ld.lld: error: duplicate symbol: range_tree_find
>>> defined at range_tree.c
>>>            kernel/bpf/range_tree.o:(range_tree_find) in archive vmlinux.a
>>> defined at range_tree.c
>>>            fs/zfs/zfs/range_tree.o:(.text.range_tree_find+0x8) in archive vmlinux.a

ld.lld: error: duplicate symbol: range_tree_clear
>>> defined at range_tree.c
>>>            kernel/bpf/range_tree.o:(range_tree_clear) in archive vmlinux.a
>>> defined at range_tree.c
>>>            fs/zfs/zfs/range_tree.o:(.text.range_tree_clear+0x8) in archive vmlinux.a
make[2]: *** [scripts/Makefile.vmlinux_o:65: vmlinux.o] Error 1
@12101111 12101111 added the Type: Defect Incorrect behavior (e.g. crash, hang) label Jan 7, 2025
@tonyhutter
Copy link
Contributor

Thanks for reporting this. We'll need to rename our functions to zfs_range_tree or something.

@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

3 participants