Good day all,
Using the latest rolling edition,
OpenMandriva Lx release 23.03 (ROME) Rolling for x86_64
I didn’t succeed in building a kernel module.
On the 4.3x I was able to build the module to add keyboard / trackpad / audio support for a macbook air :
https://french-touch.de-14h09.tk/keyboard-and-trackpad-for-a-linux-macbook-with-the-t2-security-chip-97f0019c39c7
With the rome edition, looks like everything was switch to clang and got some issue :
[pierre@concorde src]$ sudo dkms install apple-bce/0.1
Creating symlink /var/lib/dkms/apple-bce/0.1/source ->
/usr/src/apple-bce-0.1
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.2.6-desktop-1omv2390...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.2.6-desktop-1omv2390 (x86_64)
Consult /var/lib/dkms/apple-bce/0.1/build/make.log for more information.
[pierre@concorde src]$ cat /var/lib/dkms/apple-bce/0.1/build/make.log
DKMS make.log for apple-bce-0.1 for kernel 6.2.6-desktop-1omv2390 (x86_64)
mar. 23 mai 2023 10:19:08 JST
make -C /lib/modules/6.2.6-desktop-1omv2390/source M=/var/lib/dkms/apple-bce/0.1/build modules
warning: the compiler differs from the one used to build the kernel
The kernel was built by: OpenMandriva 15.0.7-3 clang version 15.0.7 (/builddir/build/BUILD/llvm-project-15.0.7.src/clang c5b761db9d28a8cbbafbaa455d57066c5a0e42bc)
You are using: gcc (GCC) 12.2.0 20220819 (OpenMandriva)
CC [M] /var/lib/dkms/apple-bce/0.1/build/apple_bce.o
CC [M] /var/lib/dkms/apple-bce/0.1/build/mailbox.o
CC [M] /var/lib/dkms/apple-bce/0.1/build/queue.o
CC [M] /var/lib/dkms/apple-bce/0.1/build/queue_dma.o
gcc: erreur: option « -Qunused-arguments » non reconnue sur la ligne de commande
gcc: erreur: option « -Qunused-arguments » non reconnue sur la ligne de commande
gcc: erreur: option « -Qunused-arguments » non reconnue sur la ligne de commande
gcc: erreur: option « -Qunused-arguments » non reconnue sur la ligne de commande
gcc: erreur: option « -mretpoline-external-thunk » non reconnue sur la ligne de commande
gcc: erreur: option « -mretpoline-external-thunk » non reconnue sur la ligne de commande
gcc: erreur: option « -mretpoline-external-thunk » non reconnue sur la ligne de commande
gcc: erreur: option « -mretpoline-external-thunk » non reconnue sur la ligne de commande
gcc: erreur: option « -fsplit-lto-unit » non reconnue sur la ligne de commande
gcc: erreur: option « -fsplit-lto-unit » non reconnue sur la ligne de commande
gcc: erreur: option « -fsplit-lto-unit » non reconnue sur la ligne de commande
gcc: erreur: option « -fsplit-lto-unit » non reconnue sur la ligne de commande
gcc: erreur: option « -Wformat-invalid-specifier » non reconnue sur la ligne de commande
gcc: erreur: option « -Wformat-invalid-specifier » non reconnue sur la ligne de commande
gcc: erreur: option « -Wformat-invalid-specifier » non reconnue sur la ligne de commande
gcc: erreur: option « -Wformat-invalid-specifier » non reconnue sur la ligne de commande
gcc: erreur: option « -Wformat-insufficient-args » non reconnue sur la ligne de commande
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/apple-bce/0.1/build/apple_bce.o] エラー 1
make[2]: *** Attente des tâches non terminées....
gcc: erreur: option « -Wformat-insufficient-args » non reconnue sur la ligne de commande
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/apple-bce/0.1/build/mailbox.o] エラー 1
gcc: erreur: option « -Wformat-insufficient-args » non reconnue sur la ligne de commande
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/apple-bce/0.1/build/queue.o] エラー 1
gcc: erreur: option « -Wformat-insufficient-args » non reconnue sur la ligne de commande
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/apple-bce/0.1/build/queue_dma.o] エラー 1
make[1]: *** [Makefile:2021: /var/lib/dkms/apple-bce/0.1/build] エラー 2
make: *** [Makefile:22: all] エラー 2
when I try manually to use clang as compiler, well it was complaining about GCC symbols / argments not found.
I have no idea what need to be patched.
Is there an existing config / switch to make it build with GCC instead of clang ? Or files need to be adjusted manually one by one ?
Thank you in advance for your help.
PS: At work I’m using an external usb keyboard so it’s fine, but can’t use it outside ><