Relinking the OSS kernel modules failed

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

kujaw
New Member
Posts: 1
Joined: Fri Feb 16, 2018 10:53 am
OS: ArchLinux/FreeBSD

Relinking the OSS kernel modules failed

Postby kujaw » Fri Feb 16, 2018 10:58 am

Hello guys, I've written on archlinux forum about my issue, but without response, maybe you could help me a bit.
https://bbs.archlinux.org/viewtopic.php?id=234300

I want to run OSS on my system, unfortunately I get some errors.

I did everything as in wiki https://wiki.archlinux.org/index.php/Open_Sound_System:

1. installed oss from AUR

2. blacklisted soundcore module

3. enabled oss.service

Code: Select all

# systemctl enable oss.service


4. I'm in the audio group

5. ossdetect detects my soundcards

Code: Select all

# ossdetect -v
Detected Intel High Definition Audio (PCH_C)
USB support available in the system, adding USB driver
Detected Generic USB audio/MIDI device (BETA)


6.

Code: Select all

# soundoff
OSS not loaded.


7.

Code: Select all

# soundon
...
/lib/modules/4.15.1-2-ARCH/kernel/lib/ts_kmp.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/ts_kmp.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4hc_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4hc_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4hc_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/lz4/lz4hc_compress.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/bch.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/bch.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/bch.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/lib/bch.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/mm/hwpoison-inject.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/mm/hwpoison-inject.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/mm/hwpoison-inject.ko.xz is not a valid ELF object
/lib/modules/4.15.1-2-ARCH/kernel/mm/hwpoison-inject.ko.xz is not a valid ELF object
make -C /usr/lib/modules/4.15.1-2-ARCH/build M=/usr/lib/oss/build modules
make[1]: Entering directory '/usr/lib/modules/4.15.1-2-ARCH/build'
  CC [M]  /usr/lib/oss/build/osscore_wrapper.o
/usr/lib/oss/build/osscore_wrapper.c: In function ‘oss_timeout’:
/usr/lib/oss/build/osscore_wrapper.c:570:3: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
   init_timer (&tmout->timer);
   ^~~~~~~~~~
   init_timers
/usr/lib/oss/build/osscore_wrapper.c:572:15: error: ‘struct timer_list’ has no member named ‘data’
   tmout->timer.data = id | (timeout_random & ~0xff);
               ^
/usr/lib/oss/build/osscore_wrapper.c:573:25: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
   tmout->timer.function = oss_timer_callback;
                         ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:317: /usr/lib/oss/build/osscore_wrapper.o] Error 1
make[1]: *** [Makefile:1508: _module_/usr/lib/oss/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.15.1-2-ARCH/build'
make: *** [Makefile:21: default] Error 2

Relinking the OSS kernel modules failed


8. I thought that I should stop module, which I've just blacklisted, but

Code: Select all

# systemctl stop soundcore.service
Unit soundcore.service could not be found.


9. So I tried to start oss module

Code: Select all

# systemctl start oss.service
Job for oss.service failed because the control process exited with error code.
See "systemctl status oss.service" and "journalctl -xe" for details.


10.

Code: Select all

# systemctl status oss.service
● oss.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-02-08 17:37:32 CET; 3s ago
  Process: 13368 ExecStart=/usr/bin/soundon (code=exited, status=20)
 Main PID: 13368 (code=exited, status=20)

Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/bluetooth/btmrvl_sdio.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/bluetooth/btuart_cs.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/bluetooth/bfusb.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/bluetooth/btusb.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/bluetooth/btusb.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/firmware/qemu_fw_cfg.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap soundon[13368]: /lib/modules/4.14.15-1-ARCH/kernel/drivers/firmware/iscsi_ibft.ko.xz is not a valid ELF object
Feb 08 17:37:32 kujawLap systemd[1]: oss.service: Main process exited, code=exited, status=20/n/a
Feb 08 17:37:32 kujawLap systemd[1]: oss.service: Failed with result 'exit-code'.
Feb 08 17:37:32 kujawLap systemd[1]: Failed to start Open Sound System v4.


soundon still gives the same error as in 7. Any idea what should I try next?

igorzwx
Known Member
Posts: 1258
Joined: Sun Jun 28, 2009 9:31 pm

Re: Relinking the OSS kernel modules failed

Postby igorzwx » Sun Feb 18, 2018 8:22 pm

kujaw wrote:Any idea what should I try next?


You may try OSS4 on a LiveCD:
_http://ossnext.trueinstruments.com/forum/viewtopic.php?f=3&t=5828

tedbell
New Member
Posts: 3
Joined: Sun Feb 18, 2018 11:06 pm
Sound Card: Intel HDA
OS: Arch Linux

Re: Relinking the OSS kernel modules failed

Postby tedbell » Sun Feb 18, 2018 11:09 pm

the problem is with the 4.15 kernel.
viewtopic.php?f=3&t=5862

Would anyone be able to patch that for Arch Linux? I have no idea how to apply patches. :(

seawright
Known Member
Posts: 102
Joined: Sat Jan 06, 2007 9:10 pm
Location: Hampshire UK

Re: Relinking the OSS kernel modules failed

Postby seawright » Tue Feb 20, 2018 12:51 am

If you are using kernel version 4.15.1 you will need to patch osscore.c (see viewtopic.php?f=3&t=5862 ) otherwise the required kernel module osscore.ko will fail to build.
regards
Clive

alexdw
Member
Posts: 26
Joined: Sat Jul 06, 2013 12:29 pm

Re: Relinking the OSS kernel modules failed

Postby alexdw » Thu Mar 29, 2018 3:55 pm

seawright wrote:If you are using kernel version 4.15.1 you will need to patch osscore.c (see viewtopic.php?f=3&t=5862 ) otherwise the required kernel module osscore.ko will fail to build.


Do you know if anyone has managed to get this to work using Arch?

I get similar errors to @kujaw even with the patch. :(

Specifically, I'm using oss-git in AUR, which now includes the patch via commit 7cf6b0:
https://sourceforge.net/p/opensound/git ... 77b49942f/

It seems to build OK, but attempting a soundon gives a whole load of "is not a valid ELF object lines", ending with:

Code: Select all

...
/lib/modules/4.15.13-1-ARCH/kernel/security/keys/trusted.ko.xz is not a valid ELF object
/lib/modules/4.15.13-1-ARCH/kernel/security/keys/encrypted-keys/encrypted-keys.ko.xz is not a valid ELF object
/lib/modules/4.15.13-1-ARCH/kernel/security/keys/encrypted-keys/encrypted-keys.ko.xz is not a valid ELF object
/lib/modules/4.15.13-1-ARCH/kernel/security/keys/encrypted-keys/encrypted-keys.ko.xz is not a valid ELF object
/lib/modules/4.15.13-1-ARCH/kernel/security/keys/encrypted-keys/encrypted-keys.ko.xz is not a valid ELF object
modprobe: ERROR: could not insert 'osscore': Unknown symbol in module, or unknown parameter (see dmesg)
Loading the osscore module failed


And in dmesg:

Code: Select all

osscore: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)


A quick Google search suggests that it might be something to do with this (the PIE part specifically):
https://www.reddit.com/r/archlinux/comm ... lt_in_gcc/

If that is the case (I haven't yet confirmed by trying with "no-pie" and/or downgrading the Arch gcc package), then it looks like it's going to affect other distros as well as there appears to be a general move towards PIE by default (for security reasons).


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 3 guests