Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255524 - net-fs/openafs-kernel-1.4.8 fails to build with gentoo-sources-2.6.28-r1
Summary: net-fs/openafs-kernel-1.4.8 fails to build with gentoo-sources-2.6.28-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-19 17:26 UTC by Andrej Filipcic
Modified: 2009-01-31 17:35 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Filipcic 2009-01-19 17:26:58 UTC
openafs-kernel-1.4.8 fails to build with the recent kernel sources. I guess it would fail with both 2.6.27.12 and 2.6.28.1 based kernels.

/var/tmp/portage/net-fs/openafs-kernel-1.4.8/work/openafs-1.4.8/src/libafs/MODLOAD-2.6.28-gentoo-r1-MP/osi_vnodeops.c:1794: error: implicit declaration of function ‘__grab_cache_page’
Comment 1 Andrej Filipcic 2009-01-19 22:03:29 UTC
Applying the patch http://www.openafs.org/cgi-bin/wdelta/STABLE14-linux-2629-20090115?diff&f=u and replacing __grab_cache_page with grab_cache_page
does the trick.
Comment 2 Dale Pontius 2009-01-23 15:54:07 UTC
Pardon my ignorance, but how does one apply the patch?

I tried "ebuild ...openafs-kernel... unpack" followed by applying the patch, followed by "ebuild ...openafs-kernel... compile.

First off, the unpack step wasn't simply an unpack - it looked as if several preconfiguration steps were run.  Then 2 hunks of the patch were rejected - it appears on files that were touched or involved in the preconfiguration steps.  Finally the compile failed.

I've also tried adding the patch into /usr/portage/net-fs/openafs-kernel/files and rebuilding the digest.  This just failed to compile, as well.  I saw no sign of the patch being applied.

At build time the patches come from /var/tmp/portage/net-fs....work/gentoo/patches, and I see no correlation between the contents of this directory and what's in the /usr/portage/net-fs/openafs-kernel/files directory.  This is probably simple, once you know the tricks.  Help?
Comment 3 Andrej Filipcic 2009-01-23 16:00:35 UTC
Actually, I tried without the patch and it works. You only have to use grab_cache_page instead of __grab_cache_page. The patch itself is a bit unclean.
Comment 4 Dale Pontius 2009-01-23 18:26:34 UTC
Confirmed - the manual fix works for me, as well.
Comment 5 Marc Dionne 2009-01-26 14:11:13 UTC
The reason to use grab_cache_page_write_begin instead of plain grab_cache_page is because it will unset the GFP_FS flag when allocating the page, which prevents the allocation code path from potentially recursing back into filesystem code.  It probably won't make any difference most of the time, but could cause deadlocks or other problems when under memory pressure.

What's "unclean" about the patch?  Yes there are a lot more changes, but those are needed for 2.6.29.
Comment 6 Andrej Filipcic 2009-01-26 14:42:09 UTC
(In reply to comment #5)

> What's "unclean" about the patch?  Yes there are a lot more changes, but those
> are needed for 2.6.29.

I did not mean the patch contents. The patch has to be corrected a bit (rcs headers) before it can be applied to the source. But still, __grab_cache_page is still there and the compile fails event with the patch applied.

Comment 7 Marc Dionne 2009-01-26 15:07:54 UTC
(In reply to comment #6)
> I did not mean the patch contents. The patch has to be corrected a bit (rcs
> headers) before it can be applied to the source. But still, __grab_cache_page
> is still there and the compile fails event with the patch applied.

If you grab the diff directly from the RT ticket it won't have those RCS headers.

The patch adds new configure tests, so the autoconf files (configure, etc.) need to be regenerated - was this done?  (the regen.sh script in the source root can be used)
Comment 8 Juergen Rose 2009-01-30 10:41:10 UTC
I have the same error with vanilla-sources-2.6.28.2.
Comment 9 Stefaan De Roeck (RETIRED) gentoo-dev 2009-01-31 17:35:36 UTC
This should be fixed in net-fs/openafs-kernel-1.4.8-r1, tested on amd64 with kernel 2.6.28-gentoo-r1.  Please report back if it does not work for you.  
Thanks for reporting.