* make tools ERROR in latest xen-unstable.hg
@ 2011-06-17 6:29 Ren, Yongjie
2011-06-17 7:01 ` Vincent Hanquez
0 siblings, 1 reply; 9+ messages in thread
From: Ren, Yongjie @ 2011-06-17 6:29 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
Hi all,
In our test, xen-unstable build fails. When running 'make tools', I got the following error. Do you have the same issue ?
xl_cmdimpl.c: In function 'acquire_lock':
xl_cmdimpl.c:202: error: 'O_CLOEXEC' undeclared (first use in this function)
xl_cmdimpl.c:202: error: (Each undeclared identifier is reported only once
xl_cmdimpl.c:202: error: for each function it appears in.)
my repository is from: http://xenbits.xensource.com/xen-unstable.hg
changeset: 23542:23c068b10923
tag: tip
user: Andrew Cooper <andrew.cooper3@citrix.com>
date: Wed Jun 15 16:16:41 2011 +0100
summary: KEXEC: correctly revert x2apic state when kexecing
Best Regards,
Yongjie Ren (Jay)
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: make tools ERROR in latest xen-unstable.hg 2011-06-17 6:29 make tools ERROR in latest xen-unstable.hg Ren, Yongjie @ 2011-06-17 7:01 ` Vincent Hanquez 2011-06-17 7:58 ` Zhang, Yang Z 0 siblings, 1 reply; 9+ messages in thread From: Vincent Hanquez @ 2011-06-17 7:01 UTC (permalink / raw) To: Ren, Yongjie; +Cc: xen-devel@lists.xensource.com On 06/17/2011 07:29 AM, Ren, Yongjie wrote: > Hi all, > In our test, xen-unstable build fails. When running 'make tools', I got the following error. Do you have the same issue ? > xl_cmdimpl.c: In function 'acquire_lock': > xl_cmdimpl.c:202: error: 'O_CLOEXEC' undeclared (first use in this function) > xl_cmdimpl.c:202: error: (Each undeclared identifier is reported only once > xl_cmdimpl.c:202: error: for each function it appears in.) I've just got bitten by that in another repository [1] looks like you use an old distribution (flags that appears in the kernel in 2.6.23). The solution is simple since there's no need for the atomicity: it consists in removing O_CLOEXEC and switching to fcntl(fd, F_SETFD, FD_CLOEXEC) [1] https://github.com/xen-org/xen-api-libs/commit/523e1c5364e11e0d5bbd5308988c263392df0559 -- Vincent ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: make tools ERROR in latest xen-unstable.hg 2011-06-17 7:01 ` Vincent Hanquez @ 2011-06-17 7:58 ` Zhang, Yang Z 2011-06-17 8:12 ` Vincent Hanquez 0 siblings, 1 reply; 9+ messages in thread From: Zhang, Yang Z @ 2011-06-17 7:58 UTC (permalink / raw) To: Vincent Hanquez, Ren, Yongjie; +Cc: xen-devel@lists.xensource.com So, will you submit a patch to fix it? best regards yang > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Vincent > Hanquez > Sent: Friday, June 17, 2011 3:02 PM > To: Ren, Yongjie > Cc: xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] make tools ERROR in latest xen-unstable.hg > > On 06/17/2011 07:29 AM, Ren, Yongjie wrote: > > Hi all, > > In our test, xen-unstable build fails. When running 'make tools', I got the > following error. Do you have the same issue ? > > xl_cmdimpl.c: In function 'acquire_lock': > > xl_cmdimpl.c:202: error: 'O_CLOEXEC' undeclared (first use in this > > function) > > xl_cmdimpl.c:202: error: (Each undeclared identifier is reported only > > once > > xl_cmdimpl.c:202: error: for each function it appears in.) > > I've just got bitten by that in another repository [1] looks like you use an old > distribution (flags that appears in the kernel in 2.6.23). > > The solution is simple since there's no need for the atomicity: it consists in > removing O_CLOEXEC and switching to fcntl(fd, F_SETFD, > FD_CLOEXEC) > > [1] > https://github.com/xen-org/xen-api-libs/commit/523e1c5364e11e0d5bbd5308 > 988c263392df0559 > > -- > Vincent > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: make tools ERROR in latest xen-unstable.hg 2011-06-17 7:58 ` Zhang, Yang Z @ 2011-06-17 8:12 ` Vincent Hanquez 2011-06-20 14:29 ` make tools ERROR in latest xen-unstable.hg [and 1 more messages] Ian Jackson 0 siblings, 1 reply; 9+ messages in thread From: Vincent Hanquez @ 2011-06-17 8:12 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: Ren, Yongjie, xen-devel@lists.xensource.com On 06/17/2011 08:58 AM, Zhang, Yang Z wrote: > So, will you submit a patch to fix it? I'm not in a position to submit a patch right now, otherwise i would have done so already. So i expect someone else will do it; And the best scenario would be the reporter of the bug, that can actually test the fix to actually do it (specially with guided instructions on how to fix it). -- Vincent ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: make tools ERROR in latest xen-unstable.hg [and 1 more messages] 2011-06-17 8:12 ` Vincent Hanquez @ 2011-06-20 14:29 ` Ian Jackson 2011-06-21 7:28 ` [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c Ren, Yongjie 0 siblings, 1 reply; 9+ messages in thread From: Ian Jackson @ 2011-06-20 14:29 UTC (permalink / raw) To: Vincent Hanquez, Ren, Yongjie; +Cc: xen-devel@lists.xensource.com Ren, Yongjie writes ("[Xen-devel] make tools ERROR in latest xen-unstable.hg"): > Hi all, > In our test, xen-unstable build fails. When running 'make tools', I got the following error. Do you have the same issue ? > xl_cmdimpl.c: In function 'acquire_lock': > xl_cmdimpl.c:202: error: 'O_CLOEXEC' undeclared (first use in this function) > xl_cmdimpl.c:202: error: (Each undeclared identifier is reported only once > xl_cmdimpl.c:202: error: for each function it appears in.) Thanks for the report. Vincent Hanquez writes ("Re: [Xen-devel] make tools ERROR in latest xen-unstable.hg"): > I'm not in a position to submit a patch right now, otherwise i would > have done so already. So i expect someone else will do it; And the > best scenario would be the reporter of the bug, that can actually > test the fix to actually do it (specially with guided instructions > on how to fix it). Thanks for the diagnosis etc. Quite so. Yongjie Ren, would you care to propose such a patch ? It shouldn't be too hard. Remove O_CLOEXEC and add a call to fcntl F_SETFD FD_CLOEXEC; there's an example in libxl_bootloader.c. Ian. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c 2011-06-20 14:29 ` make tools ERROR in latest xen-unstable.hg [and 1 more messages] Ian Jackson @ 2011-06-21 7:28 ` Ren, Yongjie 2011-06-21 14:31 ` Ian Jackson 0 siblings, 1 reply; 9+ messages in thread From: Ren, Yongjie @ 2011-06-21 7:28 UTC (permalink / raw) To: Ian Jackson, Vincent Hanquez; +Cc: xen-devel@lists.xensource.com Hi all, Some old linux kernel such as 2.6.18 which rhel5u5 natively used haven't defined O_CLOEXEC, so remove O_CLOEXEC in xl_cmdimpl.c Signed-off-by: Yongjie Ren <yongjie.ren@intel.com> diff -r eca057e4475c tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Fri Jun 17 08:08:13 2011 +0100 +++ b/tools/libxl/xl_cmdimpl.c Tue Jun 21 14:37:03 2011 +0800 @@ -199,11 +199,16 @@ fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; - fd_lock = open(lockfile, O_WRONLY|O_CREAT|O_CLOEXEC, S_IWUSR); + fd_lock = open(lockfile, O_WRONLY|O_CREAT, S_IWUSR); if (fd_lock < 0) { fprintf(stderr, "cannot open the lockfile %s errno=%d\n", lockfile, errno); return ERROR_FAIL; } + if (fcntl(fd_lock, F_SETFD, FD_CLOEXEC) < 0) { + close(fd_lock); + fprintf(stderr, "cannot set cloexec to lockfile %s errno=%d\n", lockfile, errno); + return ERROR_FAIL; + } get_lock: rc = fcntl(fd_lock, F_SETLKW, &fl); if (rc < 0 && errno == EINTR) Best Regards, Yongjie Ren (Jay) -----Original Message----- From: Ian Jackson [mailto:Ian.Jackson@eu.citrix.com] Sent: Monday, June 20, 2011 10:29 PM To: Vincent Hanquez; Ren, Yongjie Cc: xen-devel@lists.xensource.com Subject: Re: [Xen-devel] make tools ERROR in latest xen-unstable.hg [and 1 more messages] Ren, Yongjie writes ("[Xen-devel] make tools ERROR in latest xen-unstable.hg"): > Hi all, > In our test, xen-unstable build fails. When running 'make tools', I got the following error. Do you have the same issue ? > xl_cmdimpl.c: In function 'acquire_lock': > xl_cmdimpl.c:202: error: 'O_CLOEXEC' undeclared (first use in this function) > xl_cmdimpl.c:202: error: (Each undeclared identifier is reported only once > xl_cmdimpl.c:202: error: for each function it appears in.) Thanks for the report. Vincent Hanquez writes ("Re: [Xen-devel] make tools ERROR in latest xen-unstable.hg"): > I'm not in a position to submit a patch right now, otherwise i would > have done so already. So i expect someone else will do it; And the > best scenario would be the reporter of the bug, that can actually > test the fix to actually do it (specially with guided instructions > on how to fix it). Thanks for the diagnosis etc. Quite so. Yongjie Ren, would you care to propose such a patch ? It shouldn't be too hard. Remove O_CLOEXEC and add a call to fcntl F_SETFD FD_CLOEXEC; there's an example in libxl_bootloader.c. Ian. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c 2011-06-21 7:28 ` [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c Ren, Yongjie @ 2011-06-21 14:31 ` Ian Jackson 2011-06-21 15:14 ` Christoph Egger 0 siblings, 1 reply; 9+ messages in thread From: Ian Jackson @ 2011-06-21 14:31 UTC (permalink / raw) To: Ren, Yongjie; +Cc: xen-devel@lists.xensource.com, Vincent Hanquez Ren, Yongjie writes ("[Xen-devel] [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c"): > Hi all, > Some old linux kernel such as 2.6.18 which rhel5u5 natively used haven't defined O_CLOEXEC, so remove O_CLOEXEC in xl_cmdimpl.c > > Signed-off-by: Yongjie Ren <yongjie.ren@intel.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> Thanks, Ian. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c 2011-06-21 14:31 ` Ian Jackson @ 2011-06-21 15:14 ` Christoph Egger 2011-06-21 15:20 ` Ian Jackson 0 siblings, 1 reply; 9+ messages in thread From: Christoph Egger @ 2011-06-21 15:14 UTC (permalink / raw) To: xen-devel The applied version looks like to be a OS specific workaround. NetBSD has O_CLOEXEC. Christoph On 06/21/11 16:31, Ian Jackson wrote: > Ren, Yongjie writes ("[Xen-devel] [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c"): >> Hi all, >> Some old linux kernel such as 2.6.18 which rhel5u5 natively >> used haven't defined O_CLOEXEC, so remove O_CLOEXEC in xl_cmdimpl.c >> >> Signed-off-by: Yongjie Ren<yongjie.ren@intel.com> > > Acked-by: Ian Jackson<ian.jackson@eu.citrix.com> > Committed-by: Ian Jackson<ian.jackson@eu.citrix.com> > > Thanks, > Ian. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c 2011-06-21 15:14 ` Christoph Egger @ 2011-06-21 15:20 ` Ian Jackson 0 siblings, 0 replies; 9+ messages in thread From: Ian Jackson @ 2011-06-21 15:20 UTC (permalink / raw) To: Christoph Egger; +Cc: xen-devel Christoph Egger writes ("Re: [Xen-devel] [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c"): > > The applied version looks like to be a OS specific workaround. I'm not sure what you mean. O_CLOEXEC is not universally available, so avoiding it where possible is a good thing. > NetBSD has O_CLOEXEC. How is that relevant ? Ian. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-06-21 15:20 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-17 6:29 make tools ERROR in latest xen-unstable.hg Ren, Yongjie 2011-06-17 7:01 ` Vincent Hanquez 2011-06-17 7:58 ` Zhang, Yang Z 2011-06-17 8:12 ` Vincent Hanquez 2011-06-20 14:29 ` make tools ERROR in latest xen-unstable.hg [and 1 more messages] Ian Jackson 2011-06-21 7:28 ` [PATCH] tools/libxl: remove O_CLOEXEC in xl_cmdimpl.c Ren, Yongjie 2011-06-21 14:31 ` Ian Jackson 2011-06-21 15:14 ` Christoph Egger 2011-06-21 15:20 ` Ian Jackson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.