Cannot compile with feature "Script"
See original GitHub issueI want to compile a binary for a smart meter.
#ifndef USE_SCRIPT
#define USE_SCRIPT
#endif
#ifndef USE_SML_M
#define USE_SML_M
#endif
#ifdef USE_RULES
#undef USE_RULES
#endif
But I get an error every time I define my custom features.
I narrowed the issue down to the script feature.
These are the log messages that seem to be important:
Processing firmware (platform: espressif8266 @ 2.6.3; framework: arduino; board: esp8266_1M)
--------------------------------------------------------------------------------
Platform Manager: Installing espressif8266 @ 2.6.3
Downloading
Unpacking
Platform Manager: espressif8266 @ 2.6.3 has been installed!
The platform 'espressif8266 @ 2.6.3' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.
Tool Manager: Installing platformio/tool-esptool @ <2
Downloading
Unpacking
Tool Manager: tool-esptool @ 1.413.0 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp8266_1M.html
PLATFORM: Espressif 8266 (2.6.3) > Espressif Generic ESP8266 Tasmota 1M sketch NO SPIFFS
HARDWARE: ESP8266 80MHz, 80KB RAM, 972.00KB Flash
PACKAGES:
- framework-arduinoespressif8266 2.7.4+9
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.30100.210531 (3.1.0)
- toolchain-xtensa 2.40802.200502 (4.8.2)
Converting tasmota.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ strict
Found 93 compatible libraries
Scanning dependencies...
[...]
Compiling .pio/build/firmware/lib4d9/ESP8266WiFi/ESP8266WiFiGratuitous.cpp.o
/tmp/Tasmota/tasmota/xdrv_10_scripter.ino:106:17: note: #pragma message: script compression option used
#pragma message "script compression option used"
^
Compiling .pio/build/firmware/lib4d9/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
[...]
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/bitmath.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/bitmath.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/bitreader.c.o
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/cpu.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/bitreader.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from lib/lib_audio/ESP8266Audio/src/libflac/cpu.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/crc.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/crc.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/fixed.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/fixed.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/float.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/float.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/format.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/format.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/lpc.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/lpc.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/md5.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/md5.c:2:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/memory.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/memory.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/stream_decoder.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/stream_decoder.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libflac/window.c.o
In file included from lib/lib_audio/ESP8266Audio/src/libflac/window.c:34:0:
lib/lib_audio/ESP8266Audio/src/libflac/config.h:6:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
<command-line>:0:0: note: this is the location of the previous definition
Compiling .pio/build/firmware/libc17/ESP8266Audio/libhelix-aac/aacdec.c.o
Compiling .pio/build/firmware/libc17/ESP8266Audio/libhelix-aac/aactabs.c.o
[...]
Archiving .pio/build/firmware/libFrameworkArduino.a
Linking .pio/build/firmware/firmware.elf
/root/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/firmware/src/tasmota.ino.cpp.o:(.text._Z14Run_script_subPKcaP5GVARS+0x90): undefined reference to `WSContentFlush()'
/root/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/firmware/src/tasmota.ino.cpp.o:(.text._Z14Run_script_subPKcaP5GVARS+0x94): undefined reference to `WSContentSend_P(char const*, ...)'
/root/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/firmware/src/tasmota.ino.cpp.o: in function `Run_script_sub(char const*, signed char, GVARS*)':
tasmota.ino.cpp:(.text._Z14Run_script_subPKcaP5GVARS+0x94c): undefined reference to `WSContentFlush()'
/root/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: tasmota.ino.cpp:(.text._Z14Run_script_subPKcaP5GVARS+0x957): undefined reference to `WSContentSend_P(char const*, ...)'
/root/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: tasmota.ino.cpp:(.text._Z14Run_script_subPKcaP5GVARS+0x95d): undefined reference to `WSContentFlush()'
collect2: error: ld returned 1 exit status
*** [.pio/build/firmware/firmware.elf] Error 1
========================= [FAILED] Took 66.94 seconds =========================
Environment Status Duration
------------- -------- ------------
firmware FAILED 00:01:06.936
==================== 1 failed, 0 succeeded in 00:01:06.936 ====================
Finished. Exit code: 1.
Am I doing something wrong? Can anybody reproduce this issue? Do you need more information?
Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Build crashes with "Error: Could not compile script" #19089
I get this problem with ./mach build --dev. Beneath is the error message when I execute the build with the --verbose ption, it...
Read more >Can't compile SSIS Script Component - Visual Studio Feedback
After upgrading to Visual Studio 2019 Version 16.9.1, I suddenly can't compile my Script Component - even when I pare is down to...
Read more >can't compile my perl script. What is the easiest way to make ...
I just want to be able to compile the code :-) trying to use perl2EXE it said it can't find a few of...
Read more >Documentation - Module Resolution - TypeScript
Using --noResolve ... Normally the compiler will attempt to resolve all module imports before it starts the compilation process. Every time it successfully ......
Read more >FAQ: Building Open MPI
The Open MPI configure script tests for a lot of things, ... If the features you need are not in default compiler/linker search...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not a Tasmota issue. Webinterface is enabled by default in Tasmota setup. It should be enabled always by default. There are only a few setups possible without webinterface.
Ask them on discord channel. There is a lot of people ready to help.