Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/fetch-{libc++,newlib}: exit on error #477

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lschuermann
Copy link
Member

This helps diagnose issues when one or more of the tools that the script requires are not installed.

In my case, I was working on a system that did not have unzip installed. This error message was hidden in between a lot of other log messages, and the error was masked by a generic "can't find this header" message.

This also removes the let bindings. The bash let commands returns exit code 1 when assigning the value 0 to a variable, which is ... 100% what you want, just great behavior, and definitely did not cost me another 10 minutes to debug.

@lschuermann
Copy link
Member Author

Seems like we were relying on failures being silently ignored in CI:

2024-11-14T20:33:32.5126662Z 293100K .......... .......... ...                             100%  195M=8.0s
2024-11-14T20:33:32.5127237Z 
2024-11-14T20:33:32.5128455Z 2024-11-14 20:33:32 (35.9 MB/s) - ‘libtock-newlib-4.2.0.20211231.zip’ saved [300158324/300158324]
2024-11-14T20:33:32.5129275Z 
2024-11-14T20:33:33.2008185Z libtock-newlib-4.2.0.20211231.zip: OK
2024-11-14T20:33:33.2016379Z Unpacking libtock-newlib-4.2.0.20211231.zip...
2024-11-14T20:33:33.7019460Z libtock-newlib-4.2.0.20211231.zip: OK
2024-11-14T20:33:33.7028612Z Unpacking libtock-newlib-4.2.0.20211231.zip...
2024-11-14T20:33:33.7049070Z replace libtock-newlib-4.2.0.20211231/arm/arm-none-eabi/include/argz.h? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
2024-11-14T20:33:33.7050216Z (EOF or read error, treating as "[N]one" ...)
2024-11-14T20:33:33.7196157Z replace libtock-newlib-4.2.0.20211231/arm/arm-none-eabi/lib/thumb/v7ve+simd/softfp/redboot.specs? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
2024-11-14T20:33:33.7197691Z (EOF or read error, treating as "[N]one" ...)
2024-11-14T20:33:37.7497198Z make[1]: *** [../Precompiled.mk:61: ../lib/libtock-newlib-4.2.0.20211231/arm/arm-none-eabi/lib/thumb/v6-m/nofp/libc.a] Error 1
2024-11-14T20:33:37.7498747Z make[1]: Leaving directory '/home/runner/work/libtock-c/libtock-c/lvgl'
2024-11-14T20:33:37.7502329Z make: *** [../../AppMakefile.mk:97: ../../lvgl/build/cortex-m0/lvgl.a] Error 2

I'll push a commit that changes the invocation of unzip to select the (currently inferred) default of not overwriting existing files.

Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these fetch scripts should be getting called in a way that causes this to be an issue, so I have a mild fear this is papering over something else, but that is an issue for another day.

@ppannuto
Copy link
Member

Oof. Or... it's not an error for another day. Looks like the CI error is competing unzip's trampling each other, likely because the first unzip was only partially complete when the second one first checked if it needed to do anything :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants