Skip to contentSkip to conversation

Fix Travis CI

PATCH In review Petr Vorel 3 participants 17 messages Sep 9, 2020 – Dec 18, 2020

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

cover Fix Travis CI

Hi,

although grub does not use Travis CI (or at least not publicly) some developers might welcome fixed .travis.yml for testing their patches.

I haven't figured out how to fix riscv32 and mips.

Kind regards,
Petr

Petr Vorel (4):
travis: Run bootstrap to fix build
travis: Fix sparc64 build
travis: Remove mips builds
travis: Remove riscv32 build

 .travis.yml | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)
Signature · 1 line
2.27.0.rc0
author
#1 lore raw

PATCH 1/4 travis: Run bootstrap to fix build

autogen.sh isn't enough:

$ ./autogen.sh
Gnulib not yet bootstrapped; run ./bootstrap instead.
The command "./autogen.sh" exited with 1.

Using bootstrap requires to install autopoint package.

---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +2 -1
index 81de20fa3..4bd05a30a 100644
@@ -12,6 +12,7 @@ language: c
 addons:
   apt:
     packages:
+    - autopoint
     - libsdl1.2-dev
     - lzop
     - ovmf
@@ -35,7 +36,7 @@ before_script:
 script:
   # Comments must be outside the command strings below, or the Travis parser
   # will get confused.
-  - ./autogen.sh
+  - ./bootstrap
 
   # Build all selected GRUB targets.
   - for target in $GRUB_TARGETS; do
Signature · 1 line
2.27.0.rc0
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] travis: Run bootstrap to fix build

Quoted 8 lines · Petr Vorel

autogen.sh isn't enough:

$ ./autogen.sh
Gnulib not yet bootstrapped; run ./bootstrap instead.
The command "./autogen.sh" exited with 1.

Using bootstrap requires to install autopoint package.

Daniel

author
#3 lore raw

PATCH 2/4 travis: Fix sparc64 build

In reply to Petr Vorel

Instead non-existing sparc64-ieee1275 format use all 3 sparc64 formats:
sparc64-ieee1275-{aout,cdcore,raw}.

---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
.travis.yml +3 -3
index 4bd05a30a..d019a0172 100644
@@ -40,8 +40,8 @@ script:
 
   # Build all selected GRUB targets.
   - for target in $GRUB_TARGETS; do
-      plat=${target#*-};
-      arch=${target%-*};
+      arch=$(echo $target | cut -d- -f1);
+      plat=$(echo $target | cut -d- -f2);
       [ "$arch" = "arm64" ] && arch=aarch64-linux;
       [ "$arch" = "arm" ] && arch=arm-linux-gnueabi;
       [ "$arch" = "ia64" ] && arch=ia64-linux;
@@ -81,7 +81,7 @@ matrix:
         - CROSS_TARGETS="powerpc64-linux"
     - name: "sparc64"
       env:
-        - GRUB_TARGETS="sparc64-ieee1275"
+        - GRUB_TARGETS="sparc64-ieee1275-aout sparc64-ieee1275-cdcore sparc64-ieee1275-raw"
         - CROSS_TARGETS="sparc64-linux"
     - name: "ia64"
       env:
Signature · 1 line
2.27.0.rc0
#4 lore raw

Re: [PATCH 2/4] travis: Fix sparc64 build

Quoted 13 lines · Petr Vorel

Instead non-existing sparc64-ieee1275 format use all 3 sparc64 formats:
sparc64-ieee1275-{aout,cdcore,raw}.

---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
.travis.yml +0 -0
index 4bd05a30a..d019a0172 100644

.travis.yml script: · line 44

Quoted 7 lines
.travis.yml +2 -2
@@ -40,8 +40,8 @@ script:
 
   # Build all selected GRUB targets.
   - for target in $GRUB_TARGETS; do
-      plat=${target#*-};
-      arch=${target%-*};
+      arch=$(echo $target | cut -d- -f1);
+      plat=$(echo $target | cut -d- -f2);

I think it should be: plat=$(echo $target | cut -d- -f2-); Note dash after "2"...

Though I would prefer this:
arch=$(echo "$target" | cut -d - -f 1);
plat=$(echo "$target" | cut -d - -f 2-);

Daniel

author
#5 lore raw

Re: [PATCH 2/4] travis: Fix sparc64 build

Hi Daniel,

thanks for merging first commit.

Quoted 22 lines · Petr Vorel
Quoted 13 lines

Instead non-existing sparc64-ieee1275 format use all 3 sparc64 formats:
sparc64-ieee1275-{aout,cdcore,raw}.

---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
.travis.yml +0 -0
index 4bd05a30a..d019a0172 100644

.travis.yml script: · line 44

Quoted 7 lines
.travis.yml +2 -2
@@ -40,8 +40,8 @@ script:
 
   # Build all selected GRUB targets.
   - for target in $GRUB_TARGETS; do
-      plat=${target#*-};
-      arch=${target%-*};
+      arch=$(echo $target | cut -d- -f1);
+      plat=$(echo $target | cut -d- -f2);
Quoted 2 lines

I think it should be: plat=$(echo $target | cut -d- -f2-); Note dash after "2"...

No, this way it breaks sparc64 [1] (and does not help to fix mips [2] nor risc32 either).

It looks like it's this error:
configure: error: platform "ieee1275-raw" is not supported for target CPU "sparc64"

but I need to debug it more to see what's wrong.

Kind regards,
Petr

Quoted 5 lines

Though I would prefer this:
arch=$(echo "$target" | cut -d - -f 1);
plat=$(echo "$target" | cut -d - -f 2-);

Daniel

Kind regards,
Petr

[1] https://travis-ci.org/github/pevik/grub/jobs/728077121
[2] https://travis-ci.org/github/pevik/grub/jobs/728077123
[3] https://travis-ci.org/github/pevik/grub/jobs/728077126

author
#6 lore raw

Re: [PATCH 2/4] travis: Fix sparc64 build

Hi Daniel,

...

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines

# Build all selected GRUB targets.
- for target in $GRUB_TARGETS; do

.travis.yml +2 -2
-      plat=${target#*-};
-      arch=${target%-*};
+      arch=$(echo $target | cut -d- -f1);
+      plat=$(echo $target | cut -d- -f2);
Quoted 7 lines
Quoted 2 lines

I think it should be: plat=$(echo $target | cut -d- -f2-); Note dash after "2"...

No, this way it breaks sparc64 [1] (and does not help to fix mips [2] nor risc32 either).

It looks like it's this error:
configure: error: platform "ieee1275-raw" is not supported for target CPU "sparc64"

Yes, the correct build without - at the end gets plat == "ieee1275", which is correct.
https://travis-ci.org/github/pevik/grub/jobs/729143839

Kind regards,
Petr

Quoted 1 line

but I need to debug it more to see what's wrong.

Comment mips and risc32 under their patches.

Kind regards,
Petr

Quoted 12 lines
Quoted 5 lines

Though I would prefer this:
arch=$(echo "$target" | cut -d - -f 1);
plat=$(echo "$target" | cut -d - -f 2-);

Daniel

Kind regards,
Petr

[1] https://travis-ci.org/github/pevik/grub/jobs/728077121
[2] https://travis-ci.org/github/pevik/grub/jobs/728077123
[3] https://travis-ci.org/github/pevik/grub/jobs/728077126

author
#7 lore raw

PATCH 3/4 travis: Remove mips builds

In reply to Petr Vorel

Remove mips builds fix configure error:
configure: error: could not force big-endian)

---
 .travis.yml | 4 ----
 1 file changed, 4 deletions(-)
.travis.yml +0 -4
index d019a0172..ca2a1fa5a 100644
@@ -87,10 +87,6 @@ matrix:
       env:
         - GRUB_TARGETS="ia64-efi"
         - CROSS_TARGETS="ia64-linux"
-    - name: "mips"
-      env:
-        - GRUB_TARGETS="mips-arc mipsel-arc mipsel-qemu_mips mips-qemu_mips"
-        - CROSS_TARGETS="mips64-linux"
     - name: "arm"
       env:
         - GRUB_TARGETS="arm-coreboot arm-efi arm-uboot"
Signature · 1 line
2.27.0.rc0
#8 lore raw

Re: [PATCH 3/4] travis: Remove mips builds

Quoted 2 lines · Petr Vorel

Remove mips builds fix configure error:
configure: error: could not force big-endian)

Could you try to fix mips and risc5 builds instead of removing them?

Daniel

author
#9 lore raw

Re: [PATCH 3/4] travis: Remove mips builds

Hi Daniel,

Quoted 5 lines · Petr Vorel
Quoted 2 lines

Remove mips builds fix configure error:
configure: error: could not force big-endian)

Could you try to fix mips and risc5 builds instead of removing them?

Right, I'll try and send v2.

Kind regards,
Petr

author
#10 lore raw

Re: [PATCH 3/4] travis: Remove mips builds

In reply to Daniel Kiper
Quoted 5 lines · Petr Vorel
Quoted 2 lines

Remove mips builds fix configure error:
configure: error: could not force big-endian)

Could you try to fix mips and risc5 builds instead of removing them?

mips fails due using compiler [1] which lacks lacks big-endian support:
"configure: error: could not force big-endian"

Maybe later versions (9.3.0, 10.1.0) will have the support.
The other way (probably slower) would be to add foreign architecture and install the compiler with apt.

And also IMHO job should stop on configure fail, not continue after that. I'll probably send a patch fixing this.

Quoted 1 line

Daniel

[1] https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-riscv32-linux.tar.gz

#11 lore raw

Re: [PATCH 3/4] travis: Remove mips builds

Hi Petr,

First of all, sorry for late reply...

Quoted 7 lines · Petr Vorel
Quoted 5 lines · Petr Vorel
Quoted 2 lines

Remove mips builds fix configure error:
configure: error: could not force big-endian)

Could you try to fix mips and risc5 builds instead of removing them?

mips fails due using compiler [1] which lacks lacks big-endian support:
"configure: error: could not force big-endian"

Well, it seems to me that it tries to use RISC-V compiler to compile MIPS target... The MIPS version downloaded from the same site builds big-endian without any issue.

Quoted 1 line

Maybe later versions (9.3.0, 10.1.0) will have the support.

By the way, could you bump all compilers to the latest version available at https://mirrors.kernel.org/pub/tools/crosstool/ ?

Quoted 9 lines

The other way (probably slower) would be to add foreign architecture and install the compiler with apt.

And also IMHO job should stop on configure fail, not continue after that. I'll probably send a patch fixing this.

Quoted 1 line

Daniel

[1] https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-riscv32-linux.tar.gz

Daniel

author
#12 lore raw

PATCH 4/4 travis: Remove riscv32 build

In reply to Petr Vorel

To fix travis error:
grub-mkimage: error: target 1036 not reachable from pc=ba.

---
 .travis.yml | 4 ----
 1 file changed, 4 deletions(-)
.travis.yml +0 -4
index ca2a1fa5a..8628c526f 100644
@@ -95,10 +95,6 @@ matrix:
       env:
         - GRUB_TARGETS="arm64-efi"
         - CROSS_TARGETS="aarch64-linux"
-    - name: "riscv32"
-      env:
-        - GRUB_TARGETS="riscv32-efi"
-        - CROSS_TARGETS="riscv32-linux"
     - name: "riscv64"
       env:
         - GRUB_TARGETS="riscv64-efi"
Signature · 1 line
2.27.0.rc0
author
#13 lore raw

Re: [PATCH 4/4] travis: Remove riscv32 build

Hi Daniel,

Quoted 2 lines

To fix travis error:
grub-mkimage: error: target 1036 not reachable from pc=ba.

https://travis-ci.org/github/pevik/grub/jobs/729143844

$ for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal; done
grub-mkimage: error: target 1036 not reachable from pc=ba.

I found error messages in util/grub-mkimagexx.c, but I have no idea what is missing in the test which causes grub-mkimage to fail. Any idea? I doubt it's a real bug.

Kind regards,
Petr

#14 lore raw

Re: [PATCH 4/4] travis: Remove riscv32 build

Adding Alex...

Quoted 15 lines · Petr Vorel

Hi Daniel,

Quoted 2 lines

To fix travis error:
grub-mkimage: error: target 1036 not reachable from pc=ba.

https://travis-ci.org/github/pevik/grub/jobs/729143844

$ for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal; done
grub-mkimage: error: target 1036 not reachable from pc=ba.

I found error messages in util/grub-mkimagexx.c, but I have no idea what is missing in the test which causes grub-mkimage to fail. Any idea? I doubt it's a real bug.

Kind regards,
Petr

#15 lore raw

Re: [PATCH 4/4] travis: Remove riscv32 build

Quoted 19 lines · On Tue, 27 Oct 2020 21:06:45 +0100 Daniel Kiper <[email protected]> wrote:

Adding Alex...

Quoted 16 lines · Petr Vorel

Hi Daniel,

Quoted 2 lines

To fix travis error:
grub-mkimage: error: target 1036 not reachable from pc=ba.

https://travis-ci.org/github/pevik/grub/jobs/729143844

$ for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O
$target -o grub-$target echo reboot normal; done grub-mkimage:
error: target 1036 not reachable from pc=ba.

I found error messages in util/grub-mkimagexx.c, but I have no idea what is missing in the test which causes grub-mkimage to fail. Any idea? I doubt it's a real bug.

Kind regards,
Petr

Did anyone have a chance to look at this? I'm also seeing this with this target when trying to run the tests, which are failing.

Glenn

author
#16 lore raw

Re: [PATCH 4/4] travis: Remove riscv32 build

Hi Glenn,

Quoted 20 lines
Quoted 16 lines · On Tue, 27 Oct 2020 21:06:45 +0100 Daniel Kiper <[email protected]> wrote:

Adding Alex...

Quoted 13 lines · Petr Vorel

Hi Daniel,

Quoted 2 lines

To fix travis error:
grub-mkimage: error: target 1036 not reachable from pc=ba.

https://travis-ci.org/github/pevik/grub/jobs/729143844

$ for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O
$target -o grub-$target echo reboot normal; done grub-mkimage:
error: target 1036 not reachable from pc=ba.

I found error messages in util/grub-mkimagexx.c, but I have no idea what is missing in the test which causes grub-mkimage to fail. Any idea? I doubt it's a real bug.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Kind regards,
Petr

Did anyone have a chance to look at this? I'm also seeing this with this target when trying to run the tests, which are failing.

I haven't had a chance yet. Also Travis CI got pretty slow last few weeks, which does not help.

Kind regards,
Petr

Quoted 1 line

Glenn