Closed ThierryM closed 6 years ago
Hi
May be there are missing some libraries. Please copy all the libraries provided in https://github.com/arendst/Sonoff-Tasmota/tree/development/lib
Please read the wiki at: https://github.com/arendst/Sonoff-Tasmota/wiki/Arduino-IDE
Hi, Thanks Ascillato but I've copied yet the libraries as it's indicated in the Arduino-IDE wiki page. An other idea ? Thanks
I have arduino working just fine with Tasmota.
Seems that some file is missing in your setup. Have you tried to install arduino again?
Also you have duplicated libraries. Try delete everything and start a fresh install from zero
This is this error that it's important (the other aren't, I had these with the 5.12 version that worked fine) :
sonoff_post.h:28: error: expected unqualified-id before 'extern'
extern "C" {
^
sonoff_post.h:28: error: expected constructor, destructor, or type conversion before 'extern'
Regards
Some weird compiling errors shows up when having problems with the libraries. The v5.14 and v6 uses more libraries and also some other libraries that were updated. May be that is why the v5.12 compiles in your system.
Please, try a fresh installation from scratch.
Hi,
Could you manage to solve it ?
Hi Adrian, No I didn't have the time to work on this problem. I'll go back here to tell my experience. Regards
Hi
If you still fail you are welcome to use the quickstart portable package from https://thehackbox.org/downloads/arduino_esp8266_tasmota-20180614.7z
It is a portable version of Arduino 1.8.5 with support for ESP8266 and Sonoff-Tasmota 6.0.0a added already.
Just extract and run the arduino.exe that is inside the folder and then open the sonoff sketch under the folder portable\sketchbook\sonoff
If you want to see how it was created/updated look at the update.bat file which copied to libs and source into place - This is similar to the process described in the wiki which @ascillato makes reference to.
If solved please close this issue.
edit I see you're running on Linux - the quickstart is only for Windows for now, but check the update.sh script anyway as it may hint at what you are missing in your installation.
Here's a portable for Ubuntu x64
https://thehackbox.org/downloads/arduino_esp8266_tasmota-20180615.tar.gz
@andrethomas Thanks for the portable for Ubuntu x64. I tried it but I got the same error :
In file included from /perso_ssd/Thierry/Electronique/Domotique/arduino_esp8266_tasmota/portable/sketchbook/sonoff/sonoff.ino:37:0:
sonoff_post.h:28: error: expected unqualified-id before 'extern'
extern "C" {
^
sonoff_post.h:28: error: expected constructor, destructor, or type conversion before 'extern'
In file included from /perso_ssd/Thierry/Electronique/Domotique/arduino_esp8266_tasmota/portable/sketchbook/libraries/ArduinoJson-5.11.2/src/ArduinoJson.hpp:10:0,
from /perso_ssd/Thierry/Electronique/Domotique/arduino_esp8266_tasmota/portable/sketchbook/libraries/ArduinoJson-5.11.2/src/ArduinoJson.h:10,
from /perso_ssd/Thierry/Electronique/Domotique/arduino_esp8266_tasmota/portable/sketchbook/sonoff/sonoff.ino:54:
/perso_ssd/Thierry/Electronique/Domotique/arduino_esp8266_tasmota/portable/sketchbook/libraries/ArduinoJson-5.11.2/src/ArduinoJson/DynamicJsonBuffer.hpp:19:28: error: expected declaration before end of line
#pragma GCC diagnostic push
So I will erase the configurations files and re-install Arduino IDE from zero and give a try again. Regards, Thierry
Can you give some of the output further up? I want to see where it references the toolchain/compiler
See the attachment. Regards, Thierry
You are using the sonoff.ino from /perso_ssd/Thierry/Electronique/Domotique/Sonoff Dual/Sonoff-Tasmota-development/sonoff/sonoff.ino
Can you open the one in the /portable/sketchbook/sonoff/ folder instead?
Sorry for my mistake but opening now the right file, I have the same error message. See attachment. Regards log compil Arduino Tasmota2.log
Hmm
Your sonoff_post.h looks like this at the top?
Yes my sonoff_post.h is the same. I have installed Arduino IDE on an Orange Pi Win Plus under Armbian and now no problem (the time for compiling is just longer). I think that I will reinstall Arduino IDE on my Ubuntu 16.04 and reconfigure it totally (when I'll do, I will report if the bug disappears). Thank you very much for your help, regards
Would be interesting to know what is causing it... thanks for the feedback
I'm back. I think that I have found the problem : it seems that there is a conflict with the files "user_config_override.h" and "user_config.h" because under my Orange Pi the problem appears again when I use the override file.
No problem with the override file : it's just a warning. But my problem appears when I compile with this override file (personnalized version of "user_config_override_sample.h"). I use the development source of Tasmota downloaded here.
Here the message error :
Arduino: 1.8.5 (Linux), Board: "Generic ESP8266 Module, Serial, 80 MHz, ck, 26 MHz, 40MHz, DOUT, 1M (no SPIFFS), 2, v1.4 Higher Bandwidth, Disabled, None, Only Sketch, 115200"
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:35:0:
sketch/user_config_override.h:24:2: warning: #warning **** user_config_override.h: Using Settings from this File **** [-Wcpp]
#warning **** user_config_override.h: Using Settings from this File ****
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:35:0:
sketch/user_config_override.h:91:0: warning: "LATITUDE" redefined [enabled by default]
#define LATITUDE xx.xxxx // [Latitude] Your location to be used with sunrise and sunset
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:33:0:
sketch/user_config.h:149:0: note: this is the location of the previous definition
#define LATITUDE xx.xxxxxx // [Latitude] Your location to be used with sunrise and sunset
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:35:0:
sketch/user_config_override.h:92:0: warning: "LONGITUDE" redefined [enabled by default]
#define LONGITUDE x.xxxx // [Longitude] Your location to be used with sunrise and sunset
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:33:0:
sketch/user_config.h:150:0: note: this is the location of the previous definition
#define LONGITUDE x.xxxxxx // [Longitude] Your location to be used with sunrise and sunset
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:35:0:
sketch/user_config_override.h:98:0: warning: "APP_TIMEZONE" redefined [enabled by default]
#define APP_TIMEZONE 99 // [Timezone] +1 hour (Amsterdam) (-13 .. 14 = hours from UTC, 99 = use TIME_DST/TIME_STD)
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:33:0:
sketch/user_config.h:153:0: note: this is the location of the previous definition
#define APP_TIMEZONE 1 // [Timezone] +1 hour (Amsterdam) (-13 .. 14 = hours from UTC, 99 = use TIME_DST/TIME_STD)
^
In file included from /home/thierry/Arduino/sonoff/sonoff.ino:37:0:
sonoff_post.h:28: error: expected unqualified-id before 'extern'
extern "C" {
^
sonoff_post.h:28: error: expected constructor, destructor, or type conversion before 'extern'
In file included from /home/thierry/Arduino/libraries/ArduinoJson-5.11.2/src/ArduinoJson.hpp:10:0,
from /home/thierry/Arduino/libraries/ArduinoJson-5.11.2/src/ArduinoJson.h:10,
from /home/thierry/Arduino/sonoff/sonoff.ino:54:
/home/thierry/Arduino/libraries/ArduinoJson-5.11.2/src/ArduinoJson/DynamicJsonBuffer.hpp:19:28: error: expected declaration before end of line
#pragma GCC diagnostic push
^
exit status 1
expected unqualified-id before 'extern'
I confirm the problem.
To reproduce it :
Go to "user_config.h", and uncomment this line to use the "user_config_override.h" file :
#define USE_CONFIG_OVERRIDE
If I comment this line, the problem deseappears.
The default is
//#define USE_CONFIG_OVERRIDE
To use config override you need to make sure the contents of user_config_override.h exist and are valid.
Makes sense - so it's not a bug thanks for figuring it out.
Cheers
The contents of user_config_override.h exist and are valid : there worked with the previous versions of Tasmota. When I copy the same parameters (there are only the parameters that I personalize) of user_config_override.h into user_config.h, there's no problem.
Hi,
If your issue is solved, please close it. Thanks! :+1:
What is in your user_config_overide.h? It looks like you are not undefining the variable before defining it again in user_config_override.h. That is what the error messages you are seeing mean.
Hi, Thanks for your help. No this issue isn't solved. Here my user_config_override.h , Regards user_config_override_anon.txt
There exists an error in your user_config_override.h
If you take out that unwanted * it will compile without any problem
Thanks a lot andrethomas : you found MY bug. You teach me a thing. Regards
Hi, I'm trying to compile on Arduino IDE 1.8.5 and Ubuntu 16.04, the Tasmota firmware versions 5.14 and 6 but I have this error :
I hadn't this error on 5.12 version. Thanks for your help, regards,
Thierry