Hi,

   Ubuntu has a bug[1] which causes `uname -r` and the kernel version reported 
via `ossvermagic -z -s` to not match, making 'soundon' fail even when the same 
kernel is used for compiling the module and for loading it later.

   The attached patch saves the version of the running kernel used during "sh 
install.sh" in a new symbol ("__oss_link_vermagic") in osscore.ko (this is 
included via "ubuntu_version_hack.inc"). It makes ossvermagic check for it if 
'-u' switch is used, which happens only if "soundon" can't get a match in 
regular way. I don't think this should break anything, unless a rather twisted 
Linux system exists where /lib/modules/`uname -r`/build is linked to a 
different kernel version than the one `uname -r` indicates...

  The patch also includes some unrelated misc. changes:
    A. cmd/ossxmix/ossxmix.c - call gdk_notify_startup_complete at cleanup(), 
so that if startup failed notification won't stay stuck up until the DE decides 
to remove it.
    B. configure - unset CDPATH, to avoid 'cd $SRCDIR && pwd' failing if it's 
set. autoconf uses same trick, so this should work portably[2].
    C. setup/Linux/oss/build/install.sh - call `uname -r` only once, and use 
that value (same is done for soundon). Remove mentions of 'modules.inc.orig' 
now that osscore_symbols.inc is used instead.
    D. setup/Linux/oss/build/osscore.c - make strncpy, strcpy not increment s1 
needlessly. Use correct return type for new_ioctl_t to avoid harmless warning.
    E. setup/elflib.inc - use #ifdefs to avoid harmless 32/64 bit warning on 
printing shdr[i].sh_offset. Allow list_symbols return something sane to avoid 
always returning 0 from ELF_LOAD_SYMTAB, so that ossvermagic can avoid 
unneccesary checks.

Yours,
        Yair K.

[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/247055
      https://bugs.launchpad.net/ubuntu/+source/linux/+bug/253391
[2] 
http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoconf_10.html#SEC121

Attachment: oss-ubuntu-workaround.diff.gz
Description: GNU Zip compressed data

_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to