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

Windows toolchain - newer compiler? #281

Closed
MartyMacGyver opened this issue Jan 23, 2017 · 17 comments
Closed

Windows toolchain - newer compiler? #281

MartyMacGyver opened this issue Jan 23, 2017 · 17 comments

Comments

@MartyMacGyver
Copy link

I notice that the Arduino ESP32 project references https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0-2.zip for Windows now. Is that a late bugfix revision of the Windows toolchain, a fork specifically for that project, or something else?

If it's a bugfix for Windows that is more generally applicable to the ESP32 toolchain, the issue is that the esp32_win32_msys2_environment_and_toolchain distribution should be updated with it, as well as the links on http://esp-idf.readthedocs.io/en/latest/windows-setup.html

@MartyMacGyver MartyMacGyver changed the title Windows toolchain question Windows toolchain - newer compiler? Jan 23, 2017
@negativekelvin
Copy link
Contributor

No they are the same file, have same hash.

@igrr
Copy link
Member

igrr commented Jan 23, 2017

Thanks for mentioning the all-in-one zip file, it needs to be updated.

@MartyMacGyver
Copy link
Author

MartyMacGyver commented Jan 23, 2017

That's a retroactive update then... I have xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip from a few days ago (build date 2017-01-11) and it definitely is different in terms of contents and build dates internally.

Likewise, I have esp32_win32_msys2_environment_and_toolchain-20170111.zip from the same time, and the toolchain files within it were the same 2017-01-11 ones (which appears to be what you mean to update, @igrr).

I'll ping the arduino-esp32 project about this, as having multiple toolchains (even if they differ only by name) is apt to confuse people, particularly those who grabbed xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip before it was revised (not everyone uses the given all-in-one zip).

Edit: or are they as likely to see it here since it's all under the espressif umbrella?

@igrr
Copy link
Member

igrr commented Jan 23, 2017

Yes, I'll update the links, no need to open an issue in the Arduino repo. Thanks.

@negativekelvin
Copy link
Contributor

So if the binaries have changed is it a rebuild with no changes, only new timestamps?

@igrr
Copy link
Member

igrr commented Jan 23, 2017

The original toolchain published as xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip wasn't functional as it was dynamically linked against a non-existent pthreads library. When this was reported by users in the Arduino project, I have rebuilt the toolchain with the correct flags, and this was uploaded as xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0-2.zip. Because I was using a script to build and upload things to the download server, i think i may have overwritten the original xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip before actually uploading xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0-2.zip...

At this point it doesn't make sense to restore the original xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip as the toolchain in that archive would not even run. I will update the download links to point to the -2.zip version though, to avoid further confusion, and will update the all-in-one msys environment.

@negativekelvin
Copy link
Contributor

Ok all my timestamps are from 2017-01-10 and I haven't encountered any issues yet but will update.

@MartyMacGyver
Copy link
Author

MartyMacGyver commented Jan 23, 2017

I wasn't suggesting restoring the broken one... I simply didn't know what -2 was and having the original one I wondered which was which. It makes sense now.

But that means the one in the esp32_win32_msys2_environment_and_toolchain-20170111.zip is broken too... yet it's been working fine for me, or appeared to be. Perhaps because I'm not using affected functionality?

And given that, would this have broken tasks (e.g., xTaskCreate)?

@igrr
Copy link
Member

igrr commented Jan 23, 2017

I was referring to this issue: espressif/arduino-esp32#135 (comment)

Basically the compiler didn't run at all. No output files were produced, so 'affected functionality' is more or less equal to "compiling any ESP32 program". I suppose it can still work for you if you happen to have the missing dynamic library in your environment, installed in some other way, which other users didn't have.

@negativekelvin
Copy link
Contributor

For reference I had just dropped it into previous msys2 aio.

@MartyMacGyver
Copy link
Author

Weird... maybe I do somewhere, but the MSYS2 is pretty well locked down path-wise. Either way, thanks for clarifying this!

@igrr
Copy link
Member

igrr commented Jan 23, 2017

Well, MSYS2 is your environment, right? The issue was reported by an Arduino user. Arduino IDE doesn't run the compiler from MSYS environment, it launches it straight from Java.

@negativekelvin
Copy link
Contributor

This has been a fun ghost chasing adventure

@MartyMacGyver
Copy link
Author

@igrr - I'm aware of that. I asked why the toolchain was changed in this way because I noticed it in Arduino first, then noticed MSYS2 contains the release of the toolchain that basically disappeared because it's broken (as you noted above). I wanted to understand what happened there, get the Arduino docs straightened out in that regard, and get the MSYS2 distribution updated with the new, not-broken compiler (as also acknowledged above).

It's possible that I never happened to run into the buggy portion of the compiler in MSYS2, but others may well (it's unlikely my system was finding the missing parts anywhere else either.)

@igrr
Copy link
Member

igrr commented Jan 23, 2017

Well, the point i guess is that the old build wasn't working in Arduino due to the missing library but was working in MSYS2 because it happens to have that same library. This is why the issue happens in Arduino but not in MSYS2.

@MartyMacGyver
Copy link
Author

MartyMacGyver commented Jan 23, 2017

Ah. I see that both releases of xtensa-esp32-elf have exactly the same files, though a handful were built differently (as per the change in config). I thought perhaps that config change might have some unwanted effect in MSYS2, as part of this fix was not just files outside the xtensa-esp32-elf but the configuration of the toolchain itself - so I asked about that in addition to my original question relative to Arduino-ESP32.

In summary, then, it would be good to see the same current toolchain in the next MSYS2 zip, for consistency (especially since the one currently in it is not available standalone anymore).

@igrr igrr closed this as completed in f5aee6a Mar 28, 2017
@jjimmy-S
Copy link

jjimmy-S commented Mar 25, 2018

Hi @igrr I was wondering if there is a new alternative to solve this error, I have tried with the default toolchain, and the old version that you suggest, but I still get the same error, "Error compiling for board ESP32 Dev Module." can you help me? I'm running the latest version of Arduino 1.8.5, and Win 8.1 64 bits

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

4 participants