linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the kbuild tree
@ 2013-02-24 23:56 Stephen Rothwell
  2013-02-25 10:28 ` Michal Marek
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2013-02-24 23:56 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-next, linux-kernel, Michael Grzeschik

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

Hi Michal,

After merging the kbuild tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

scripts/link-vmlinux.sh: line 135: .: .config: file not found

Presumably caused by commit 03b25b47e0f4 ("scripts/link-vmlinux.sh:
source variables from KCONFIG_CONFIG").

I have used the kbuild tree from next-20130222 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the kbuild tree
  2013-02-24 23:56 linux-next: build failure after merge of the kbuild tree Stephen Rothwell
@ 2013-02-25 10:28 ` Michal Marek
  2013-02-25 10:58   ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2013-02-25 10:28 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Michael Grzeschik

On 25.2.2013 00:56, Stephen Rothwell wrote:
> Hi Michal,
> 
> After merging the kbuild tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> scripts/link-vmlinux.sh: line 135: .: .config: file not found
> 
> Presumably caused by commit 03b25b47e0f4 ("scripts/link-vmlinux.sh:
> source variables from KCONFIG_CONFIG").

Strange, I did a couple of testbuilds before pushing the new branch.
Wild guess: what version of what shell are you using on the
buildmachine? It is probably the missing ./ that makes the difference.

Thanks,
Michal

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

* Re: linux-next: build failure after merge of the kbuild tree
  2013-02-25 10:28 ` Michal Marek
@ 2013-02-25 10:58   ` Stephen Rothwell
  2013-02-25 11:02     ` Stephen Rothwell
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stephen Rothwell @ 2013-02-25 10:58 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-next, linux-kernel, Michael Grzeschik

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]

Hi Michal,

On Mon, 25 Feb 2013 11:28:40 +0100 Michal Marek <mmarek@suse.cz> wrote:
>
> On 25.2.2013 00:56, Stephen Rothwell wrote:
> > 
> > After merging the kbuild tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > scripts/link-vmlinux.sh: line 135: .: .config: file not found
> > 
> > Presumably caused by commit 03b25b47e0f4 ("scripts/link-vmlinux.sh:
> > source variables from KCONFIG_CONFIG").
> 
> Strange, I did a couple of testbuilds before pushing the new branch.
> Wild guess: what version of what shell are you using on the
> buildmachine? It is probably the missing ./ that makes the difference.

I am using a Debian Testing machine (its not quite up to date):

----------------------------------------------------------------------
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jul  7  2010 /bin/sh -> bash
$ bash --version
GNU bash, version 4.2.20(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
----------------------------------------------------------------------

I am also using a cross compiler and O= on the command line if that
matters.  '.' is not in my path and .config is not executable.  If I cd
to the object directory, then ". .config" works fine.

But bash in sh mode does not work:

$ cat xtst.sh
#!/bin/sh

cd /scratch/sfr/powerpc_ppc64_defconfig

. .config

exit 0
$ ./xtst.sh
./xtst.sh: line 5: .: .config: file not found
$ ls -l /scratch/sfr/powerpc_ppc64_defconfig/.config
-rw-r--r-- 1 sfr users 79005 Feb 25 15:45 /scratch/sfr/powerpc_ppc64_defconfig/.config

Changing the ". .config" to ". ./.config" makes it work.

Anything else?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the kbuild tree
  2013-02-25 10:58   ` Stephen Rothwell
@ 2013-02-25 11:02     ` Stephen Rothwell
  2013-02-25 11:36     ` Michal Marek
  2013-02-25 12:54     ` [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh Michal Marek
  2 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2013-02-25 11:02 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-next, linux-kernel, Michael Grzeschik

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

On Mon, 25 Feb 2013 21:58:45 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> But bash in sh mode does not work:

The bash manual says:

       .  filename [arguments]
       source filename [arguments]
              Read and execute commands from filename  in  the  current  shell
              environment  and return the exit status of the last command exe‐
              cuted from filename.  If filename does not contain a slash, file
              names  in  PATH  are used to find the directory containing file‐
              name.  The file searched for in PATH  need  not  be  executable.
              When  bash  is  not  in  posix  mode,  the  current directory is
              searched if no file is found in PATH.  If the sourcepath  option
              to  the  shopt  builtin  command  is turned off, the PATH is not
              searched.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the kbuild tree
  2013-02-25 10:58   ` Stephen Rothwell
  2013-02-25 11:02     ` Stephen Rothwell
@ 2013-02-25 11:36     ` Michal Marek
  2013-02-25 12:54     ` [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh Michal Marek
  2 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2013-02-25 11:36 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Michael Grzeschik

On 25.2.2013 11:58, Stephen Rothwell wrote:
> ----------------------------------------------------------------------
> $ ls -l /bin/sh
> lrwxrwxrwx 1 root root 4 Jul  7  2010 /bin/sh -> bash
> $ bash --version
> GNU bash, version 4.2.20(1)-release (x86_64-pc-linux-gnu)
[...]
> But bash in sh mode does not work:
> 
> $ cat xtst.sh
> #!/bin/sh
> 
> cd /scratch/sfr/powerpc_ppc64_defconfig
> 
> . .config
> 
> exit 0
> $ ./xtst.sh
> ./xtst.sh: line 5: .: .config: file not found

Ah, so it's a too new bash that causes this. I can also reproduce it now.

Michal

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

* [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh
  2013-02-25 10:58   ` Stephen Rothwell
  2013-02-25 11:02     ` Stephen Rothwell
  2013-02-25 11:36     ` Michal Marek
@ 2013-02-25 12:54     ` Michal Marek
  2013-02-25 12:56       ` Michal Marek
  2 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2013-02-25 12:54 UTC (permalink / raw)
  To: sfr; +Cc: linux-next, linux-kernel, m.grzeschik

The shell '.' command is not required to search the current directory as
a fallback and in fact newer versions of bash in sh-mode do not do this.
Force reading the file from the current directory if $KCONFIG_CONFIG
contains no '/'.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 scripts/link-vmlinux.sh |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index e62f1e0..3d569d6 100644
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -132,7 +132,14 @@ if [ "$1" = "clean" ]; then
 fi
 
 # We need access to CONFIG_ symbols
-. ${KCONFIG_CONFIG}
+case "${KCONFIG_CONFIG}" in
+*/*)
+	. "${KCONFIG_CONFIG}"
+	;;
+*)
+	# Force using a file from the current directory
+	. "./${KCONFIG_CONFIG}"
+esac
 
 #link vmlinux.o
 info LD vmlinux.o
-- 
1.7.10.4

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

* Re: [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh
  2013-02-25 12:54     ` [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh Michal Marek
@ 2013-02-25 12:56       ` Michal Marek
  2013-02-25 14:11         ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2013-02-25 12:56 UTC (permalink / raw)
  To: sfr; +Cc: linux-next, linux-kernel, m.grzeschik

On 25.2.2013 13:54, Michal Marek wrote:
> The shell '.' command is not required to search the current directory as
> a fallback and in fact newer versions of bash in sh-mode do not do this.
> Force reading the file from the current directory if $KCONFIG_CONFIG
> contains no '/'.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> ---
>  scripts/link-vmlinux.sh |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

I was able to reproduce the failure and this patch fixed it. So I am
going to push this in a couple of hours, so that tomorrow's linux-next
can include the latest kbuild changes.

Michal

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

* Re: [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh
  2013-02-25 12:56       ` Michal Marek
@ 2013-02-25 14:11         ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2013-02-25 14:11 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-next, linux-kernel, m.grzeschik

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Hi Michal,

On Mon, 25 Feb 2013 13:56:42 +0100 Michal Marek <mmarek@suse.cz> wrote:
>
> On 25.2.2013 13:54, Michal Marek wrote:
> > The shell '.' command is not required to search the current directory as
> > a fallback and in fact newer versions of bash in sh-mode do not do this.
> > Force reading the file from the current directory if $KCONFIG_CONFIG
> > contains no '/'.
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Michal Marek <mmarek@suse.cz>
> > ---
> >  scripts/link-vmlinux.sh |    9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> I was able to reproduce the failure and this patch fixed it. So I am
> going to push this in a couple of hours, so that tomorrow's linux-next
> can include the latest kbuild changes.

Thanks.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-02-25 14:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-24 23:56 linux-next: build failure after merge of the kbuild tree Stephen Rothwell
2013-02-25 10:28 ` Michal Marek
2013-02-25 10:58   ` Stephen Rothwell
2013-02-25 11:02     ` Stephen Rothwell
2013-02-25 11:36     ` Michal Marek
2013-02-25 12:54     ` [PATCH] kbuild: Fix reading of .config in link-vmlinux.sh Michal Marek
2013-02-25 12:56       ` Michal Marek
2013-02-25 14:11         ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).