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

2.2 fails to build kernel modules on aarch64 #15401

Closed
q66 opened this issue Oct 13, 2023 · 6 comments
Closed

2.2 fails to build kernel modules on aarch64 #15401

q66 opened this issue Oct 13, 2023 · 6 comments
Labels
Type: Architecture Indicates an issue is specific to a single processor architecture Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@q66
Copy link
Contributor

q66 commented Oct 13, 2023

System information

Type Version/Name
Distribution Name Chimera Linux
Distribution Version rolling
Kernel Version 6.5.x
Architecture aarch64
OpenZFS Version 2:2

Describe the problem you're observing

Does not build on aarch64:

ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_begin'
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_end'

Describe how to reproduce the problem

Build the kernel modules on aarch64.

Include any warning/errors/backtraces from the system logs

Clang 16 compiler, but should not be relevant.

@q66 q66 added the Type: Defect Incorrect behavior (e.g. crash, hang) label Oct 13, 2023
@q66
Copy link
Contributor Author

q66 commented Oct 13, 2023

Hm, I guess this is actually a dupe of #14555. 2.1.x builds for me because I was patching out the neon paths for raidz/fletcher, but it seems 2.2 brought changes that expand the usage of kernel NEON further, which resulted in that no longer being sufficient.

@luckylinux
Copy link

luckylinux commented Nov 26, 2023

I'm facing the same issue. Kernel 6.6.1 arm64 with ZFS 2.2.1 (since OpenZFS 2.2.1 Linux Kernel 6.6 series is supported).

 make -s -j$(nproc)

  GEN      gitrev
Making all in include
Making all in tests/zfs-tests/tests
  GEN      functional/pyzfs/pyzfs_unittest.ksh
  GEN      functional/pam/utilities.kshlib
Making all in module
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-13 (Debian 13.2.0-5) 13.2.0
  You are using:           gcc (Debian 12.2.0-14) 12.2.0
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_end'
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_begin'
make[5]: *** [scripts/Makefile.modpost:145: /usr/src/zfs/zfs-zfs-2.2.1/module/Module.symvers] Error 1
make[4]: *** [/usr/src/linux-headers-6.6.1-1-arm64/Makefile:1865: modpost] Error 2
make[3]: *** [Makefile:234: __sub-make] Error 2
make[2]: *** [Makefile:56: modules-Linux] Error 2
make[1]: *** [Makefile:12116: all-recursive] Error 1
make: *** [Makefile:4600: all] Error 2

The warning is due to using a binary Kernel built from another developer for Rock Pi 5B (on Debian Testing / GCC 13), while I'm on Debian Bookworm / GCC 12.

Any solution for this ?

@q66
Copy link
Contributor Author

q66 commented Nov 26, 2023

a workaround is https://github.com/chimera-linux/cports/blob/master/main/zfs/patches/aarch64-disable-neon.patch - but that will of course disable all the aarch64 simd

@luckylinux
Copy link

Do you mean SIMD as an ARM64 Instruction Set ? What consequences would that have ? Would ZFS work correctly in the end for e.g. a simple Disk / mirror VDEV ?

@q66
Copy link
Contributor Author

q66 commented Nov 26, 2023

everything will work, some things will miss acceleration

@luckylinux
Copy link

Alright, at least it built now. I'll try to see if I can generate the required DEB files and see how it works. Thanks :)

@behlendorf behlendorf added Type: Architecture Indicates an issue is specific to a single processor architecture Type: Building Indicates an issue related to building binaries labels Nov 29, 2023
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Jan 9, 2024
This patch adds check for `kernel_neon_*` symbols on arm and arm64
platforms to address the following issues:

1. Linux 6.2+ on arm64 has exported them with `EXPORT_SYMBOL_GPL`, so
   license compatibility must be checked before use.
2. On both arm and arm64, the definitions of these symbols are guarded
   by `CONFIG_KERNEL_MODE_NEON`, but their declarations are still
   present. Checking in configuration phase only leads to MODPOST
   errors (undefined references).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes openzfs#15711 
Closes openzfs#14555 
Closes: openzfs#15401
behlendorf pushed a commit that referenced this issue Jan 12, 2024
This patch adds check for `kernel_neon_*` symbols on arm and arm64
platforms to address the following issues:

1. Linux 6.2+ on arm64 has exported them with `EXPORT_SYMBOL_GPL`, so
   license compatibility must be checked before use.
2. On both arm and arm64, the definitions of these symbols are guarded
   by `CONFIG_KERNEL_MODE_NEON`, but their declarations are still
   present. Checking in configuration phase only leads to MODPOST
   errors (undefined references).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes #15711 
Closes #14555 
Closes: #15401
lundman pushed a commit to openzfsonwindows/openzfs that referenced this issue Mar 13, 2024
This patch adds check for `kernel_neon_*` symbols on arm and arm64
platforms to address the following issues:

1. Linux 6.2+ on arm64 has exported them with `EXPORT_SYMBOL_GPL`, so
   license compatibility must be checked before use.
2. On both arm and arm64, the definitions of these symbols are guarded
   by `CONFIG_KERNEL_MODE_NEON`, but their declarations are still
   present. Checking in configuration phase only leads to MODPOST
   errors (undefined references).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes openzfs#15711 
Closes openzfs#14555 
Closes: openzfs#15401
lundman pushed a commit to openzfsonwindows/openzfs that referenced this issue Mar 13, 2024
This patch adds check for `kernel_neon_*` symbols on arm and arm64
platforms to address the following issues:

1. Linux 6.2+ on arm64 has exported them with `EXPORT_SYMBOL_GPL`, so
   license compatibility must be checked before use.
2. On both arm and arm64, the definitions of these symbols are guarded
   by `CONFIG_KERNEL_MODE_NEON`, but their declarations are still
   present. Checking in configuration phase only leads to MODPOST
   errors (undefined references).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes openzfs#15711 
Closes openzfs#14555 
Closes: openzfs#15401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Architecture Indicates an issue is specific to a single processor architecture 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