linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the arm-current tree
@ 2018-04-18  3:31 Stephen Rothwell
  2018-04-18 17:54 ` Russell King
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2018-04-18  3:31 UTC (permalink / raw)
  To: Russell King
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michael Ellerman

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

Hi Russell,

After merging the arm-current tree, today's linux-next build
(lots of configs) failed like this:

/bin/sh: 1: arithmetic expression: expecting primary: " "
(lots of these)

Caused by commit

  fe680ca02c1e ("ARM: replace unnecessary perl with sed and the shell $(( )) operator")

(pointed out by Michael Ellerman)

Our /bin/sh is dash not bash ...

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the arm-current tree
  2018-04-18  3:31 linux-next: build failure after merge of the arm-current tree Stephen Rothwell
@ 2018-04-18 17:54 ` Russell King
  2018-04-18 18:17   ` Russell King
  0 siblings, 1 reply; 7+ messages in thread
From: Russell King @ 2018-04-18 17:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michael Ellerman

On Wed, Apr 18, 2018 at 01:31:55PM +1000, Stephen Rothwell wrote:
> Hi Russell,
> 
> After merging the arm-current tree, today's linux-next build
> (lots of configs) failed like this:
> 
> /bin/sh: 1: arithmetic expression: expecting primary: " "
> (lots of these)
> 
> Caused by commit
> 
>   fe680ca02c1e ("ARM: replace unnecessary perl with sed and the shell $(( )) operator")
> 
> (pointed out by Michael Ellerman)
> 
> Our /bin/sh is dash not bash ...

I tested this on 32-bit ARM with dash:

foo# dash
# echo $(($(nm /boot/vmlinux-4.16.0+ | sed -n -e 's/^\([^ ]*\) B __bss_start$/-0x\1/p' -e 's/^\([^ ]*\) B __bss_stop$/+0x\1/p') ))
6409680
#

Any clues what '/bin/sh: 1: arithmetic expression: expecting primary: " "'
actually means in reality?

I don't see why you should end up with lots of them either, unless maybe
the sed expression isn't working for you.

The sed expression should end up producing output such as:

-0xc09138c4
+0xc0f30694

and that's it, two values, one preceded by a + and the other by a -.

-- 
Russell King
ARM architecture Linux Kernel maintainer

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

* Re: linux-next: build failure after merge of the arm-current tree
  2018-04-18 17:54 ` Russell King
@ 2018-04-18 18:17   ` Russell King
  2018-04-18 23:51     ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Russell King @ 2018-04-18 18:17 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michael Ellerman

On Wed, Apr 18, 2018 at 06:54:42PM +0100, Russell King wrote:
> On Wed, Apr 18, 2018 at 01:31:55PM +1000, Stephen Rothwell wrote:
> > Hi Russell,
> > 
> > After merging the arm-current tree, today's linux-next build
> > (lots of configs) failed like this:
> > 
> > /bin/sh: 1: arithmetic expression: expecting primary: " "
> > (lots of these)
> > 
> > Caused by commit
> > 
> >   fe680ca02c1e ("ARM: replace unnecessary perl with sed and the shell $(( )) operator")
> > 
> > (pointed out by Michael Ellerman)
> > 
> > Our /bin/sh is dash not bash ...
> 
> I tested this on 32-bit ARM with dash:
> 
> foo# dash
> # echo $(($(nm /boot/vmlinux-4.16.0+ | sed -n -e 's/^\([^ ]*\) B __bss_start$/-0x\1/p' -e 's/^\([^ ]*\) B __bss_stop$/+0x\1/p') ))
> 6409680
> #
> 
> Any clues what '/bin/sh: 1: arithmetic expression: expecting primary: " "'
> actually means in reality?
> 
> I don't see why you should end up with lots of them either, unless maybe
> the sed expression isn't working for you.
> 
> The sed expression should end up producing output such as:
> 
> -0xc09138c4
> +0xc0f30694
> 
> and that's it, two values, one preceded by a + and the other by a -.

Hmm, I guess it's a result of:

# echo $(( ))
dash: 4: arithmetic expression: expecting primary: " "

which points to the sed expression producing no output.  If that's the
case, then something else went wrong with the build earlier - there
should be no case where the built vmlinux does not contain the
__bss_start and __bss_stop symbols on ARM, since every kernel contains
a .bss section.

Olof's autobuilder shows no errors, but that could be because it's
using bash - I don't know.  kernelci.org also shows no failures.

I think more information is needed to debug this, such as:

- does nm of the vmlinux contain the __bss_start and __bss_stop
  symbols, and are they formatted as one would expect (iow, marked
  as a global BSS symbol?)
- does the nm | sed pipeline produce the expected output when run
  outside of everything else?
- does dash evaluate the output correctly outside of the makefile?

As I'm not currently aware of a failing environment that I have
access to, I'm not able to debug this myself, sorry.

-- 
Russell King
ARM architecture Linux Kernel maintainer

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

* Re: linux-next: build failure after merge of the arm-current tree
  2018-04-18 18:17   ` Russell King
@ 2018-04-18 23:51     ` Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2018-04-18 23:51 UTC (permalink / raw)
  To: Russell King
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michael Ellerman

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

Hi Russell,

On Wed, 18 Apr 2018 19:17:23 +0100 Russell King <rmk@armlinux.org.uk> wrote:
>
> Hmm, I guess it's a result of:
> 
> # echo $(( ))
> dash: 4: arithmetic expression: expecting primary: " "
> 
> which points to the sed expression producing no output.  If that's the
> case, then something else went wrong with the build earlier - there
> should be no case where the built vmlinux does not contain the
> __bss_start and __bss_stop symbols on ARM, since every kernel contains
> a .bss section.
> 
> Olof's autobuilder shows no errors, but that could be because it's
> using bash - I don't know.  kernelci.org also shows no failures.
> 
> I think more information is needed to debug this, such as:
> 
> - does nm of the vmlinux contain the __bss_start and __bss_stop
>   symbols, and are they formatted as one would expect (iow, marked
>   as a global BSS symbol?)

$ /opt/cross/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-nm vmlinux | grep __bss_st
008af260 A __bss_start
008b4394 A __bss_stop

so, that's our problem.  Note we are building with gcc 4.6.3 and binutils 2.22

> - does the nm | sed pipeline produce the expected output when run
>   outside of everything else?
> - does dash evaluate the output correctly outside of the makefile?

so dash returns the above error for 'echo $(( ))' and bash returns '0'

I had to actually symlink /bin/sh to dash to get it to fail - running
with in dash and setting SHELL to /bin/dash was not sufficient.

So under bash, we don't get an error, but we use 0 as the bss length :-(

I will this patch to linux-next today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 19 Apr 2018 09:46:22 +1000
Subject: [PATCH] arm: check for A as well as B type sybols when calculating BSS size

older compilers produce those

Fixes: 429f7a062e3b ("ARM: decompressor: fix BSS size calculation")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/arm/boot/compressed/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index b0354dfc7055..6a4e7341ecd3 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -118,8 +118,8 @@ asflags-y := -DZIMAGE
 
 # Supply kernel BSS size to the decompressor via a linker symbol.
 KBSS_SZ = $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
-		sed -n -e 's/^\([^ ]*\) B __bss_start$$/-0x\1/p' \
-		       -e 's/^\([^ ]*\) B __bss_stop$$/+0x\1/p') )) )
+		sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
+		       -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
 LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
 # Supply ZRELADDR to the decompressor via a linker symbol.
 ifneq ($(CONFIG_AUTO_ZRELADDR),y)
-- 
2.17.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the arm-current tree
  2015-04-10  7:28 ` Russell King - ARM Linux
@ 2015-04-10  8:08   ` Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2015-04-10  8:08 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-next, linux-kernel, Tony Lindgren

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

Hi Russell,

On Fri, 10 Apr 2015 08:28:31 +0100 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
>
> On Fri, Apr 10, 2015 at 10:29:33AM +1000, Stephen Rothwell wrote:
> > 
> > After merging the arm-current tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> > 
> > arch/arm/mm/proc-v7.S: Assembler messages:
> > arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|'
> > arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|'
> > 
> > Caused by commit f2fd12256533 ("ARM: proc-v7: avoid errata 430973
> > workaround for non-Cortex A8 CPUs").
> > 
> > I have reverted that commit for today.
> 
> The ARM autobuilders built the tree I pushed out with no problems.  The
> commit itself isn't quite correct, but the merge head of the for-next
> branch /is/ correct.  I've now fixed that, but I don't see why you would
> have hit this.

Could it have been tool chain specific?  We are running

arm-unknown-linux-gnueabi-gcc (GCC) 4.9.0
GNU ld (GNU Binutils) 2.24

Also, note that I merged your tree with Linus' tree up to today (commit
3cfb2f7976a2 "Merge tag 'pci-v4.0-fixes-3' of
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci").

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the arm-current tree
  2015-04-10  0:29 Stephen Rothwell
@ 2015-04-10  7:28 ` Russell King - ARM Linux
  2015-04-10  8:08   ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Russell King - ARM Linux @ 2015-04-10  7:28 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Tony Lindgren

On Fri, Apr 10, 2015 at 10:29:33AM +1000, Stephen Rothwell wrote:
> Hi Russell,
> 
> After merging the arm-current tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> arch/arm/mm/proc-v7.S: Assembler messages:
> arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|'
> arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|'
> 
> Caused by commit f2fd12256533 ("ARM: proc-v7: avoid errata 430973
> workaround for non-Cortex A8 CPUs").
> 
> I have reverted that commit for today.

The ARM autobuilders built the tree I pushed out with no problems.  The
commit itself isn't quite correct, but the merge head of the for-next
branch /is/ correct.  I've now fixed that, but I don't see why you would
have hit this.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

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

* linux-next: build failure after merge of the arm-current tree
@ 2015-04-10  0:29 Stephen Rothwell
  2015-04-10  7:28 ` Russell King - ARM Linux
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2015-04-10  0:29 UTC (permalink / raw)
  To: Russell King; +Cc: linux-next, linux-kernel, Tony Lindgren

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

Hi Russell,

After merging the arm-current tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

arch/arm/mm/proc-v7.S: Assembler messages:
arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|'
arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|'

Caused by commit f2fd12256533 ("ARM: proc-v7: avoid errata 430973
workaround for non-Cortex A8 CPUs").

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2018-04-18 23:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18  3:31 linux-next: build failure after merge of the arm-current tree Stephen Rothwell
2018-04-18 17:54 ` Russell King
2018-04-18 18:17   ` Russell King
2018-04-18 23:51     ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2015-04-10  0:29 Stephen Rothwell
2015-04-10  7:28 ` Russell King - ARM Linux
2015-04-10  8:08   ` 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).