* [PATCH] xfs-cmds: fix parallel installs in include/ dirs
@ 2008-12-29 22:19 Eric Sandeen
2008-12-30 11:52 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Eric Sandeen @ 2008-12-29 22:19 UTC (permalink / raw)
To: xfs-oss; +Cc: Mike Frysinger
This is for http://oss.sgi.com/bugzilla/show_bug.cgi?id=759
"fix parallel issue with include/ symlinks"
Doing something like "make -j2 install install-dev" would lead
to a race of removing & creating symlinks in include/
Thanks to Mike for reporting & suggesting the fix.
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: xfs-cmds/acl/include/Makefile
===================================================================
--- xfs-cmds.orig/acl/include/Makefile
+++ xfs-cmds/acl/include/Makefile
@@ -9,10 +9,10 @@ HFILES = acl.h libacl.h acl_ea.h misc.h
LSRCFILES = builddefs.in buildmacros buildrules config.h.in
LDIRT = sys acl
-default:
- rm -f sys acl
- $(LN_S) . sys
- $(LN_S) . acl
+sys acl:
+ $(LN_S) . $@
+
+default: sys acl
include $(BUILDRULES)
@@ -22,4 +22,5 @@ install-dev: default
$(INSTALL) -m 644 acl.h $(PKG_INC_DIR)/sys/acl.h
$(INSTALL) -m 755 -d $(PKG_INC_DIR)/acl
$(INSTALL) -m 644 libacl.h $(PKG_INC_DIR)/acl/libacl.h
+
install install-lib:
Index: xfs-cmds/attr/include/Makefile
===================================================================
--- xfs-cmds.orig/attr/include/Makefile
+++ xfs-cmds/attr/include/Makefile
@@ -11,13 +11,15 @@ HFILES = $(INST_HFILES) misc.h walk_tree
LSRCFILES = builddefs.in buildmacros buildrules config.h.in
LDIRT = $(INCDIR)
-default:
- rm -f $(INCDIR)
- $(LN_S) . $(INCDIR)
+$(INCDIR):
+ $(LN_S) . $@
+
+default: $(INCDIR)
include $(BUILDRULES)
install-dev: default
$(INSTALL) -m 755 -d $(PKG_INC_DIR)
$(INSTALL) -m 644 $(INST_HFILES) $(PKG_INC_DIR)
+
install install-lib:
Index: xfs-cmds/dmapi/include/Makefile
===================================================================
--- xfs-cmds.orig/dmapi/include/Makefile
+++ xfs-cmds/dmapi/include/Makefile
@@ -9,9 +9,10 @@ HFILES = dmapi.h
LSRCFILES = builddefs.in buildmacros buildrules dmapi_kern.h
LDIRT = xfs
-default install :
- rm -f xfs
- $(LN_S) . xfs
+xfs:
+ $(LN_S) . $@
+
+default install: xfs
include $(BUILDRULES)
Index: xfs-cmds/nfs4acl/include/Makefile
===================================================================
--- xfs-cmds.orig/nfs4acl/include/Makefile
+++ xfs-cmds/nfs4acl/include/Makefile
@@ -9,9 +9,10 @@ HFILES = nfs4acl.h nfs4acl-internal.h nf
LSRCFILES = builddefs.in buildmacros buildrules config.h.in
LDIRT = sys
-default:
- rm -f sys
- $(LN_S) . sys
+sys:
+ $(LN_S) . $@
+
+default: sys
include $(BUILDRULES)
@@ -19,4 +20,5 @@ install-dev: default
$(INSTALL) -m 755 -d $(PKG_INC_DIR)
$(INSTALL) -m 755 -d $(PKG_INC_DIR)/sys
$(INSTALL) -m 644 nfs4acl.h $(PKG_INC_DIR)/sys/nfs4acl.h
+
install install-lib:
Index: xfs-cmds/xfsprogs/include/Makefile
===================================================================
--- xfs-cmds.orig/xfsprogs/include/Makefile
+++ xfs-cmds/xfsprogs/include/Makefile
@@ -40,10 +40,10 @@ LSRCFILES += platform_defs.h.in builddef
LSRCFILES += command.h input.h path.h project.h
LDIRT = xfs disk
-default install :
- rm -f xfs disk
- $(LN_S) . xfs
- $(LN_S) . disk
+xfs disk:
+ $(LN_S) . $@
+
+default install: xfs disk
include $(BUILDRULES)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
2008-12-29 22:19 [PATCH] xfs-cmds: fix parallel installs in include/ dirs Eric Sandeen
@ 2008-12-30 11:52 ` Christoph Hellwig
2008-12-30 12:49 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2008-12-30 11:52 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Mike Frysinger, xfs-oss
On Mon, Dec 29, 2008 at 04:19:05PM -0600, Eric Sandeen wrote:
> This is for http://oss.sgi.com/bugzilla/show_bug.cgi?id=759
> "fix parallel issue with include/ symlinks"
>
> Doing something like "make -j2 install install-dev" would lead
> to a race of removing & creating symlinks in include/
>
> Thanks to Mike for reporting & suggesting the fix.
Looks good and I've put in in my queue. Any chance I could motivate
you to look over Mike's other build system changes in bugzilla?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
2008-12-30 11:52 ` Christoph Hellwig
@ 2008-12-30 12:49 ` Christoph Hellwig
2008-12-30 14:07 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2008-12-30 12:49 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Mike Frysinger, xfs-oss
On Tue, Dec 30, 2008 at 06:52:24AM -0500, Christoph Hellwig wrote:
> On Mon, Dec 29, 2008 at 04:19:05PM -0600, Eric Sandeen wrote:
> > This is for http://oss.sgi.com/bugzilla/show_bug.cgi?id=759
> > "fix parallel issue with include/ symlinks"
> >
> > Doing something like "make -j2 install install-dev" would lead
> > to a race of removing & creating symlinks in include/
> >
> > Thanks to Mike for reporting & suggesting the fix.
>
> Looks good and I've put in in my queue.
Actually spoken too soon. This breaks the acl build for me with:
gcc -g -O2 -DNDEBUG -funsigned-char -fno-strict-aliasing -Wall
-DVERSION=\"2.2.47\" -DLOCALEDIR=\"/usr/share/locale\"
-DPACKAGE=\"acl\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-include perm_copy.h -c acl_get_fd.c -fPIC -DPIC -o .libs/acl_get_fd.o
acl_get_fd.c:27:24: error: acl/libacl.h: No such file or directory
acl_get_fd.c: In function 'acl_get_fd':
acl_get_fd.c:62: warning: implicit declaration of function
'acl_from_mode'
acl_get_fd.c:62: warning: return makes pointer from integer without a
cast
It looks like the acl link in include/ doesn't get created properly
with this patch.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
2008-12-30 12:49 ` Christoph Hellwig
@ 2008-12-30 14:07 ` Mike Frysinger
2008-12-30 17:18 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2008-12-30 14:07 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Eric Sandeen, xfs-oss
[-- Attachment #1.1: Type: text/plain, Size: 1651 bytes --]
On Tuesday 30 December 2008 07:49:36 Christoph Hellwig wrote:
> On Tue, Dec 30, 2008 at 06:52:24AM -0500, Christoph Hellwig wrote:
> > On Mon, Dec 29, 2008 at 04:19:05PM -0600, Eric Sandeen wrote:
> > > This is for http://oss.sgi.com/bugzilla/show_bug.cgi?id=759
> > > "fix parallel issue with include/ symlinks"
> > >
> > > Doing something like "make -j2 install install-dev" would lead
> > > to a race of removing & creating symlinks in include/
> > >
> > > Thanks to Mike for reporting & suggesting the fix.
> >
> > Looks good and I've put in in my queue.
>
> Actually spoken too soon. This breaks the acl build for me with:
>
> gcc -g -O2 -DNDEBUG -funsigned-char -fno-strict-aliasing -Wall
> -DVERSION=\"2.2.47\" -DLOCALEDIR=\"/usr/share/locale\"
> -DPACKAGE=\"acl\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
> -include perm_copy.h -c acl_get_fd.c -fPIC -DPIC -o .libs/acl_get_fd.o
> acl_get_fd.c:27:24: error: acl/libacl.h: No such file or directory
> acl_get_fd.c: In function 'acl_get_fd':
> acl_get_fd.c:62: warning: implicit declaration of function
> 'acl_from_mode'
> acl_get_fd.c:62: warning: return makes pointer from integer without a
> cast
>
> It looks like the acl link in include/ doesn't get created properly
> with this patch.
acl-2.2.47 built fine for me with `./configure && make` and this patch ...
that said, if the only purpose of this is to make sure there are symlinks in
include/, why not do it at the tail end of configure ? then there will be no
weird parallel magic to worry about, and everything will always be available
once configure has finished.
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
2008-12-30 14:07 ` Mike Frysinger
@ 2008-12-30 17:18 ` Christoph Hellwig
2008-12-30 20:19 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2008-12-30 17:18 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Christoph Hellwig, Eric Sandeen, xfs-oss
On Tue, Dec 30, 2008 at 09:07:30AM -0500, Mike Frysinger wrote:
> acl-2.2.47 built fine for me with `./configure && make` and this patch ...
Works now after a make distclean for me.
> that said, if the only purpose of this is to make sure there are symlinks in
> include/, why not do it at the tail end of configure ? then there will be no
> weird parallel magic to worry about, and everything will always be available
> once configure has finished.
I'll leave that to Eric or anyone else who wants to play a build system
expert on TV :)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
2008-12-30 17:18 ` Christoph Hellwig
@ 2008-12-30 20:19 ` Mike Frysinger
2008-12-30 20:23 ` Eric Sandeen
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2008-12-30 20:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Eric Sandeen, xfs-oss
[-- Attachment #1.1: Type: text/plain, Size: 1617 bytes --]
On Tuesday 30 December 2008 12:18:25 Christoph Hellwig wrote:
> On Tue, Dec 30, 2008 at 09:07:30AM -0500, Mike Frysinger wrote:
> > acl-2.2.47 built fine for me with `./configure && make` and this patch
> > ...
>
> Works now after a make distclean for me.
>
> > that said, if the only purpose of this is to make sure there are symlinks
> > in include/, why not do it at the tail end of configure ? then there
> > will be no weird parallel magic to worry about, and everything will
> > always be available once configure has finished.
>
> I'll leave that to Eric or anyone else who wants to play a build system
> expert on TV :)
it's easy to do, i just dont know how people feel about the idea in general
diff --git a/configure.in b/configure.in
index 3c46c49..d227630 100644
--- a/configure.in
+++ b/configure.in
@@ -27,4 +27,11 @@ AC_MANUAL_FORMAT
AC_FUNC_GCC_VISIBILITY
-AC_OUTPUT(include/builddefs)
+AC_CONFIG_FILES(include/builddefs)
+AC_CONFIG_COMMANDS([include-symlinks], [
+ rm -f include/acl include/sys
+ ln -s . include/acl
+ ln -s . include/sys
+])
+AC_OUTPUT
+
diff --git a/include/Makefile b/include/Makefile
index f2eca14..d606fa2 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -10,13 +10,10 @@ LSRCFILES = builddefs.in buildmacros buildrules
config.h.in
LDIRT = sys acl
default:
- rm -f sys acl
- $(LN_S) . sys
- $(LN_S) . acl
include $(BUILDRULES)
-install-dev: default
+install-dev:
$(INSTALL) -m 755 -d $(PKG_INC_DIR)
$(INSTALL) -m 755 -d $(PKG_INC_DIR)/sys
$(INSTALL) -m 644 acl.h $(PKG_INC_DIR)/sys/acl.h
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
2008-12-30 20:19 ` Mike Frysinger
@ 2008-12-30 20:23 ` Eric Sandeen
0 siblings, 0 replies; 7+ messages in thread
From: Eric Sandeen @ 2008-12-30 20:23 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Christoph Hellwig, xfs-oss
Mike Frysinger wrote:
> On Tuesday 30 December 2008 12:18:25 Christoph Hellwig wrote:
>> On Tue, Dec 30, 2008 at 09:07:30AM -0500, Mike Frysinger wrote:
>>> acl-2.2.47 built fine for me with `./configure && make` and this patch
>>> ...
>> Works now after a make distclean for me.
>>
>>> that said, if the only purpose of this is to make sure there are symlinks
>>> in include/, why not do it at the tail end of configure ? then there
>>> will be no weird parallel magic to worry about, and everything will
>>> always be available once configure has finished.
>> I'll leave that to Eric or anyone else who wants to play a build system
>> expert on TV :)
>
> it's easy to do, i just dont know how people feel about the idea in general
Doesn't much matter to me; not sure what is customary. Both ways work
fine, I think.
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-30 20:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-29 22:19 [PATCH] xfs-cmds: fix parallel installs in include/ dirs Eric Sandeen
2008-12-30 11:52 ` Christoph Hellwig
2008-12-30 12:49 ` Christoph Hellwig
2008-12-30 14:07 ` Mike Frysinger
2008-12-30 17:18 ` Christoph Hellwig
2008-12-30 20:19 ` Mike Frysinger
2008-12-30 20:23 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox