Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: bahus on November 11, 2022, 12:44:15 PM

Title: GCC build fails for Arm on Git Hub Action runner on Ubuntu
Post by: bahus on November 11, 2022, 12:44:15 PM
I'm trying to set up Git Hub Action build for Sansa Clip Zip and following https://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling instructions.

See my script:
https://github.com/bahusoid/rockbox/blob/80b0a41f4455916c15257f56bfe469a65b34dea6/.github/workflows/clipZip.yml#L16-L20

It fails building gcc:
Code: [Select]
checking lex output file root... configure: error: cannot find output from flex; giving up
...
make[1]: *** [Makefile:4352: configure-gmp] Error 1
make[1]: *** Waiting for unfinished jobs....
...
make[1]: Leaving directory '/tmp/rbdev-build/build-gcc'
make: *** [Makefile:846: all] Error 2

What am I missing? Any ideas how to fix it? Full log is attached.
Title: Re: GCC build fails for Arm on Git Hub Action runner on Ubuntu
Post by: Bilgus on November 11, 2022, 04:35:46 PM
$apt-get update
$apt-get install -V flex
If that doesn't work you might want to check that its not the wrong version

The -V might be in the wrong place I'm doing this from memory
Title: Re: GCC build fails for Arm on Git Hub Action runner on Ubuntu
Post by: bahus on November 12, 2022, 01:18:48 AM
It's the problem with gmp:
https://stackoverflow.com/questions/23128949/compiling-gcc-cannot-find-output-from-flex-giving-up

And it's about some "kludge" part in the rockboxdev.sh
https://github.com/Rockbox/rockbox/blob/dd1fbd51fc7bb3fa7237b3bc34335e99bef29e35/tools/rockboxdev.sh#L454-L460

Apparently this "kludge" check is broken as removing it fixes the problem for Git Hub Actions (or at least more recent versions should be used for downloading)
Title: Re: GCC build fails for Arm on Git Hub Action runner on Ubuntu
Post by: Bilgus on November 12, 2022, 05:58:31 AM
Glad you found it I was playing with it last night till I got fed up with it
Title: Re: GCC build fails for Arm on Git Hub Action runner on Ubuntu
Post by: amachronic on November 12, 2022, 09:36:43 AM
gmp 5.1.0 seems to be the earliest version to fix that bug.