diff mbox series

Minimum binutils version to build skiboot

Message ID 2edeed75-f71c-f212-d281-7baa85704b90@linux.vnet.ibm.com
State Not Applicable
Headers show
Series Minimum binutils version to build skiboot | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (abe4c4799ffee4be12674ad59fc0bc521b0724f3)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Gustavo Romero July 23, 2020, 12:05 a.m. UTC
Hi,

I'm getting the following error when building skiboot with
binutils 2.26.1 on Ubuntu 16.04.6 LTS:

[...]
	[AR]  libstb/built-in.a
asm/head.S: Assembler messages:
asm/head.S:235: Error: missing ')'
asm/head.S:235: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0xffffffffffff0000 and 0x000000000000ffff)
asm/head.S:235: Error: syntax error; found `U', expected `,'
asm/head.S:235: Error: junk at end of line: `ULL)@highest'
asm/head.S:235: Error: missing ')'
asm/head.S:235: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0x0000000000000000 and 0x000000000000ffff)
asm/head.S:235: Error: syntax error; found `U', expected `,'
asm/head.S:235: Error: junk at end of line: `ULL)@higher'
asm/head.S:235: Error: missing ')'
asm/head.S:235: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0x0000000000000000 and 0x000000000000ffff)
asm/head.S:235: Error: syntax error; found `U', expected `,'
asm/head.S:235: Error: junk at end of line: `ULL)@h'
asm/head.S:235: Error: missing ')'
asm/head.S:235: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0x0000000000000000 and 0x000000000000ffff)
asm/head.S:235: Error: syntax error; found `U', expected `,'
	[AR]  libc/built-in.a
asm/head.S:235: Error: junk at end of line: `ULL)@l'
asm/head.S:934: Error: missing ')'
asm/head.S:934: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0xffffffffffff0000 and 0x000000000000ffff)
asm/head.S:934: Error: syntax error; found `U', expected `,'
asm/head.S:934: Error: junk at end of line: `ULL)@highest'
asm/head.S:934: Error: missing ')'
asm/head.S:934: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0x0000000000000000 and 0x000000000000ffff)
asm/head.S:934: Error: syntax error; found `U', expected `,'
asm/head.S:934: Error: junk at end of line: `ULL)@higher'
asm/head.S:934: Error: missing ')'
asm/head.S:934: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0x0000000000000000 and 0x000000000000ffff)
asm/head.S:934: Error: syntax error; found `U', expected `,'
asm/head.S:934: Error: junk at end of line: `ULL)@h'
asm/head.S:934: Error: missing ')'
asm/head.S:934: Error: operand out of range (0x0b1ab1af00ba1234 is not between 0x0000000000000000 and 0x000000000000ffff)
asm/head.S:934: Error: syntax error; found `U', expected `,'
asm/head.S:934: Error: junk at end of line: `ULL)@l'
	[AS]  asm/dummy_map.o
	[CC]  skiboot.lds
/home/gromero/git/skiboot/Makefile.rules:52: recipe for target 'asm/head.o' failed
make: *** [asm/head.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes.  Stop.


This is because binutils <= 2.27 does not support ULL & friends suffixes
and asm/head.S is using ULL for STACK_INT_MAGIC, so if we remove the ULL
suffix skiboot builds ok with binutils 2.26.1:

afaics it's not possible to simply change ULL and cast the value with
(unsigned long long). Nonetheless, I _think_ that for that case the ULL suffix
is not really necessary, just like it happens for STACK_CHECK_GUARD_BASE.

That said, I don't know what's the minimum binutils skiboot must currently
support, so actually it might be that I'm using a non supported binutils
version to build skiboot :)

Thoughts?


Cheers,
Gustavo

Comments

Stewart Smith July 30, 2020, 2:46 a.m. UTC | #1
On Wed, Jul 22, 2020, at 5:05 PM, Gustavo Romero wrote:
> I'm getting the following error when building skiboot with
> binutils 2.26.1 on Ubuntu 16.04.6 LTS:

Generally we've had CI for the current Ubuntu LTS plus the previous Ubuntu LTS.

e126deb2de831d559c49a8c3b0f4edd1b1291bb0 in June added in 20.04 and dropped 16.04, so you can probably bisect back to work what broke it, or look at how it was being built back then and figure out what you're doing differently.
Gustavo Romero July 30, 2020, 3:11 p.m. UTC | #2
Hi Stewart!

On 7/29/20 11:46 PM, Stewart Smith wrote:
> On Wed, Jul 22, 2020, at 5:05 PM, Gustavo Romero wrote:
>> I'm getting the following error when building skiboot with
>> binutils 2.26.1 on Ubuntu 16.04.6 LTS:
> 
> Generally we've had CI for the current Ubuntu LTS plus the previous Ubuntu LTS.
> 
> e126deb2de831d559c49a8c3b0f4edd1b1291bb0 in June added in 20.04 and dropped 16.04, so you can probably bisect back to work what broke it, or look at how it was being built back then and figure out what you're doing differently.

Got it, so 16.04 was dropped by the CI.

Interestingly the commit that broke the build on old
binutils is from a couple of weeks before the support
for 16.04 was dropped by the CI (so not sure how the
CI didn't catch it):

commit dca0d5345631fb8d116eaf015416a6a51ead6028
Author: Nicholas Piggin <npiggin@gmail.com>
Date:   Mon Apr 27 21:08:07 2020 +1000

     core: interrupt markers for stack traces
     
     Use magic marker in the exception stack frame that is used by the
     unwinder to decode the interrupt type and NIA. The below example trace
     comes from a modified skiboot that uses virtual memory, but any
     interrupt type will appear similarly.
     
      CPU 0000 Backtrace:
       S: 0000000031c13580 R: 0000000030028210   .vm_dsi+0x360
       S: 0000000031c13630 R: 000000003003b0dc   .exception_entry+0x4fc
       S: 0000000031c13830 R: 0000000030001f4c   exception_entry_foo+0x4
       --- Interrupt 0x300 at 000000003002431c ---
       S: 0000000031c13b40 R: 000000003002430c   .make_free.isra.0+0x110
       S: 0000000031c13bd0 R: 0000000030025198   .mem_alloc+0x4a0
       S: 0000000031c13c80 R: 0000000030028bac   .__memalign+0x48
       S: 0000000031c13d10 R: 0000000030028da4   .__zalloc+0x18
       S: 0000000031c13d90 R: 000000003002fb34   .opal_init_msg+0x34
       S: 0000000031c13e20 R: 00000000300234b4   .main_cpu_entry+0x61c
       S: 0000000031c13f00 R: 00000000300031b8   boot_entry+0x1b0
       --- OPAL boot ---
     
     Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
     [oliver: the new stackentry fields made our test heaps too small]
     Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
     
     fixup! core: interrupt markers for stack traces


As I mentioned previously, that change uses suffix ULL in

+#define STACK_INT_MAGIC                0xb1ab1af00ba1234ULL

which is not understood by old binutils in Ubuntu 16.04.

I don't think the suffix is necessary there, like it happens
for STACK_CHECK_GUARD_BASE, so dropping it would fix the build
with binutils not supporting the use of ULL & friends suffixes.

Anyway, since CI dropped 16.04 LTS, should we care to fix that?


Thanks,
Gustavo
Stewart Smith July 30, 2020, 3:43 p.m. UTC | #3
> On Jul 30, 2020, at 8:11 AM, Gustavo Romero <gromero@linux.vnet.ibm.com> wrote:
> 
> Hi Stewart!
> 
>> On 7/29/20 11:46 PM, Stewart Smith wrote:
>>> On Wed, Jul 22, 2020, at 5:05 PM, Gustavo Romero wrote:
>>> I'm getting the following error when building skiboot with
>>> binutils 2.26.1 on Ubuntu 16.04.6 LTS:
>> Generally we've had CI for the current Ubuntu LTS plus the previous Ubuntu LTS.
>> e126deb2de831d559c49a8c3b0f4edd1b1291bb0 in June added in 20.04 and dropped 16.04, so you can probably bisect back to work what broke it, or look at how it was being built back then and figure out what you're doing differently.
> 
> Got it, so 16.04 was dropped by the CI.
> 
> Interestingly the commit that broke the build on old
> binutils is from a couple of weeks before the support
> for 16.04 was dropped by the CI (so not sure how the
> CI didn't catch it):
> 
> commit dca0d5345631fb8d116eaf015416a6a51ead6028
> Author: Nicholas Piggin <npiggin@gmail.com>
> Date:   Mon Apr 27 21:08:07 2020 +1000
> 
>    core: interrupt markers for stack traces
>        Use magic marker in the exception stack frame that is used by the
>    unwinder to decode the interrupt type and NIA. The below example trace
>    comes from a modified skiboot that uses virtual memory, but any
>    interrupt type will appear similarly.
>         CPU 0000 Backtrace:
>      S: 0000000031c13580 R: 0000000030028210   .vm_dsi+0x360
>      S: 0000000031c13630 R: 000000003003b0dc   .exception_entry+0x4fc
>      S: 0000000031c13830 R: 0000000030001f4c   exception_entry_foo+0x4
>      --- Interrupt 0x300 at 000000003002431c ---
>      S: 0000000031c13b40 R: 000000003002430c   .make_free.isra.0+0x110
>      S: 0000000031c13bd0 R: 0000000030025198   .mem_alloc+0x4a0
>      S: 0000000031c13c80 R: 0000000030028bac   .__memalign+0x48
>      S: 0000000031c13d10 R: 0000000030028da4   .__zalloc+0x18
>      S: 0000000031c13d90 R: 000000003002fb34   .opal_init_msg+0x34
>      S: 0000000031c13e20 R: 00000000300234b4   .main_cpu_entry+0x61c
>      S: 0000000031c13f00 R: 00000000300031b8   boot_entry+0x1b0
>      --- OPAL boot ---
>        Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>    [oliver: the new stackentry fields made our test heaps too small]
>    Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>        fixup! core: interrupt markers for stack traces
> 
> 
> As I mentioned previously, that change uses suffix ULL in
> 
> +#define STACK_INT_MAGIC                0xb1ab1af00ba1234ULL
> 
> which is not understood by old binutils in Ubuntu 16.04.
> 
> I don't think the suffix is necessary there, like it happens
> for STACK_CHECK_GUARD_BASE, so dropping it would fix the build
> with binutils not supporting the use of ULL & friends suffixes.
> 
> Anyway, since CI dropped 16.04 LTS, should we care to fix that?

It’s not my call, but I’d say it’s not worth it. 16.04 doesn’t have much life left.
Oliver O'Halloran Aug. 3, 2020, 7:38 a.m. UTC | #4
On Fri, Jul 31, 2020 at 1:11 AM Gustavo Romero
<gromero@linux.vnet.ibm.com> wrote:
>
> Hi Stewart!
>
> On 7/29/20 11:46 PM, Stewart Smith wrote:
> > On Wed, Jul 22, 2020, at 5:05 PM, Gustavo Romero wrote:
> >> I'm getting the following error when building skiboot with
> >> binutils 2.26.1 on Ubuntu 16.04.6 LTS:
> >
> > Generally we've had CI for the current Ubuntu LTS plus the previous Ubuntu LTS.
> >
> > e126deb2de831d559c49a8c3b0f4edd1b1291bb0 in June added in 20.04 and dropped 16.04, so you can probably bisect back to work what broke it, or look at how it was being built back then and figure out what you're doing differently.
>
> Got it, so 16.04 was dropped by the CI.
>
> Interestingly the commit that broke the build on old
> binutils is from a couple of weeks before the support
> for 16.04 was dropped by the CI (so not sure how the
> CI didn't catch it):

Travis was always pretty flakey until recently so I never paid much
attention to it. That and considering 16.04 is pretty long in the
tooth I figured we might as well drop it rather than trying to make it
work again.
Gustavo Romero Aug. 3, 2020, 2:07 p.m. UTC | #5
On 8/3/20 4:38 AM, Oliver O'Halloran wrote:
> On Fri, Jul 31, 2020 at 1:11 AM Gustavo Romero
> <gromero@linux.vnet.ibm.com> wrote:
>>
>> Hi Stewart!
>>
>> On 7/29/20 11:46 PM, Stewart Smith wrote:
>>> On Wed, Jul 22, 2020, at 5:05 PM, Gustavo Romero wrote:
>>>> I'm getting the following error when building skiboot with
>>>> binutils 2.26.1 on Ubuntu 16.04.6 LTS:
>>>
>>> Generally we've had CI for the current Ubuntu LTS plus the previous Ubuntu LTS.
>>>
>>> e126deb2de831d559c49a8c3b0f4edd1b1291bb0 in June added in 20.04 and dropped 16.04, so you can probably bisect back to work what broke it, or look at how it was being built back then and figure out what you're doing differently.
>>
>> Got it, so 16.04 was dropped by the CI.
>>
>> Interestingly the commit that broke the build on old
>> binutils is from a couple of weeks before the support
>> for 16.04 was dropped by the CI (so not sure how the
>> CI didn't catch it):
> 
> Travis was always pretty flakey until recently so I never paid much
> attention to it. That and considering 16.04 is pretty long in the
> tooth I figured we might as well drop it rather than trying to make it
> work again.

Got it.

Thanks Stewart and Oliver.


Cheers,
Gustavo
diff mbox series

Patch

diff --git a/include/stack.h b/include/stack.h
index 3e987ea..9aa688b 100644
--- a/include/stack.h
+++ b/include/stack.h
@@ -45,7 +45,7 @@ 
  #define STACK_WARNING_GAP      2048
  
  #define STACK_CHECK_GUARD_BASE 0xdeadf00dbaad300
-#define STACK_INT_MAGIC                0xb1ab1af00ba1234ULL
+#define STACK_INT_MAGIC                0xb1ab1af00ba1234


Since STACK_INT_MAGIc, by its turn, is actually used with @{l,h,higher,highest},