Fix appveyor crashing issue and use latest MinGW #2124
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See also #2086
I've been able to reproduce this problem on my dev. machine. The problem occurs during build of HostTests, specifically the
bearssl-esp8266
Component. It can be reproduced thus:(I add -j20 to speed things up, but it makes no difference.)
Now, if I remove any 3 files from the build (e.g. by renaming .c -> .cXX) and repeat the above commands, the problem does not occur. This puts the number of files passed to the
ar
tool at 292.My first attempt was to invoke separate commands for each object file. The first 40 objects were added, then it failed!
So then I looked at path lengths. On my test build system, here's one of the commands:
ar rcsP /s/sandboxes/sming-tmp/Sming/out/Host/debug/lib/clib-bearssl-esp8266.a bearssl/src/ec/ec_secp521r1.o
So I did this:
And repeated the test. Success!
However, this only fixes the issue for appveyor unless users manually do the above.
So, part (2) of this fix is to change the makefiles to to generate a
build.ar
script. This keeps the command line small and actually fixes the problem, rather than works around it.