All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] linux-libc-headers: fix long path name build breakage
@ 2013-01-10 20:49 Bruce Ashfield
  2013-01-10 20:49 ` [PATCH 1/1] linux-libc-headers: fix headers install in long path name environments Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Ashfield @ 2013-01-10 20:49 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

Richard/Saul,

Here's a patch to fix the recent autobuilder failures with the updated
linux-libc-headers (3.7) as the default.

I wasn't sure if we needed a PR bump, but I added one anyone. Let
me know if I should respin with it removed.

I'll send this patch upstream for comments as well, but in it's current
form it does get us up and running on the builders.

Until this is accepted, it will be propagated to any > 3.7 kernel headers,
just in case they are used in a long path name configuration.

Cheers,

Bruce

The following changes since commit 66f4c8a674d9f8db958b13866af4d63ab8cbcd44:

  guile: add explicit dependency to avoid parallel build issue (2013-01-09 15:05:26 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib zedd/kernel
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel

Bruce Ashfield (1):
  linux-libc-headers: fix headers install in long path name
    environments

 ...efile.headersinst-install-headers-from-sc.patch |   47 ++++++++++++++++++++
 .../linux-libc-headers/linux-libc-headers_3.7.bb   |    4 ++
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch

-- 
1.7.10.4




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] linux-libc-headers: fix headers install in long path name environments
  2013-01-10 20:49 [PATCH 0/1] linux-libc-headers: fix long path name build breakage Bruce Ashfield
@ 2013-01-10 20:49 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2013-01-10 20:49 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

If a build is started in a deep directory structure, or in a path with
long directory names the installation of linux-libc-headers will fail
with:

  | make[2]: execvp: /bin/sh: Argument list too long
  | make[2]: ***

From within the kernel Makefiles themselves.

The solution is to patch the kernel build rules with the following
change:

[
    scripts/Makefile.headersinst: install headers from scratch file

    If headers_install is executed from a deep/long directory structure, the
    shell's maximum argument length can be execeeded, which breaks the operation
    with:

    | make[2]: execvp: /bin/sh: Argument list too long
    | make[2]: ***

    By dumping the input files to a scratch file and using xargs to read the
    input list from the scratch file, we can avoid blowing out the maximum
    argument size and install headers in a long path name environment.
]

Until this change, or a similar one, is merged into the mainline kernel, this
change should be applied to any 3.7 or greater libc-headers build.

Upstream-status: Pending

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 ...efile.headersinst-install-headers-from-sc.patch |   47 ++++++++++++++++++++
 .../linux-libc-headers/linux-libc-headers_3.7.bb   |    4 ++
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch
new file mode 100644
index 0000000..be1ef25
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch
@@ -0,0 +1,47 @@
+From e60cc1b011bf0f1acdb7e5168b7bed4ebb78c91f Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Wed, 9 Jan 2013 16:24:39 -0500
+Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file
+
+If headers_install is executed from a deep/long directory structure, the
+shell's maximum argument length can be execeeded, which breaks the operation
+with:
+
+| make[2]: execvp: /bin/sh: Argument list too long
+| make[2]: ***
+
+By dumping the input files to a scratch file and using xargs to read the
+input list from the scratch file, we can avoid blowing out the maximum
+argument size and install headers in a long path name environment.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ scripts/Makefile.headersinst |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
+index 06ba4a7..536d722 100644
+--- a/scripts/Makefile.headersinst
++++ b/scripts/Makefile.headersinst
+@@ -71,7 +71,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
+ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
+                             file$(if $(word 2, $(all-files)),s))
+       cmd_install = \
+-        $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \
++        xargs $(PERL) $< $(installdir) $(SRCARCH) < $(INSTALL_HDR_PATH)/.input-files; \
+         for F in $(wrapper-files); do                                   \
+                 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
+         done;                                                           \
+@@ -100,7 +100,9 @@ targets += $(install-file)
+ $(install-file): scripts/headers_install.pl $(input-files) FORCE
+ 	$(if $(unwanted),$(call cmd,remove),)
+ 	$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
++	@echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files
+ 	$(call if_changed,install)
++	@rm $(INSTALL_HDR_PATH)/.input-files
+ 
+ else
+ __headerscheck: $(subdirs) $(check-file)
+-- 
+1.7.0.4
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb
index 3d688b7..a363289 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb
@@ -1,4 +1,8 @@
 require linux-libc-headers.inc
 
+SRC_URI += "file://scripts-Makefile.headersinst-install-headers-from-sc.patch"
+
+PR = "r1"
+
 SRC_URI[md5sum] = "5323f3faadd051e83af605a63be5ea2e"
 SRC_URI[sha256sum] = "dc08d87a579fe2918362e6666e503a95a76296419195cb499aa9dd4dbe171a9e"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-10 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 20:49 [PATCH 0/1] linux-libc-headers: fix long path name build breakage Bruce Ashfield
2013-01-10 20:49 ` [PATCH 1/1] linux-libc-headers: fix headers install in long path name environments Bruce Ashfield

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.