OSS fails to build against Linux 4.0 [SOLVED]
Moderators: dev, hannu, cesium
OSS fails to build against Linux 4.0 [SOLVED]
Linux 4.0 is released, but the current OSS release fails to build against it (problems with include files, apparently). Any chance to get a working version or a patch against the current one ?
Last edited by oss117 on Sat Apr 25, 2015 9:27 pm, edited 1 time in total.
Patch to build OSS against Linux 4.0
Well, let's reply my own question with my own patch...
There were two issues:
Here is the corresponding patch (to be applied with: 'patch -p1 -s' from inside the OSS sources tree):
There were two issues:
- a test in the configuration scripts, supposed to detect Linux kernel v2.4 was mistaking v4.0 for v2.4...
- read_cr4() and write_cr4() have been renamed into __read_cr4() and __write_cr4() in Linux 4.0.
Here is the corresponding patch (to be applied with: 'patch -p1 -s' from inside the OSS sources tree):
-
nuc
- Moderator
- Posts: 111
- Joined: Fri Aug 03, 2012 10:20 am
- Sound Card: Khadas Tone Board
- OS: ArchLinux
- Contact:
Re: OSS fails to build against Linux 4.0 [SOLVED]
At least somebody is still motivated to fix those issues... thanks oss117!
https://github.com/Nuc1eoN/4Front-Tech-Website
Re: Patch to build OSS against Linux 4.0
oss117 wrote:Well, let's reply my own question with my own patch...
There were two issues:
- a test in the configuration scripts, supposed to detect Linux kernel v2.4 was mistaking v4.0 for v2.4...
- read_cr4() and write_cr4() have been renamed into __read_cr4() and __write_cr4() in Linux 4.0.
Here is the corresponding patch (to be applied with: 'patch -p1 -s' from inside the OSS sources tree):
Thank you! I'm adding your patch to the Arch (AUR) packages.
Re: OSS fails to build against Linux 4.0 [SOLVED]
Seems to be broken again in Linux 4.0.4. 
Re: OSS fails to build against Linux 4.0 [SOLVED]
alexdw wrote:Seems to be broken again in Linux 4.0.4.
Not at all... Working just fine, here with Linux v4.0.4: it both auto-compiled the new modules on kernel update and I still can build the package under v4.0.4.
Re: OSS fails to build against Linux 4.0 [SOLVED]
oss117 wrote:alexdw wrote:Seems to be broken again in Linux 4.0.4.
Not at all... Working just fine, here with Linux v4.0.4: it both auto-compiled the new modules on kernel update and I still can build the package under v4.0.4.
Thanks for the information. You are right - it appears that it wasn't Linux 4.0.4 which prevents me from building oss but a new version of gcc (5.1.0).
Re: OSS fails to build against Linux 4.0 [SOLVED]
alexdw wrote:it appears that it wasn't Linux 4.0.4 which prevents me from building oss but a new version of gcc (5.1.0).
It may happen. Similar problems were reported for gcc-4.8 (they were somehow fixed).
Please keep us informed about such problems.
For Ubuntu users:
It is not difficult to switch to an older version of gcc.
You have to install it from the official repository, and change the so-called "symbolic link"
_http://askubuntu.com/questions/26498/choose-gcc-and-g-version/26502#26502
Code: Select all
$ apt-cache search --names-only gcc- Code: Select all
$ sudo apt-get install gcc-[old.version] Download the source code of OSS4 from "git":
Code: Select all
$ sudo apt-get install git
$ mkdir mumu
$ cd mumu
$ git clone git://opensound.git.sourceforge.net/gitroot/opensound/opensound opensound-git Re: OSS fails to build against Linux 4.0 [SOLVED]
igorzwx wrote:alexdw wrote:it appears that it wasn't Linux 4.0.4 which prevents me from building oss but a new version of gcc (5.1.0).
It may happen. Similar problems were reported for gcc-4.8 (they were somehow fixed).
Please keep us informed about such problems.
For Ubuntu users:
It is not difficult to switch to an older version of gcc.
BEWARE: when using a different version of gcc than the one shipped with your distro as the "system compiler", you will have to ensure both the kernel and any third party modules (such as OSS) are indeed compiled with the same gcc version. Else you'll most likely get crashes and kernel panics...
Re: OSS fails to build against Linux 4.0 [SOLVED]
oss117 wrote:BEWARE: when using a different version of gcc than the one shipped with your distro as the "system compiler", you will have to ensure both the kernel and any third party modules (such as OSS) are indeed compiled with the same gcc version. Else you'll most likely get crashes and kernel panics...
Such problems have not been reported (at least, on this forum) for experiments with gcc-4.8 and its older versions.
It seems that there is not a big difference between gcc versions, except, perhaps, for some new bugs and/or "backdoors".
Compiler backdoors
_https://en.wikipedia.org/wiki/Backdoor_(computing)#Compiler_backdoors
Everything may happen, of course. Notice, however, that "kernel panics can also be caused by errors originating outside of kernel space. For example, many Unix OSes panic if the init process, which runs in userspace, terminates" _https://en.wikipedia.org/wiki/Kernel_panic
Re: OSS fails to build against Linux 4.0 [SOLVED]
igorzwx wrote:Such problems have not been reported (at least, on this forum) for experiments with gcc-4.8 and its older versions.
Updating from a major version to another (e.g. 4.8 to 5.1) or even a minor version to another (e.g v4.3 to 4.8 ) *will* cause breakage between kernel and modules when they are not compiled with the same version. This is due to the API changes (and function calling convention, such as parameters passed to functions in registers instead of the stack, or issues with stack protectors, etc).
Final word: you *must* compile both the kernel and modules with the *same* gcc version (major.minor at least. The micro number is not an issue).
Re: OSS fails to build against Linux 4.0 [SOLVED]
oss117 wrote:igorzwx wrote:Such problems have not been reported (at least, on this forum) for experiments with gcc-4.8 and its older versions.
Updating from a major version to another (e.g. 4.8 to 5.1) or even a minor version to another (e.g v4.3 to 4.8 ) *will* cause breakage between kernel and modules when they are not compiled with the same version. This is due to the API changes (and function calling convention, such as parameters passed to functions in registers instead of the stack, or issues with stack protectors, etc).
Final word: you *must* compile both the kernel and modules with the *same* gcc version (major.minor at least. The micro number is not an issue).
What was reported on this forum is that OSS4 was successfully compiled with gcc-4.7 (instead of gcc-4.8 ) and gcc-4.6 (instead of gcc-4.8 ). No problems were reported.
Of course, it is better to have everything compiled with the same compiler.
On the other hand, if you install the newest Ubuntu with the newest kernel and compiler, you need not to expect a stable performance. In 2009-2010, for example, the so-called "Brown Screen of Death" was not something unusual for Ubuntu users.
Re: OSS fails to build against Linux 4.0 [SOLVED]
igorzwx wrote:alexdw wrote:it appears that it wasn't Linux 4.0.4 which prevents me from building oss but a new version of gcc (5.1.0).
It may happen. Similar problems were reported for gcc-4.8 (they were somehow fixed).
I have made a quick and dirty patch for this (see attached) based on the information in the GCC 5 porting guide:
https://gcc.gnu.org/gcc-5/porting_to.html
- Attachments
-
- gcc-5.patch.txt
- Linux patch for gcc-5.
- (1.39 KiB) Downloaded 1343 times
Who is online
Users browsing this forum: No registered users and 169 guests