-
Notifications
You must be signed in to change notification settings - Fork 639
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
Compile error with AsyncStaticWebHandler sonoff-debug #6
Comments
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): I have tried to add time.h to config and added to the all.h |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): Fixed: platform changed to espressif8266_stage for sonoff-debug
|
I cannot reproduce the error using the stable version of the platform (i.e. platform = espressif8266). Can you check what version of ESPAsyncWebServer you have doing a |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): ea7b76b0ee |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): a fresh pull from your source still produces the same results. |
Could it be an old esp8266 arduino core? Check this: me-no-dev/ESPAsyncWebServer#60. Also: me-no-dev/ESPAsyncWebServer#96. Can you update ( |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): its a brand new install, i will try it though. |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): all up to date |
Do you have the same issue compiling the example from ESPAsyncWebServer library? |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): I'll give that a go when I get home. |
Original comment by Pavel Eremin (Bitbucket: paveleremin, GitHub: paveleremin): from pio lib list
When I changed espressif8266 to espressif8266_statge in platformio.ini I got SUCCESS. Is it ok? |
Original comment by Lars (Bitbucket: R4cer, GitHub: Unknown): I had the same problem, also on Win10 x64. |
It looks like a race condition between the core time.h library used in WebHandlerImpl.h of ESPAsyncWebServerand the Time.h library used by NtpClientLib in windows machines. Check issue 2341 in Arduino Core for ESP8266 and issue 60 in ESPAsyncWebServer. Maybe some of you can test @kiralikbeyin workaround:
|
@R4CER @an_indian_man @paveleremin Have any of you tested this solution? Can you report back? |
Original comment by Pavel Eremin (Bitbucket: paveleremin, GitHub: paveleremin): @xoseperez where folder "/Library/Arduino15/" is located? I'm not familiar with C++ but I can try... Also want to ask: what it's mean: |
Original comment by an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown): I'll repull the tree and flash some new devices tonight. |
Version 1.4.3 uses a forked version of the Time library by Paul Stoffregen (here: https://github.com/xoseperez/Time) that deletes the otherwise unneeded Time.h file and prevents the conflict with the core time.h file in windows machines. |
Tested under windows with latest version. |
* revert-state: Enable revert state mode Enable revert state mode
This compilation problem happens in Windows only. Linux and Mac are case sensitive for files, so these OSes differ between
|
Originally reported by: an_indian_man (Bitbucket: an_indian_man, GitHub: Unknown)
pio run -e sonoff-debug
Win10 x64
platformIO
ESP-stage
.piolibdeps\ESPAsyncWebServer_ID306\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(tm*)':
.piolibdeps\ESPAsyncWebServer_ID306\src\WebHandlers.cpp:67:64: error: 'strftime' was not declared in this scope
strftime (result,30,"%a, %d %b %Y %H:%M:%S %Z", last_modified);
^
.piolibdeps\ESPAsyncWebServer_ID306\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(time_t)':
.piolibdeps\ESPAsyncWebServer_ID306\src\WebHandlers.cpp:72:60: error: 'gmtime' was not declared in this scope
return setLastModified((struct tm *)gmtime(&last_modified));
^
.piolibdeps\ESPAsyncWebServer_ID306\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified()':
.piolibdeps\ESPAsyncWebServer_ID306\src\WebHandlers.cpp:77:25: error: 'time' was not declared in this scope
if(time(&last_modified) == 0) //time is not yet set
The text was updated successfully, but these errors were encountered: