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

Fix appveyor crashing issue and use latest MinGW #2124

Merged
merged 3 commits into from
Oct 24, 2020

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Oct 23, 2020

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:

cd %SMING_HOME%\..\tests\HostTests
make bearssl-esp8266-clean
make bearssl-esp8266-build

(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:

subst Z: s:\sandboxes\sming-tmp
set SMING_HOME=Z:\Sming

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.

@mikee47 mikee47 force-pushed the fix/appveyor-crash branch 4 times, most recently from 9159607 to dc3e667 Compare October 23, 2020 20:34
@mikee47 mikee47 changed the title Fix appveyor crash and use latest MinGW Work around appveyor crash and use latest MinGW Oct 24, 2020
@mikee47 mikee47 changed the title Work around appveyor crash and use latest MinGW Fix issue appveyor crashing issue and use latest MinGW Oct 24, 2020
@slaff slaff added this to the 4.2.0 milestone Oct 24, 2020
@slaff
Copy link
Contributor

slaff commented Oct 24, 2020

@mikee47 Looks good to me :) Windows is full with hidden surprises :) Shall I merge this PR or you would like to add something more?

@mikee47
Copy link
Contributor Author

mikee47 commented Oct 24, 2020

@slaff I'm happy as this is a fairly simple fix and doesn't appear to have broken anything else :-) Nothing to add.

@mikee47 mikee47 changed the title Fix issue appveyor crashing issue and use latest MinGW Fix appveyor crashing issue and use latest MinGW Oct 24, 2020
@slaff slaff merged commit a493208 into SmingHub:develop Oct 24, 2020
@mikee47 mikee47 deleted the fix/appveyor-crash branch October 24, 2020 15:20
@slaff slaff removed the 3 - Review label Oct 12, 2023
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