-
Notifications
You must be signed in to change notification settings - Fork 2
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 #1
Comments
This is not a known issue. Did the code compile without modifying any miniThrottle.h settings? If you changed any of the settings can you let me know what they were so I can try to reproduce the issue? Alternatively given the location of the code in /Arduino/libraries/lcdgfx/src/nano_gfx_types.h it may be an issue in lcdgfx. Is there any simple lcdgfx demo code you can compile without error? If you encounter an issue with the lcdgfx demo code then the issue may lie with their code. |
I just tried on another machine as a test.
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
I can compile the lcdgfx/demos/ssd1306_demo sketch without errors. Version 0.4 downloaded from https://conferre.cf/miniThrottle/miniThrottle.zip and minithrottle.h copied from the example file produces the output below. `In file included from c:\Users\morten\Documents\Arduino\libraries\lcdgfx\src/lcdgfx.h:30, exit status 1 Compilation error: exit status 1` |
The compiler I have hasn't been updated in some time. I've tested compilation on Windows with: Arduino 1.8.19 (Windows Store 1.8.57.0)
These three compile OK on my system. I may need a few days to download / test using a newer Windows or Linux graphical interface to see if I can replicate and resolve the issue. |
The CLI environment shows the following library versions in use, again they are most likely not the latest. Used platform Version Path |
I got it to compile now using the same versions as you for the esp32encoder library and the esp32 platform. Afterwards I tested with upgrading the esp32 platform to version 2.0 and that broke it. PS C:\Users\morten\Documents\Arduino> arduino-cli compile --fqbn esp32:esp32:lolin32:CPUFreq=80,PartitionScheme=min_spiffs ESP32_miniThrottle Used library Version Path Used platform Version Path |
That is interesting! After a fresh install of the environment (to exclude any previous tweaks I may have had in my system) and using platform 2.0.5 I could replicate the error. Confirming the issue is related to platform upgrade. Some further "Google-Research" later... and I the code compiled after commenting out the offending lines in
But, I've not flashed that to a test unit to check if it works. - just because it compiles doesn't mean it will work! So what lead me to fiddle in lcdgfx's code? A quote old bugzilla posting: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605 (comment 5) which suggests:
Probably the new platform better implements / enforces at standard that uses min and max as expansions that then renders the original code meaningless to the compiler. But I'd rather leave that determination / fix to the lcdgfx project. Until then I would recommend sticking to platform 1.0.6. |
Created lcdgfx issue: lexus2k/lcdgfx#94 |
The cause of this issue has been tracked to using http client with lcdgfx. In the development version there is now a "#define NOHTTPCLIENT 1" option that can be added to miniThrottle.h - this will disable the http client on the miniThrottle build: effectively you can't download config files or OTA updates to the device. It will still support the HTTP configuration server. |
I keep getting the below error when trying to compile the project for a Lolin D32 esp32 board. It happens with both the 0.4 and the 0.5 versions of the throttle.
`In file included from /Users/morten/Documents/Arduino/libraries/lcdgfx/src/lcdgfx.h:30,
from /Users/morten/Documents/Creative Projects/arduino/ESP32_miniThrottle/static_defs.h:9,
from /Users/morten/Documents/Creative Projects/arduino/ESP32_miniThrottle/ESP32_miniThrottle.ino:6:
/Users/morten/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/xtensa-esp32-elf/include/c++/8.4.0/bits/stl_vector.h: In member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::_M_check_len(std::vector<_Tp, _Alloc>::size_type, const char*) const':
/Users/morten/Documents/Arduino/libraries/lcdgfx/src/nano_gfx_types.h:41:19: error: expected unqualified-id before '(' token
#define max(a, b) ((a) > (b) ? (a) : (b))
^
/Users/morten/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/xtensa-esp32-elf/include/c++/8.4.0/bits/stl_bvector.h: In member function 'std::vector<bool, _Alloc>::size_type std::vector<bool, _Alloc>::_M_check_len(std::vector<bool, _Alloc>::size_type, const char*) const':
/Users/morten/Documents/Arduino/libraries/lcdgfx/src/nano_gfx_types.h:41:19: error: expected unqualified-id before '(' token
#define max(a, b) ((a) > (b) ? (a) : (b))
^
exit status 1
Compilation error: exit status 1`
The text was updated successfully, but these errors were encountered: