Trouble compiling 221105

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Trouble compiling 221105

#1 Post by waspie » 26 Nov 2022, 16:33

I haven't updated my units for quite some time.

Im platformio in VScode and getting this error:

Code: Select all

Compiling .pio\build\normal_ESP8266_4M1M\src\src\ControllerQueue_tmp\__tmpfile.cpp.o
Compiling .pio\build\normal_ESP8266_4M1M\src\src\CustomBuild\CompiletimeDefines.cpp.o
Compiling .pio\build\normal_ESP8266_4M1M\src\src\DataStructs_templ\SettingsStruct.cpp.o
Compiling .pio\build\normal_ESP8266_4M1M\src\src\DataStructs_tmp\__tmpfile.cpp.o
Compiling .pio\build\normal_ESP8266_4M1M\src\src\DataTypes_tmp\__tmpfile.cpp.o
Compiling .pio\build\normal_ESP8266_4M1M\src\src\ESPEasyCore\Controller.cpp.o
In file included from src\src\ControllerQueue_tmp\../ControllerQueue/../ControllerQueue/../DataStructs/../Globals/../DataStructs_templ/../Helpers/Misc.h:11:0,
                 from src\src\ControllerQueue_tmp\../ControllerQueue/../ControllerQueue/../DataStructs/../Globals/../DataStructs_templ/SettingsStruct.cpp:9,
                 from src\src\ControllerQueue_tmp\../ControllerQueue/../ControllerQueue/../DataStructs/../Globals/Settings.h:9,
                 from src\src\ControllerQueue_tmp\../ControllerQueue/../ControllerQueue/../DataStructs/TimingStats.h:9,
                 from src\src\ControllerQueue_tmp\../ControllerQueue/../ControllerQueue/ControllerDelayHandlerStruct.h:7,
                 from src\src\ControllerQueue_tmp\../ControllerQueue/DelayQueueElements.h:8,
                 from src\src\ControllerQueue_tmp\__tmpfile.cpp:235:
src\src\ControllerQueue_tmp\../ControllerQueue/../ControllerQueue/../DataStructs/../Globals/../DataStructs_templ/../Helpers/../Helpers/Scheduler.h:6:54: fatal error: ../DataStructs/EventStructCommandWrapper.h: No such file or directory
 #include "../DataStructs/EventStructCommandWrapper.h"
                                                      ^
compilation terminated.
Compiling .pio\build\normal_ESP8266_4M1M\src\src\ESPEasyCore\ESPEasyEth.cpp.o
Compiling .pio\build\normal_ESP8266_4M1M\src\src\ESPEasyCore\ESPEasyEthEvent.cpp.o
*** [.pio\build\normal_ESP8266_4M1M\src\src\ControllerQueue_tmp\__tmpfile.cpp.o] Error 1
========================================================================================= [FAILED] Took 185.99 seconds =========================================================================================

Environment          Status    Duration
-------------------  --------  ------------
normal_ESP8266_4M1M  FAILED    00:03:05.992
==================================================================================== 1 failed, 0 succeeded in 00:03:05.992 ==================================================================================== 
the file EventStructCommandWrapper.h does exist but i'm not following why its complaining about it being missing

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Trouble compiling 221105

#2 Post by Ath » 26 Nov 2022, 16:43

That has been fixed in the mega branch already. You can download the current sources form there, or use github to fork to your own account and clone that to your computer to build from there. Here is the development guide

If you are building the 'normal' configuration, why not download the prebuilt binaries?
/Ton (PayPal.me)

waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Re: Trouble compiling 221105

#3 Post by waspie » 27 Nov 2022, 02:17

I use custom.h with all my settings and unneeded plugins removed. Thanks for the information

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Trouble compiling 221105

#4 Post by TD-er » 27 Nov 2022, 17:50

If you want to build your own, you also need to select a "custom" build env. in PlatformIO.
Only on those builds, the content of Custom.h (with capital C) is used.

waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Re: Trouble compiling 221105

#5 Post by waspie » 28 Nov 2022, 02:32

TD-er wrote: 27 Nov 2022, 17:50 If you want to build your own, you also need to select a "custom" build env. in PlatformIO.
Only on those builds, the content of Custom.h (with capital C) is used.
i know you're the main guy on this.... and i've been using ESPEasy for YEARS now so i say this with plenty of respect but...are you sure?
I've been building with a custom.h on normal 4m1m for years and its always come out just the way I expected.

I went back to the august release before i saw the previous guy's response and built with my custom.h on normal 4m1m and it worked just like i remembered it ( i say this because the last time i built one was december 2019 - i have had nero zero problems in almost 3 years thanks to you). other than the mqtt import you have to check a box now for it to generate an event...that took a few minutes to figure out.
4m1m.png
4m1m.png (50.66 KiB) Viewed 2259 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Trouble compiling 221105

#6 Post by TD-er » 28 Nov 2022, 08:47

The capital C part of the remark, may only apply when you're running on a file system which really differentiates between capitalized letters. (Windows doesn't to some degree)

About whether or not Custom.h is only used on "custom" builds... At least that was how it was intended to work.

The #include "Custom.h" line should only be used if USE_CUSTOM_H is defined.
This is defined by the Python script which is executed by PlatformIO, before compilation starts.

Code: Select all

if os.path.isfile('src/Custom.h'):
  custom_defines=["-DUSE_CUSTOM_H"]
However.... (I checked the code for it)... it is never undefined when not building a Custom build.
That's not how it was intended to be used.

But now I have to think about it, whether we should change it or not.
At least it is confusing when helping someone who claims to be running some non-Custom build (based on the filename), but is missing some functionality.
On the other hand, nobody ever ran into these before, nor was anyone complaining about it...

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Trouble compiling 221105

#7 Post by Ath » 28 Nov 2022, 10:13

I did a quick check, earlier today, and my Normal build works as expected, using the regular configuration for Normal, and the Custom build also used the Custom.h (just a simple copy of the Custom-sample.h)

Normal build:

Code: Select all

Processing normal_ESP8266_4M1M (platform: espressif8266@2.6.3; board: esp8266_4M1M_board; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
 Default PIO configuration check 
 CPPDEFINES:   (removed from log for brevity)
 ------------------------------- 
And without further changes, a Custom build:

Code: Select all

Processing custom_ESP8266_4M1M (platform: espressif8266@2.6.3; board: esp8266_4M1M_board; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
 Custom PIO configuration check 
 CPPDEFINES:   (removed from log for brevity)
 Custom CPPDEFINES:   ['-DUSE_CUSTOM_H']
 ------------------------------- 
So the code seems to work fine.
/Ton (PayPal.me)

waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Re: Trouble compiling 221105

#8 Post by waspie » 28 Nov 2022, 21:33

TD-er wrote: 28 Nov 2022, 08:47
On the other hand, nobody ever ran into these before, nor was anyone complaining about it...
best left alone, right? :D

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Trouble compiling 221105

#9 Post by Ath » 28 Nov 2022, 21:55

To create a Custom build from VSCode with PlatformIO, the regular way of doing that is as illustrated:
Screenshot - 28-11-2022 , 21_48_25.png
Screenshot - 28-11-2022 , 21_48_25.png (20.29 KiB) Viewed 2228 times
1. Select the PlatformIO extension
2. Expand a Custom build environment
3. Click the Build entry to build the environment (you can also use the Upload option if the ESP is connected via USB Serial to your computer, that will build and upload the binary)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Trouble compiling 221105

#10 Post by TD-er » 28 Nov 2022, 22:04

waspie wrote: 28 Nov 2022, 21:33
TD-er wrote: 28 Nov 2022, 08:47
On the other hand, nobody ever ran into these before, nor was anyone complaining about it...
best left alone, right? :D
I guess so... but I'm so good at 'fixing' things that aint broken ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests