Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 446374 - >=net-fs/nfs-utils-1.2.6 with >dev-libs/libevent-2.1 - In function ‘nfsdreopen_one’: idmapd.c:715:20: error: ‘struct event’ has no member named ‘ev_flags’
Summary: >=net-fs/nfs-utils-1.2.6 with >dev-libs/libevent-2.1 - In function ‘nfsdreope...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Network Filesystems
URL: http://www.spinics.net/lists/linux-nf...
Whiteboard:
Keywords: PATCH, PMASKED
: 496766 536812 536860 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-07 16:04 UTC by Jeroen Roovers (RETIRED)
Modified: 2015-01-31 17:43 UTC (History)
13 users (show)

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


Attachments
net-fs:nfs-utils-1.2.6:20121207-150858.log (20121207-150858.log,56.09 KB, text/plain)
2012-12-07 16:04 UTC, Jeroen Roovers (RETIRED)
Details
nfs-utils-1.3.1-libevent-2.1.patch (nfs-utils-1.3.1-libevent-2.1.patch,337 bytes, patch)
2015-01-16 20:40 UTC, Jeroen Roovers (RETIRED)
Details | Diff
nfs-utils-1.3.1-libevent2.patch (nfs-utils-1.3.1-libevent2.patch,4.91 KB, patch)
2015-01-26 16:16 UTC, Honza Macháček
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2012-12-07 16:04:31 UTC
Created attachment 331744 [details]
net-fs:nfs-utils-1.2.6:20121207-150858.log

Making all in idmapd
make[2]: Entering directory `/var/tmp/portage/net-fs/nfs-utils-1.2.6/work/nfs-utils-1.2.6/utils/idmapd'
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes  -pipe -march=pentium4 --param l1-cache-size=8 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=pentium4 -O2 -pipe -Wall -ggdb -c idmapd.c
idmapd.c: In function ‘nfsdreopen_one’:
idmapd.c:715:20: error: ‘struct event’ has no member named ‘ev_flags’
make[2]: *** [idmapd.o] Error 1
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-02 14:29:24 UTC
*** Bug 496766 has been marked as a duplicate of this bug. ***
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-16 20:40:05 UTC
Created attachment 394108 [details, diff]
nfs-utils-1.3.1-libevent-2.1.patch

The code is pretty vague, but maybe something like this.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-17 11:15:04 UTC
*** Bug 536812 has been marked as a duplicate of this bug. ***
Comment 4 Patrick Lauer gentoo-dev 2015-01-17 11:31:16 UTC
+  17 Jan 2015; Patrick Lauer <patrick@gentoo.org> nfs-utils-1.3.1-r1.ebuild:
+  Fix libevent depend to avoid compile failures #536812

Temp fix to remove user-visible breakage, forces downgrade of libevent
Comment 5 walt 2015-01-17 15:19:50 UTC
(In reply to Jeroen Roovers from comment #2)
> Created attachment 394108 [details, diff] [details, diff]
> nfs-utils-1.3.1-libevent-2.1.patch
> 
> The code is pretty vague, but maybe something like this.

I just tried your patch and it seems to work, though I'm not sure I'm actually exercising the affected idmapd code.  Any idea how to make sure that code is really being executed?

(I'm exporting /usr/portage on my home network and the client machines nfs-mount it successfully after your patch, using either nfs3 or nfs4.)
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-17 18:03:13 UTC
*** Bug 536860 has been marked as a duplicate of this bug. ***
Comment 7 Holger Hoffstätte 2015-01-17 18:26:31 UTC
(In reply to Jeroen Roovers from comment #2)
> Created attachment 394108 [details, diff] [details, diff]
> nfs-utils-1.3.1-libevent-2.1.patch
> 
> The code is pretty vague, but maybe something like this.

This looks good since direct use of EVLIST_INIT seems to be strongly discouraged and event_initialized() is the proper public API to use.

Since nfs-utils is currently in the 1.3.2-rc stage I've forwarded this to the linux-nfs list. Maybe it will be directly fixed upstream.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-19 11:06:25 UTC
(In reply to Holger Hoffstätte from comment #7)
> (In reply to Jeroen Roovers from comment #2)
> > Created attachment 394108 [details, diff] [details, diff] [details, diff]
> > nfs-utils-1.3.1-libevent-2.1.patch
> > 
> > The code is pretty vague, but maybe something like this.
> 
> This looks good since direct use of EVLIST_INIT seems to be strongly
> discouraged and event_initialized() is the proper public API to use.
> 
> Since nfs-utils is currently in the 1.3.2-rc stage I've forwarded this to
> the linux-nfs list. Maybe it will be directly fixed upstream.

Great. Do note that the code uses libevent's structs elsewhere, too.
Comment 9 Holger Hoffstätte 2015-01-22 15:54:41 UTC
So now that 1.3.1-r1 is marked stable I decided to test this for myself:
- created a -r2 ebuild
- changed the blocker to >=libevent-2.0
- added epatch_user
- dropped the patch into /etc/portage/
- rebuilt

So far no problems with neither NFS server or client. Firefox/Thunderbird are still rebuilding, but I don't really expect any problems there either.

Any chance we can drop this into ~arch as -r2 so that we can give libevent-2.1.x a workout?
Comment 10 Holger Hoffstätte 2015-01-23 14:22:04 UTC
Good news - the fix just went into upstream:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=178ae731618d46b5df1ab227dfa0c96920c675df
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-23 14:26:42 UTC
Attribution missing...
Comment 12 Maciej S. Szmigiero 2015-01-25 21:30:50 UTC
nfs-utils-1.3.0-r1.ebuild needs this treatment, too.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-25 22:04:43 UTC
(In reply to Maciej Szmigiero from comment #12)
> nfs-utils-1.3.0-r1.ebuild needs this treatment, too.

That's what ">=net-fs/nfs-utils-1.2.6" in the Summary means.
Comment 14 Maciej S. Szmigiero 2015-01-25 23:00:49 UTC
(In reply to Jeroen Roovers from comment #13)
> (In reply to Maciej Szmigiero from comment #12)
> > nfs-utils-1.3.0-r1.ebuild needs this treatment, too.
> 
> That's what ">=net-fs/nfs-utils-1.2.6" in the Summary means.

What I meant is that currently (as stated in comment 4) only nfs-utils-1.3.1-r1.ebuild has this fix (or workaround), older versions currently available in tree still have this problem.

In my case I used nfs-utils-1.3.0 for now, since 1.3.1 needs an OpenRC update.
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-26 08:46:47 UTC
(In reply to Maciej Szmigiero from comment #14)
> What I meant is that currently (as stated in comment 4) only
> nfs-utils-1.3.1-r1.ebuild has this fix (or workaround), older versions
> currently available in tree still have this problem.

1.3.1-r1 has the backward dependency. The other ebuilds are not exposed to libevent-2.1 since they wouldn't be selected in either the stable or unstable branch. Any local mixing of branches is unsupported and requires your own local fix (like temporarily masking some or other).
Comment 16 Honza Macháček 2015-01-26 16:16:30 UTC
Created attachment 394942 [details, diff]
nfs-utils-1.3.1-libevent2.patch

Looks like only idmapd.c uses libevent, so I've attempted porting it to libevent-2.x completely. I've tried to use code compatible with both libevent-2.x and libevent-1.4 (hence the explicit use of event_ functions instead of the evtimer_ and signal_/evsignal_ macros) but I haven't tested the compilation against the old library. Neither I have tested proper function of the patched code, I've only verified it compiles and I am able to mount an NFS volume.
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-26 18:44:03 UTC
(In reply to Honza Macháček from comment #16)
> Created attachment 394942 [details, diff] [details, diff]
> nfs-utils-1.3.1-libevent2.patch

It's worked fine with libevent-2 for years now.

> Looks like only idmapd.c uses libevent, so I've attempted porting it to
> libevent-2.x completely. I've tried to use code compatible with both
> libevent-2.x and libevent-1.4 (hence the explicit use of event_ functions
> instead of the evtimer_ and signal_/evsignal_ macros) but I haven't tested
> the compilation against the old library. Neither I have tested proper
> function of the patched code, I've only verified it compiles and I am able
> to mount an NFS volume.

Upstream should surely be interested in that. Why do you bring it up here?
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-31 17:27:29 UTC
This issue is fixed in 1.3.2. Sadly someone apparently blind to both reported bugs and has:

1) not removed the downward version dependency and
2) failed to add a new dependency for kerberos? ( dev-libs/libevent ).[1]


[1] http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blobdiff;f=configure.ac;h=4448ba53feb3acb0009c8adcf5d1c2bf54a11689;hp=f667abec4a1e0ee5a817a37be6a8a31bcc8c46fc;hb=cca657e86ba84da532138e7b6da30e37701202db;hpb=b57865a8cf8b44044ca9993c4a954235731d182f
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-31 17:29:17 UTC
(In reply to Jeroen Roovers from comment #18)

> reported bugs and has:

and upstream change logs has*
Comment 20 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-31 17:43:03 UTC
Fixed in 1.3.2, then.