Building OSS4.2 for 3.11.0 Linux Kernel
Moderators: dev, hannu, cesium
Building OSS4.2 for 3.11.0 Linux Kernel
in kernel 3.11 the struct file_operations (include/linux/fs.h) was slightly changed.
osscore relies on that struct and won't build without a minor patch.
Sincerely,
squeeze
osscore relies on that struct and won't build without a minor patch.
Sincerely,
squeeze
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Thanks again squeeze.
This patch fixes the OSS build for me in 3.10.7 (the kernel version currently in the Arch Testing repo).
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Attached slightly modified version for 3.10.7 (the only change is the kernel version number), as this patch seems to be required for 3.10.7.
- Attachments
-
- linux_kernel_3.10.7.txt
- (451 Bytes) Downloaded 4877 times
Thanks!
much appreciated.
cheers.
cheers.
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Hi! Can you make patch for 3.11.4?
Re: Building OSS4.2 for 3.11.0 Linux Kernel
kinik wrote:Hi! Can you make patch for 3.11.4?
The current patches continue to work for me on 3.11.4.
Re: Building OSS4.2 for 3.11.0 Linux Kernel
When I'm patching source of oss it says:
Code: Select all
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- setup/Linux/oss/build/osscore.c 2012-05-22 00:23:41.000000000 +0200
|+++ setup/Linux/oss/build/osscore.c 2013-07-20 21:47:18.294007175 +0200
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Just upgraded Ubuntu 13.04 to 13.10 and can't get oss to install on new kernel.
uname -r gives 3.11.0-12-generic
To date I have:
Does anyone know what I am doing wrong or how I can get osscore to compile?
Thanks in advance.
uname -r gives 3.11.0-12-generic
To date I have:
- Cloned Mercurial version with command: hg clone http://opensound.hg.sourceforge.net:800 ... /opensound oss
- cd oss and applied above patch with command: patch -p0 <~/oss311.pat
- mkdir ../build && cd ../build && /usr/src/oss/configure && make
- Then as root: rm -rf /usr/lib/oss && make install
Code: Select all
make[1]: Entering directory `/usr/lib/oss/build'
make -C /lib/modules/3.11.0-12-generic/build M=/usr/lib/oss/build modules
make[2]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
CC [M] /usr/lib/oss/build/osscore.o
/usr/lib/oss/build/osscore.c: In function ‘init_proc_fs’:
/usr/lib/oss/build/osscore.c:287:8: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]
create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
^
/usr/lib/oss/build/osscore.c:286:22: warning: assignment makes pointer from integer without a cast [enabled by default]
if ((oss_proc_root =
^
/usr/lib/oss/build/osscore.c:293:26: warning: assignment makes pointer from integer without a cast [enabled by default]
if ((oss_proc_devfiles =
^
/usr/lib/oss/build/osscore.c:300:20: error: dereferencing pointer to incomplete type
oss_proc_devfiles->proc_fops = &oss_proc_operations;
^
/usr/lib/oss/build/osscore.c: In function ‘alloc_fop’:
/usr/lib/oss/build/osscore.c:966:14: warning: assignment from incompatible pointer type [enabled by default]
fop->fsync = oss_no_fsync;
^
/usr/lib/oss/build/osscore.c: In function ‘oss_pci_read_devpath’:
/usr/lib/oss/build/osscore.c:1640:3: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
return dev_name(&dip->pcidev->dev);
^
cc1: some warnings being treated as errors
make[3]: *** [/usr/lib/oss/build/osscore.o] Error 1
make[2]: *** [_module_/usr/lib/oss/build] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/lib/oss/build'
Thanks in advance.
regards
Clive
Clive
Re: Building OSS4.2 for 3.11.0 Linux Kernel
The attached diff works for me with 3.10.17.
- Attachments
-
- osscore-diff.gz
- (535 Bytes) Downloaded 1388 times
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Thanks for patch. Still get an error, after applying patch to oss-v4.2-build2008-src-gpl/setup/Linux/oss/build/osscore.c
Used oss-v4.2-build2008-src-gpl as this appears to be newer than version in Mercurial which identifies as build 2006.
Code: Select all
/usr/lib/oss/build/osscore.c: In function ‘alloc_fop’:
/usr/lib/oss/build/osscore.c:978:6: error: ‘struct file_operations’ has no member named ‘readdir’
fop->readdir = NULL; /* tmp_readdir; */
^
Used oss-v4.2-build2008-src-gpl as this appears to be newer than version in Mercurial which identifies as build 2006.
regards
Clive
Clive
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Not many things would like to readdir() over /dev/dsp... We can just comment out the line. Or use the attached patch which does the same thing (includes 3.10 changes).
- Attachments
-
- osscore.diff.gz
- diff for 3.11
- (650 Bytes) Downloaded 1401 times
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Latest patch does allow osscore.ko kernel module to be built but make errors out over problem with pci_wrapper.inc before other modules are built and copied to kernel modules directory:
Tried inserting osscore.ko manually with following results:
Don't know how to identify offending symbol.
Edit:
I was wrong to assume osscore.ko in build directory was a copy of osscore.ko in kernel modules directory. just noticed different file size.
Tried inserting osscore.ko manually with following results:
Code: Select all
make[1]: Entering directory `/usr/lib/oss/build'
make -C /lib/modules/3.11.0-12-generic/build M=/usr/lib/oss/build modules
make[2]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
CC [M] /usr/lib/oss/build/oss_ali5455.o
In file included from /usr/lib/oss/build/module.inc:45:0,
from /usr/lib/oss/build/oss_ali5455.c:21:
/usr/lib/oss/build/pci_wrapper.inc:21:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘osspci_probe’
osspci_probe (struct pci_dev *pcidev, const struct pci_device_id *pciid)
^
/usr/lib/oss/build/pci_wrapper.inc:69:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘osspci_remove’
osspci_remove (struct pci_dev *pcidev)
^
In file included from /usr/lib/oss/build/oss_ali5455.c:21:0:
/usr/lib/oss/build/module.inc:51:12: error: ‘osspci_probe’ undeclared here (not in a function)
.probe = osspci_probe,
^
/usr/lib/oss/build/module.inc:52:13: error: ‘osspci_remove’ undeclared here (not in a function)
.remove = osspci_remove
^
In file included from /usr/lib/oss/build/oss_ali5455.c:21:0:
/usr/lib/oss/build/module.inc:33:12: warning: ‘instance’ defined but not used [-Wunused-variable]
static int instance = 0;
^
In file included from /usr/lib/oss/build/module.inc:45:0,
from /usr/lib/oss/build/oss_ali5455.c:21:
/usr/lib/oss/build/pci_wrapper.inc:17:18: warning: ‘dev_map’ defined but not used [-Wunused-variable]
static dev_map_t dev_map[MAX_INSTANCE];
^
/usr/lib/oss/build/pci_wrapper.inc:18:12: warning: ‘n_devmap’ defined but not used [-Wunused-variable]
static int n_devmap = 0;
^
make[3]: *** [/usr/lib/oss/build/oss_ali5455.o] Error 1
make[2]: *** [_module_/usr/lib/oss/build] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/lib/oss/build'
Tried inserting osscore.ko manually with following results:
Code: Select all
$ sudo insmod /usr/lib/oss/build/osscore.ko
Error: could not insert module /usr/lib/oss/build/osscore.ko: Unknown symbol in moduleDon't know how to identify offending symbol.
Edit:
I was wrong to assume osscore.ko in build directory was a copy of osscore.ko in kernel modules directory. just noticed different file size.
Tried inserting osscore.ko manually with following results:
Code: Select all
$ sudo insmod /lib/modules/3.11.0-12-generic/kernel/oss/osscore.ko
Error: could not insert module /lib/modules/3.11.0-12-generic/kernel/oss/osscore.ko: Invalid parametersregards
Clive
Clive
Re: Building OSS4.2 for 3.11.0 Linux Kernel
seawright,
If you are using GCC version 4.8, try to use 4.7 instead. That's helped to me
If you are using GCC version 4.8, try to use 4.7 instead. That's helped to me
Re: Building OSS4.2 for 3.11.0 Linux Kernel
Have a look at the comments for the AUR package:
https://aur.archlinux.org/packages/oss/
https://aur.archlinux.org/packages/oss/
Re: Building OSS4.2 for 3.11.0 Linux Kernel
alexdw wrote:Have a look at the comments for the AUR package:
https://aur.archlinux.org/packages/oss/
According to those comments, the problem is that the new version of gcc "generates calls to memmove":
https://bugs.archlinux.org/task/35672#comment114487
> OSS doesn't use memmove at all so this problem must be caused by some
> new version of gcc that geterates calls to memmove. I have never heard
> about this kind of problem.
Notice that gcc generates those calls from "nothing".
This might be a kind of backdoor:
It is also possible to create a backdoor without modifying the source code of a program, or even modifying it after compilation. This can be done by rewriting the compiler so that it recognizes code during compilation that triggers inclusion of a backdoor in the compiled output. When the compromised compiler finds such code, it compiles it as normal, but also inserts a backdoor (perhaps a password recognition routine). So, when the user provides that input, he gains access to some (likely undocumented) aspect of program operation. This attack was first outlined by Ken Thompson in his famous paper Reflections on Trusting Trust.
https://en.wikipedia.org/wiki/Backdoor_(computing)#Overview
Who is online
Users browsing this forum: No registered users and 6 guests