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

Libraries are always recompiled (only with gcc-10.1 & 10.2, OK with 10.3+) #1311

Closed
d-a-v opened this issue Jun 5, 2021 · 2 comments
Closed

Comments

@d-a-v
Copy link
Contributor

d-a-v commented Jun 5, 2021

Bug Report

Current behavior

Using esp8266 Arduino platform release 3.0.0, using itself gcc-10, Arduino libraries are always recompiled even after a first successful build.
This has been observed on windows only and there's no issue with linux, where already compiled libraries' object files are correctly reused.

Expected behavior

Under windows, already compiled libraries' object files should be reused too.

Environment

  • CLI version (output of arduino-cli version):

Windows Arduino 1.8.15 installer, embedding Arduino Builder 1.6.1

  • OS and platform:

Windows 10, esp8266 arduino core v3.0.0

Additional context

Arduino builder uses the -MMD gcc option to generate depend files (extension .d).
These files are used to list dependencies.
The format of these files has changed somewhere between gcc-4.8 and gcc-10:
Entries like C:\User\... are changed to C\:\Users\....
Manually removing the additional \ between two builds seems to have made the issue disappeared.

esp8266 issue is there: esp8266/Arduino#8069 (comment)

edit: similar issue, not present in gcc<=9, https://gist.github.com/Som1Lse/2fbb0e22cb59a158bb8e09bf6f527f7e

@d-a-v
Copy link
Contributor Author

d-a-v commented Jun 5, 2021

This seems to be a gcc-10.{1,2} bug.
We will be trying gcc-10.3 or gcc-11.1 and keep this opened issue informed.

@d-a-v
Copy link
Contributor Author

d-a-v commented Jun 5, 2021

It is confirmed that gcc-10.3 fixes the issue while generating the -MMD depends files.
Arduino-1.8.15 efficiently reuses already compiled libraries after the first build.
Sorry for the false alarm, closing.

@d-a-v d-a-v closed this as completed Jun 5, 2021
@d-a-v d-a-v changed the title Libraries are always recompiled (gcc-10?) Libraries are always recompiled (only with gcc-10.1 & 10.2, OK with 10.3+) Jun 5, 2021
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

No branches or pull requests

1 participant