[GH-ISSUE #671] development branch compilation failes on esp8266 after commit d140ccff84 #559

Closed
opened 2026-02-28 01:25:52 +03:00 by kerem · 1 comment
Owner

Originally created by @liebman on GitHub (Jul 22, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/671

Basic Infos

Hardware

WiFimanager Branch/Release: Development

Esp8266/Esp32:

Hardware: ESP-12e

Core Version: current git

Description

I updated to the current development branch and found that it does not compile on an esp8266. Using git bisect I've isolated it to this commit:

d140ccff84fc4881095aeddced2b7917e708963f is the first bad commit
commit d140ccff84fc4881095aeddced2b7917e708963f
Author: Shawn A <spam@rumental.com>
Date:   Thu Jul 19 10:02:53 2018 -0500

    adds setCountry, default US
    
    accepts US JP CN, codes must be added to strings and WiFiSetCountry atm

:100644 100644 4f5ecaacd242fb95377ca2e6a1e5b5dbb5bb61ba b18423ec763c12ce30628faae6efb786b8d9dd20 M      WiFiManager.cpp
:100644 100644 99f43304e4d3201a695f8c473b4f1f376fde739d 6720ce548bb0a0c77dc55161954d4714e5759f1f M      WiFiManager.h
:100644 100644 60850a22e5419992bdd77b709f888ada699a8027 de5d57de1192ea4971fc9c474d0c18d760e00ed8 M      strings_en.h

Problem description

Settings in IDE

Module: NodeMcu

Additional libraries:

Sketch

#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager

void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);

    //WiFiManager, Local intialization. Once its business is done, there is no need to keep it around
    WiFiManager wm;
    
    //reset settings - wipe credentials for testing
    //wm.resetSettings();
    
    //set custom ip for portal
    //wm.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));

    //automatically connect using saved credentials if they exist
    //If connection fails it starts an access point with the specified name
    //here  "AutoConnectAP" if empty will auto generate basedcon chipid, if password is blank it will be anonymous
    //and goes into a blocking loop awaiting configuration
    wm.autoConnect("AutoConnectAP");
    //or use this for auto generated name ESP + ChipID
    //wm.autoConnect();

    //if you get here you have connected to the WiFi
    Serial.println("connected...yeey :)");
}

void loop() {
    // put your main code here, to run repeatedly:
    
}

Debug Messages

"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/sdk/lwip2/include" "-I/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/Users/chris.l/Dropbox/git/AnalogClock/Simple/Release/core" -c -Wall -Wextra  -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=1460 -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DARDUINO=10802 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"   -DESP8266   -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/cores/esp8266" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/variants/nodemcu" -I"/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/libraries/DNSServer/src" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src" -MMD -MP -MF"libraries/WiFiManager/WiFiManager.cpp.d" -MT"libraries/WiFiManager/WiFiManager.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp"  -o  "libraries/WiFiManager/WiFiManager.cpp.o"
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp: In member function 'bool WiFiManager::WiFiSetCountry()':
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2342:29: error: 'WIFI_MODE_NULL' was not declared in this scope
   else if(WiFi.getMode() == WIFI_MODE_NULL); // exception if wifi not init!
                             ^
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2343:74: error: 'esp_wifi_set_country' was not declared in this scope
   else if(_wificountry == "US") ret = esp_wifi_set_country(&WM_COUNTRY_US) == ESP_OK;
                                                                          ^
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2343:79: error: 'ESP_OK' was not declared in this scope
   else if(_wificountry == "US") ret = esp_wifi_set_country(&WM_COUNTRY_US) == ESP_OK;
                                                                               ^
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2344:74: error: 'esp_wifi_set_country' was not declared in this scope
   else if(_wificountry == "JP") ret = esp_wifi_set_country(&WM_COUNTRY_JP) == ESP_OK;
                                                                          ^
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2344:79: error: 'ESP_OK' was not declared in this scope
   else if(_wificountry == "JP") ret = esp_wifi_set_country(&WM_COUNTRY_JP) == ESP_OK;
                                                                               ^
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2345:74: error: 'esp_wifi_set_country' was not declared in this scope
   else if(_wificountry == "CN") ret = esp_wifi_set_country(&WM_COUNTRY_CN) == ESP_OK;
                                                                          ^
/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2345:79: error: 'ESP_OK' was not declared in this scope
   else if(_wificountry == "CN") ret = esp_wifi_set_country(&WM_COUNTRY_CN) == ESP_OK;
                                                                               ^
make: *** [libraries/WiFiManager/WiFiManager.cpp.o] Error 1

Originally created by @liebman on GitHub (Jul 22, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/671 ### Basic Infos #### Hardware WiFimanager Branch/Release: Development Esp8266/Esp32: Hardware: ESP-12e Core Version: current git ### Description I updated to the current development branch and found that it does not compile on an esp8266. Using `git bisect` I've isolated it to this commit: ``` d140ccff84fc4881095aeddced2b7917e708963f is the first bad commit commit d140ccff84fc4881095aeddced2b7917e708963f Author: Shawn A <spam@rumental.com> Date: Thu Jul 19 10:02:53 2018 -0500 adds setCountry, default US accepts US JP CN, codes must be added to strings and WiFiSetCountry atm :100644 100644 4f5ecaacd242fb95377ca2e6a1e5b5dbb5bb61ba b18423ec763c12ce30628faae6efb786b8d9dd20 M WiFiManager.cpp :100644 100644 99f43304e4d3201a695f8c473b4f1f376fde739d 6720ce548bb0a0c77dc55161954d4714e5759f1f M WiFiManager.h :100644 100644 60850a22e5419992bdd77b709f888ada699a8027 de5d57de1192ea4971fc9c474d0c18d760e00ed8 M strings_en.h ``` Problem description ### Settings in IDE Module: NodeMcu Additional libraries: ### Sketch ```cpp #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager void setup() { // put your setup code here, to run once: Serial.begin(115200); //WiFiManager, Local intialization. Once its business is done, there is no need to keep it around WiFiManager wm; //reset settings - wipe credentials for testing //wm.resetSettings(); //set custom ip for portal //wm.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); //automatically connect using saved credentials if they exist //If connection fails it starts an access point with the specified name //here "AutoConnectAP" if empty will auto generate basedcon chipid, if password is blank it will be anonymous //and goes into a blocking loop awaiting configuration wm.autoConnect("AutoConnectAP"); //or use this for auto generated name ESP + ChipID //wm.autoConnect(); //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); } void loop() { // put your main code here, to run repeatedly: } ``` ### Debug Messages ``` "/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/sdk/lwip2/include" "-I/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/Users/chris.l/Dropbox/git/AnalogClock/Simple/Release/core" -c -Wall -Wextra -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=1460 -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DARDUINO=10802 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU" -DESP8266 -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/cores/esp8266" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/variants/nodemcu" -I"/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/libraries/DNSServer/src" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src" -I"/Users/chris.l/Dropbox/git/AnalogClock/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src" -MMD -MP -MF"libraries/WiFiManager/WiFiManager.cpp.d" -MT"libraries/WiFiManager/WiFiManager.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "/Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp" -o "libraries/WiFiManager/WiFiManager.cpp.o" /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp: In member function 'bool WiFiManager::WiFiSetCountry()': /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2342:29: error: 'WIFI_MODE_NULL' was not declared in this scope else if(WiFi.getMode() == WIFI_MODE_NULL); // exception if wifi not init! ^ /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2343:74: error: 'esp_wifi_set_country' was not declared in this scope else if(_wificountry == "US") ret = esp_wifi_set_country(&WM_COUNTRY_US) == ESP_OK; ^ /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2343:79: error: 'ESP_OK' was not declared in this scope else if(_wificountry == "US") ret = esp_wifi_set_country(&WM_COUNTRY_US) == ESP_OK; ^ /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2344:74: error: 'esp_wifi_set_country' was not declared in this scope else if(_wificountry == "JP") ret = esp_wifi_set_country(&WM_COUNTRY_JP) == ESP_OK; ^ /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2344:79: error: 'ESP_OK' was not declared in this scope else if(_wificountry == "JP") ret = esp_wifi_set_country(&WM_COUNTRY_JP) == ESP_OK; ^ /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2345:74: error: 'esp_wifi_set_country' was not declared in this scope else if(_wificountry == "CN") ret = esp_wifi_set_country(&WM_COUNTRY_CN) == ESP_OK; ^ /Users/chris.l/Dropbox/git/AnalogClock/libraries/WiFiManager/WiFiManager.cpp:2345:79: error: 'ESP_OK' was not declared in this scope else if(_wificountry == "CN") ret = esp_wifi_set_country(&WM_COUNTRY_CN) == ESP_OK; ^ make: *** [libraries/WiFiManager/WiFiManager.cpp.o] Error 1 ```
kerem 2026-02-28 01:25:52 +03:00
  • closed this issue
  • added the
    bug
    Branch
    labels
Author
Owner

@tablatronix commented on GitHub (Jul 22, 2018):

sorry about that

<!-- gh-comment-id:406876018 --> @tablatronix commented on GitHub (Jul 22, 2018): sorry about that
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#559
No description provided.