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

2.5.0-beta3's libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp doesn't compile #5678

Closed
4 of 6 tasks
crankyoldgit opened this issue Jan 27, 2019 · 11 comments
Closed
4 of 6 tasks
Assignees
Labels
component: network type: bug waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Milestone

Comments

@crankyoldgit
Copy link

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [other] / N/A
  • Core Version: 2.5.0-beta3 / 21db8fc
  • Development Env: Arduino IDE 1,8.8
  • Operating System: Unix / Travis

Settings in IDE

  • Module: Wemos D1 mini r2 & Nodemcu
  • Flash Mode: N/A
  • Flash Size: 4M
  • lwip Variant: N/A
  • Reset Method: N/A
  • Flash Frequency: N/A
  • CPU Frequency: 80Mhz
  • Upload Using: N/A
  • Upload Speed: N/A

Problem Description

2.5.0-beta3's libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp doesn't compile, has errors.

See https://travis-ci.org/markszabo/IRremoteESP8266/jobs/484962845#L1515

$ arduino --verify --board esp8266:esp8266:nodemcuv2:xtal=80,eesz=4M3M $PWD/examples/IRGCTCPServer/IRGCTCPServer.ino
/home/travis/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta3/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp: In member function 'bool ESP8266WiFiSTAClass::hostname(const char*)':
/home/travis/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta3/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp:537:52: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
         intf->hostname = wifi_station_get_hostname();
                                                    ^
/home/travis/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta3/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp:539:33: error: 'netif_dhcp_data' was not declared in this scope
         if (netif_dhcp_data(intf) != nullptr) {
                                 ^
exit status 1

This looks like it was introduced in #5652 (7c5be91)

The code has compiled fine with all previous versions of the ESP8266 core libraries for years. e.g. 2.5.0-beta2 was fine. Beta3 broke it.

Sketch

https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRGCTCPServer/IRGCTCPServer.ino
https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino
https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRServer/IRServer.ino

Debug Messages

N/A

@d-a-v
Copy link
Collaborator

d-a-v commented Jan 27, 2019

  • lwip Variant: N/A

Are you using lwIP-v1.4 ?

@d-a-v d-a-v self-assigned this Jan 27, 2019
@crankyoldgit
Copy link
Author

No idea tbh. It's using what ever the default would be.
Our travis environment is built using:

(https://github.com/markszabo/IRremoteESP8266/blob/master/.travis.yml)

@d-a-v
Copy link
Collaborator

d-a-v commented Jan 27, 2019

This bug will be fixed asap.

arduino --board D=esp8266:esp8266:nodemcuv2:xtal=80,eesz=4M3M --save-prefs

You may update your board FQBN with ip=lm2f:exception=disabled:

arduino --board D=esp8266:esp8266:nodemcuv2:xtal=80,eesz=4M3M:ip=lm2f:exception=disabled --save-prefs

@crankyoldgit
Copy link
Author

Thanks. I'll try it out now.

crankyoldgit added a commit to crankyoldgit/IRremoteESP8266 that referenced this issue Jan 27, 2019
crankyoldgit added a commit to crankyoldgit/IRremoteESP8266 that referenced this issue Jan 27, 2019
@crankyoldgit
Copy link
Author

You may update your board FQBN with ip=lm2f:exception=disabled:

arduino --board D=esp8266:esp8266:nodemcuv2:xtal=80,eesz=4M3M:ip=lm2f:exception=disabled --save-prefs

I think you meant: ip=lm2f,exception=disabled,

arduino --board D=esp8266:esp8266:nodemcuv2:xtal=80,eesz=4M3M,ip=lm2f,exception=disabled --save-prefs

Which seems to be working/compiling so far.

What does that addition actually do?

@d-a-v
Copy link
Collaborator

d-a-v commented Jan 27, 2019

What does that addition actually do?

I am curious to know wether #5657 would answer to your question.

@crankyoldgit
Copy link
Author

Not really. e.g. It doesn't explain what disabling exceptions does and has nothing about the ip= clause.

@d-a-v
Copy link
Collaborator

d-a-v commented Jan 28, 2019

I'm trying to make it clear to read. There is an update in the above PR.

To answer your question,
There are two available versions of the IP stack (lwIP), you are using the former which is broken in 2.5.0-beta3 (soon to be fixed). The second one is the default, and that's what ip=lm2f is: "use the default"

Because you were not specifying them in your scripts and default options in IDE are not used by default with the arduino builder (at least in your case), exception=disabled is another case for issues about flash occupation. It's about enabling C++ exceptions.

Anyway if it is fixed for you, you can close the issue.

Hieromon added a commit to Hieromon/PageBuilder that referenced this issue Jan 28, 2019
@earlephilhower earlephilhower added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Jan 31, 2019
@ChrSchultz
Copy link

ChrSchultz commented Feb 1, 2019

I have a similar roblem with compilattion
arduino 1.8.8 windows-store
win10-64bit TinyGSM, esp8622-2.5.0-beta3,
Wemos D1 mini
test.ino.txt
if I try to compile the file above( rename to ,ino) I got the following errors...

In file included from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClient.h:29:0,

             from C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino:31:

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h: In member function 'bool TinyGsmSim808::getGPSasJSON(char*, char*, char*)':

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:155:5: error: 'TimeElements' was not declared in this scope

 TimeElements tm;

 ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:155:18: error: expected ';' before 'tm'

 TimeElements tm;

              ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:180:8: error: expected unqualified-id before '.' token

  tm.Year = CalendarYrToTm(year);

    ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:181:13: error: expected unqualified-id before '.' token

       tm.Month = buf.substring(4,6).toInt();

         ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:182:13: error: expected unqualified-id before '.' token

       tm.Day = buf.substring(6,8).toInt();

         ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:183:13: error: expected unqualified-id before '.' token

       tm.Wday = NULL; 

         ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:184:7: error: expected unqualified-id before '.' token

 tm.Hour = buf.substring(8,10).toInt();

   ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:185:13: error: expected unqualified-id before '.' token

       tm.Minute = buf.substring(10,12).toInt();

         ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:186:13: error: expected unqualified-id before '.' token

       tm.Second = buf.substring(12,14).toInt();// UTC_unixtimestamp

         ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:187:29: error: expected primary-expression before ')' token

 time_t tst = makeTime(tm);

                         ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:187:29: error: 'makeTime' was not declared in this scope

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:190:2: error: 'StaticJsonBuffer' was not declared in this scope

StaticJsonBuffer<300> jsun;

^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:190:24: error: 'jsun' was not declared in this scope

StaticJsonBuffer<300> jsun;

                    ^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:191:2: error: 'JsonObject' was not declared in this scope

JsonObject& root = jsun.createObject();

^

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM\src/TinyGsmClientSIM808.h:191:14: error: 'root' was not declared in this scope

JsonObject& root = jsun.createObject();

          ^

In file included from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\ArduinoHttpClient\src/ArduinoHttpClient.h:8:0,

             from C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino:32:

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h: In member function 'virtual void HttpClient::flush()':

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:310:50: error: return-statement with a value, in function returning 'void' [-fpermissive]

 virtual void flush() { return iClient->flush(); };

                                              ^

C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino: At global scope:

HttpClient:67:15: error: cannot declare variable 'client' to be of abstract type 'TinyGsmSim800::GsmClient'

TinyGsmClient client(modem);

           ^

In file included from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClientSIM808.h:12:0,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClient.h:29,

             from C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino:31:

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClientSIM800.h:53:7: note: because the following virtual functions are pure within 'TinyGsmSim800::GsmClient':

class GsmClient : public Client

   ^

In file included from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmCommon.h:25:0,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClientSIM800.h:21,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClientSIM808.h:12,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClient.h:29,

             from C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino:31:

D:\Benutzer\ic-sc\Dokumente\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/Client.h:29:21: note: virtual int Client::connect(const IPAddress&, uint16_t)

     virtual int connect(CONST IPAddress& ip, uint16_t port) =0;

                 ^

D:\Benutzer\ic-sc\Dokumente\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/Client.h:37:22: note: virtual bool Client::flush(unsigned int)

     virtual bool flush(unsigned int maxWaitMs = 0) = 0;

                  ^

D:\Benutzer\ic-sc\Dokumente\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/Client.h:38:22: note: virtual bool Client::stop(unsigned int)

     virtual bool stop(unsigned int maxWaitMs = 0) = 0;

                  ^

HttpClient:68:12: error: cannot declare variable 'http' to be of abstract type 'HttpClient'

HttpClient http(client, server, port);

        ^

In file included from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\ArduinoHttpClient\src/ArduinoHttpClient.h:8:0,

             from C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino:32:

D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:41:7: note: because the following virtual functions are pure within 'HttpClient':

class HttpClient : public Client

   ^

In file included from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmCommon.h:25:0,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClientSIM800.h:21,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClientSIM808.h:12,

             from D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\arduino_267956\src/TinyGsmClient.h:29,

             from C:\Users\ic-sc\AppData\Local\Temp\arduino_modified_sketch_875821\HttpClient.ino:31:

D:\Benutzer\ic-sc\Dokumente\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/Client.h:29:21: note: virtual int Client::connect(const IPAddress&, uint16_t)

     virtual int connect(CONST IPAddress& ip, uint16_t port) =0;

                 ^

D:\Benutzer\ic-sc\Dokumente\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/Client.h:37:22: note: virtual bool Client::flush(unsigned int)

     virtual bool flush(unsigned int maxWaitMs = 0) = 0;

                  ^

D:\Benutzer\ic-sc\Dokumente\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/Client.h:38:22: note: virtual bool Client::stop(unsigned int)

     virtual bool stop(unsigned int maxWaitMs = 0) = 0;

                  ^

Mehrere Bibliotheken wurden für "TinyGsmClient.h" gefunden
Benutzt: D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM
Bibliothek TinyGSM in Version 0.3.5 im Ordner: D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\TinyGSM wird verwendet
Bibliothek ArduinoHttpClient in Version 0.3.1 im Ordner: D:\Benutzer\ic-sc\Dokumente\Arduino\libraries\ArduinoHttpClient wird verwendet
exit status 1
cannot declare variable 'client' to be of abstract type 'TinyGsmSim800::GsmClient'

If I compile that with the latest stable version the compilation will work fine.

@d-a-v
Copy link
Collaborator

d-a-v commented Feb 1, 2019

@ChrSchultz

  • it is unrelated
  • it looks like an installation problem.
    For example this type TimeElements tm; does not exist in this core,
    your environment at least doesn't find the external libraries you are using.

The OP is fixed, we are waiting for feedback.
Please try with a clean installation and if the problem persists, open a new issue and fill the issue template.

@crankyoldgit
Copy link
Author

@d-a-v I'll close this for now as the work-around fixes it. I'm assuming #5682 is the fix. I'll re-open/comment etc here if the next beta/final release doesn't resolve it. I won't be backing out the recommended work-around till then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: network type: bug waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

4 participants