Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62502 - net-fs/davfs2-0.2.2 does not compile because of kernel headers
Summary: net-fs/davfs2-0.2.2 does not compile because of kernel headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 All
: High major (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 05:26 UTC by tklauser
Modified: 2004-11-27 06:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Makefile.in patch to fix the path to kernel headers (davfs2-kernel-headers.patch,398 bytes, patch)
2004-09-01 05:27 UTC, tklauser
Details | Diff
New ebuild for davfs-0.2.2 (davfs2-0.2.2-r1.ebuild,1.06 KB, text/plain)
2004-09-01 05:28 UTC, tklauser
Details
Ebuild with correct header (davfs2-0.2.2-r1.ebuild,990 bytes, text/plain)
2004-09-25 03:34 UTC, tklauser
Details
Patch to make davfs build against 2.6 (davfs2-2.6.8-patch.diff,20.37 KB, patch)
2004-10-24 10:52 UTC, Brad Laue (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tklauser 2004-09-01 05:26:06 UTC
net-fs/davfs-0.2.2 (0.2.1 too) uses the Kernel headers from /usr/src/linux rather than from /usr/include/linux

I made a patch (on Makefile.in) for this issue and also a new ebuild, which also fixes Bug #62231 and makes use of the USE flags socks5 and xml2.

The new ebuild (which uses the patch) has been tested and works on my system.

I'm looking forward to see this in portage.
Comment 1 tklauser 2004-09-01 05:27:38 UTC
Created attachment 38670 [details, diff]
Makefile.in patch to fix the path to kernel headers
Comment 2 tklauser 2004-09-01 05:28:44 UTC
Created attachment 38672 [details]
New ebuild for davfs-0.2.2

I appended -r1 to make it work in my PORTDIR_OVERLAY. Dunno if you want to use
it as such.
Comment 3 tklauser 2004-09-25 03:34:11 UTC
Created attachment 40360 [details]
Ebuild with correct header

Former ebuild had incorrect CVS header (already filled out)
Comment 4 Brad Laue (RETIRED) gentoo-dev 2004-10-24 10:32:22 UTC
A bigger problem is that even with this patch davfs2 won't build if one has linux26-headers installed. :(
Comment 5 Brad Laue (RETIRED) gentoo-dev 2004-10-24 10:52:30 UTC
Created attachment 42505 [details, diff]
Patch to make davfs build against 2.6

Bit more elegant patch for davfs2. Replaces the makefile patch and allows davfs
to build against a 2.6 kernel. 

This takes care of both systems with a 2.6 kernel and 2.4 headers in
/usr/include, and systems with a 2.6 kernel and 2.6 headers in /usr/include.
Comment 6 tklauser 2004-10-24 23:43:40 UTC
No! This patch makes davfs (still) build against kernel headers in /usr/src/linux/include which you _never_ should. Use the headers in /usr/include/linux

Read http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html for Linus' explanation about this issue.

Comment 7 tklauser 2004-11-10 11:11:09 UTC
davfs 0.2.3 was released by upstream. See bug #70692 for details.

I would leave 0.2.2 as is (only the security fix from 0.2.2-r1) applied and would recommend 0.2.3 to Kernel 2.6 users.
Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2004-11-24 12:03:48 UTC
Does 0.2.3 still suffer from this issue and is there still interest in fixing it?
Whats the problem with having includes from /usr/src/linux if there is a working kernel?
Comment 9 tklauser 2004-11-24 23:47:47 UTC
Thanks. I'll test 0.2.3 this evening.

The problem with compiling userspace tools against the Kernel headers in /usr/src/linux/include is that they may change quite often, if the Kernel developers change interfaces, structs etc. (Yes, that happens) So if you install a new Kernel and the headers slightly changed: Boom! The userspace tools won't compile anymore. That's exactly what happened with davfs 0.2.2

The Kernel headers in /usr/include are specially modifed versions of the Kernel headers which may be used by userspace programs.

Quoting Linus from http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html (It's 4 years old but I think it still applies):

"The fact is, that the header files should match the library you link
against, not the kernel you run on."

Perhaps this package may be a special case since it uses the coda LKM. Maybe one of Gentoo's Kernel developers can give a better explanation or maybe I'm even completely wrong. You may want to set them CC on this bug (I won't do so since I'm not a Gentoo developer).
Comment 10 Stefan Schweizer (RETIRED) gentoo-dev 2004-11-27 06:28:31 UTC
We do no longer depend on the headers tanks to johnms patch. Fixed in cvs.