Skip to content

ESP8266 V3.1.1 fails to build #1546

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

Closed
jantje opened this issue Jan 15, 2023 · 2 comments
Closed

ESP8266 V3.1.1 fails to build #1546

jantje opened this issue Jan 15, 2023 · 2 comments
Labels
domain: build The build does not work as the Arduino IDE. importance: board specific OS: all status: fixed in 4.4.3 status: workaround documented A workaround has been confirmed to solve this issue.

Comments

@jantje
Copy link
Member

jantje commented Jan 15, 2023

ESP8266 V3.1.1 fails to build
This is caused by

recipe.hooks.prebuild.2.pattern="${runtime.tools.python3.path}/python3" -I "${runtime.tools.mkbuildoptglobals}" "${runtime.ide.path}" ${runtime.ide.version} "${build.path}" "${build.opt.fqfn}" "${globals.h.source.fqfn}" "${commonhfile.fqfn}" ${mkbuildoptglobals.extra_flags}
This because Sloeber assumes the hooks to start from 1 and here it starts from 2.

Note that -as we learned from other issues- the usage of the opt file decreases the user experience due to discovery problems because the discovery command fails due to a missing .opt file (created in the PREBUILD command only executed during build.

@jantje jantje added OS: all importance: board specific domain: build The build does not work as the Arduino IDE. labels Jan 15, 2023
jantje pushed a commit that referenced this issue Jan 15, 2023
I tested with the workaround still available.
I modifies the code to be more readable and tested without the
workaround this time :-(
@jantje
Copy link
Member Author

jantje commented Jan 15, 2023

Workaround: in platform.txt change recipe.hooks.prebuild.2.pattern to recipe.hooks.prebuild.1.pattern
And then do the steps described here to clear the caching #1533

@jantje
Copy link
Member Author

jantje commented Jan 16, 2023

After fixing the fact that sloeber only picks up pre and post commands starting from 1 things became worse.
It seems the pre build command script has a dependency on preferences.txt and errors before copying the opt file.
The error was also caught by make who ended the build.
The script also uses the environment variable runtime.ide.path which was not implemented by Sloeber.
Fixing that in #1547 did not improve things.
I did find a way to make make ignore the error caused by the prebuild command.
I also improved the code to ignore .opt files (should also improve STM32 and ESP32 experiences)

So the current situation in the nightly is that

  1. the workaround removes the opt file from the command line
  2. the pre build command is taken into account but fails if arduino IDE is not installed in a supported way on the system. If it doesn't fail the standard opt file is copied to the build folder
  3. The build command ignores the copied opt file

Therefore

  1. The discovery does not fail due to missing opt file
  2. A failing pre build command does not impact the build result
  3. the opt file functionality is disabled and if you want this you need to go to project properties->sloeber and add the "@{my opt file}" to the necessary add to command line fields

The nightly works again so I close this issue as fixed in the nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: build The build does not work as the Arduino IDE. importance: board specific OS: all status: fixed in 4.4.3 status: workaround documented A workaround has been confirmed to solve this issue.
Projects
None yet
Development

No branches or pull requests

1 participant