meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.26k stars 787 forks source link

[Bug]: Build Failure - two issues #3052

Closed rabarar closed 8 months ago

rabarar commented 8 months ago

Category

Other

Hardware

Not Applicable

Firmware Version

latest pull

Description

The firmware doesn't build: the c_cpp_properties.json generated file is corrupted with escape \ characters for one of the filenames

"~/.platformio/packages/framework-arduinoststm32/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C\(8-B-C\)U_WLE5C\(8-B-C\)U",

The build fails with errors:

In file included from src/DisplayFormatters.h:2,
                 from src/DisplayFormatters.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/GPSStatus.h:2,
                 from src/mesh/MeshService.h:7,
                 from src/PowerFSM.cpp:11:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/Power.cpp:14:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/SerialConsole.cpp:2:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/airtime.cpp:2:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
src/Power.cpp: In member function 'uint16_t AnalogBatteryLevel::getINAVoltage()':
src/Power.cpp:290:13: error: 'nodeTelemetrySensorsMap' was not declared in this scope
  290 |         if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~
*** [.pio/build/wio-e5/src/DisplayFormatters.cpp.o] Error 1
src/Power.cpp:291:20: error: 'ina219Sensor' was not declared in this scope
  291 |             return ina219Sensor.getBusVoltageMv();
      |                    ^~~~~~~~~~~~
*** [.pio/build/wio-e5/src/SerialConsole.cpp.o] Error 1
*** [.pio/build/wio-e5/src/PowerFSM.cpp.o] Error 1
*** [.pio/build/wio-e5/src/airtime.cpp.o] Error 1
src/Power.cpp:294:20: error: 'ina260Sensor' was not declared in this scope
  294 |             return ina260Sensor.getBusVoltageMv();
      |                    ^~~~~~~~~~~~
In file included from src/GPSStatus.h:2,
                 from src/main.h:3,
                 from src/concurrency/NotifiedWorkerThread.cpp:3:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
src/Power.cpp:297:20: error: 'ina3221Sensor' was not declared in this scope
  297 |             return ina3221Sensor.getBusVoltageMv();
      |                    ^~~~~~~~~~~~~
src/Power.cpp: In member function 'bool AnalogBatteryLevel::hasINA()':
src/Power.cpp:307:13: error: 'nodeTelemetrySensorsMap' was not declared in this scope
  307 |         if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/RedirectablePrint.cpp:2:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
src/Power.cpp:308:18: error: 'ina219Sensor' was not declared in this scope
  308 |             if (!ina219Sensor.isInitialized())
      |                  ^~~~~~~~~~~~
src/Power.cpp:310:20: error: 'ina219Sensor' was not declared in this scope
  310 |             return ina219Sensor.isRunning();
      |                    ^~~~~~~~~~~~
*** [.pio/build/wio-e5/src/concurrency/NotifiedWorkerThread.cpp.o] Error 1
src/Power.cpp:313:18: error: 'ina260Sensor' was not declared in this scope
  313 |             if (!ina260Sensor.isInitialized())
      |                  ^~~~~~~~~~~~
*** [.pio/build/wio-e5/src/RedirectablePrint.cpp.o] Error 1
src/Power.cpp:315:20: error: 'ina260Sensor' was not declared in this scope
  315 |             return ina260Sensor.isRunning();
      |                    ^~~~~~~~~~~~
In file included from src/GPSStatus.h:2,
                 from src/main.h:3,
                 from src/graphics/TFTDisplay.cpp:2:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/GPSStatus.h:2,
                 from src/gps/GPS.h:3,
                 from src/gps/GPS.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
*** [.pio/build/wio-e5/src/Power.cpp.o] Error 1
In file included from src/mesh/Channels.h:4,
                 from src/mesh/Channels.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
*** [.pio/build/wio-e5/src/graphics/TFTDisplay.cpp.o] Error 1
In file included from src/mesh/Channels.h:4,
                 from src/mesh/MeshModule.h:3,
                 from src/mesh/MeshModule.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/GPSStatus.h:2,
                 from src/main.h:3,
                 from src/gps/NMEAWPL.h:3,
                 from src/gps/NMEAWPL.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
*** [.pio/build/wio-e5/src/mesh/Channels.cpp.o] Error 1
In file included from src/mesh/Channels.h:4,
                 from src/mesh/Router.h:3,
                 from src/mesh/PacketHistory.h:3,
                 from src/mesh/PacketHistory.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
src/gps/GPS.cpp: In member function 'GnssModel_t GPS::probe(int)':
src/gps/GPS.cpp:772:22: error: 'class HardwareSerial' has no member named 'baudRate'
  772 |     if (_serial_gps->baudRate() != serialSpeed) {
      |                      ^~~~~~~~
src/gps/GPS.cpp:774:22: error: 'class HardwareSerial' has no member named 'updateBaudRate'
  774 |         _serial_gps->updateBaudRate(serialSpeed);
      |                      ^~~~~~~~~~~~~~
In file included from src/mesh/Channels.h:4,
                 from src/mesh/Router.h:3,
                 from src/mesh/PacketHistory.h:3,
                 from src/mesh/FloodingRouter.h:3,
                 from src/mesh/FloodingRouter.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
src/gps/GPS.cpp:827:22: error: 'class HardwareSerial' has no member named 'updateBaudRate'
  827 |         _serial_gps->updateBaudRate(serialSpeed);
      |                      ^~~~~~~~~~~~~~
In file included from src/mesh/Channels.h:4,
                 from src/mesh/PhoneAPI.cpp:2:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/mesh/Channels.h:4,
                 from src/mesh/MeshModule.h:3,
                 from src/mesh/SinglePortModule.h:2,
                 from src/mesh/ProtobufModule.h:2,
                 from src/mesh/ProtobufModule.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/mesh/SX126xInterface.cpp:4,
                 from src/mesh/InterfacesTemplates.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/mesh/Channels.h:4,
                 from src/mesh/NodeDB.cpp:4:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/GPSStatus.h:2,
                 from src/gps/GPS.h:3,
                 from src/mesh/MeshService.cpp:7:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
In file included from src/GPSStatus.h:2,
                 from src/gps/GPS.h:3,
                 from src/main.cpp:1:
src/mesh/NodeDB.h:114:92: error: 'uint' has not been declared
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                                            ^~~~
*** [.pio/build/wio-e5/src/mesh/MeshModule.cpp.o] Error 1
*** [.pio/build/wio-e5/src/mesh/PacketHistory.cpp.o] Error 1
*** [.pio/build/wio-e5/src/mesh/ProtobufModule.cpp.o] Error 1
*** [.pio/build/wio-e5/src/gps/GPS.cpp.o] Error 1
*** [.pio/build/wio-e5/src/gps/NMEAWPL.cpp.o] Error 1
*** [.pio/build/wio-e5/src/mesh/FloodingRouter.cpp.o] Error 1
*** [.pio/build/wio-e5/src/mesh/InterfacesTemplates.cpp.o] Error 1
src/mesh/NodeDB.cpp:357:6: error: no declaration matches 'void NodeDB::removeNodeByNum(uint)'
  357 | void NodeDB::removeNodeByNum(uint nodeNum)
      |      ^~~~~~
src/mesh/NodeDB.h:114:76: note: candidate is: 'void NodeDB::removeNodeByNum(int)'
  114 |     void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum);
      |                                                                            ^~~~~~~~~~~~~~~
src/mesh/NodeDB.h:40:7: note: 'class NodeDB' defined here
   40 | class NodeDB
      |       ^~~~~~
In file included from src/mesh/generated/meshtastic/localonly.pb.h:8,
                 from src/mesh/generated/meshtastic/deviceonly.pb.h:8,
                 from src/mesh/generated/meshtastic/admin.pb.h:10,
                 from src/mesh/mesh-pb-constants.h:3,
                 from src/mesh/PhoneAPI.h:4,
                 from src/mesh/StreamAPI.h:3,
                 from src/SerialConsole.h:4,
                 from src/DebugConfiguration.h:26,
                 from src/configuration.h:207,
                 from src/mesh/NodeDB.cpp:1:
src/mesh/NodeDB.cpp: In member function 'void NodeDB::init()':
src/mesh/generated/meshtastic/module_config.pb.h:463:55: warning: narrowing conversion of '(const char*)""' from 'const char*' to 'bool' [-Wnarrowing]
  463 | #define meshtastic_RemoteHardwarePin_init_default {0, "", _meshtastic_RemoteHardwarePinType_MIN}
      |                                                       ^~
src/mesh/NodeDB.cpp:455:55: note: in expansion of macro 'meshtastic_RemoteHardwarePin_init_default'
  455 |         meshtastic_NodeRemoteHardwarePin empty[12] = {meshtastic_RemoteHardwarePin_init_default};
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** [.pio/build/wio-e5/src/mesh/PhoneAPI.cpp.o] Error 1
*** [.pio/build/wio-e5/src/mesh/MeshService.cpp.o] Error 1
*** [.pio/build/wio-e5/src/mesh/NodeDB.cpp.o] Error 1
*** [.pio/build/wio-e5/src/main.cpp.o] Error 1
======================================================================= [FAILED] Took 4.00 seconds =======================================================================

Environment    Status    Duration
-------------  --------  ------------
wio-e5         FAILED    00:00:04.004

Relevant log output

No response

GUVWAF commented 8 months ago

The wio-e5 environment is still a work-in-progress, see #2960. Do you need specifically this environment? While this is set as the default_envs in platformio.ini, you can select the appropriate environment for your device.

rabarar commented 8 months ago

Is there a stable branch to pull?On Jan 4, 2024, at 10:34 AM, GUVWAF @.***> wrote: The wio-e5 environment is still a work-in-progress, see #2960. Do you need specifically this environment? While this is set as the default_envs in platformio.ini, you can select the appropriate environment for your device.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

GUVWAF commented 8 months ago

For the wio-e5 environment or in general? The firmware should build successfully for all supported devices on the master branch as can be seen by the CI. As I said, the wio-e5 is a work-in-progress in PR 2960 using branch stm32wl.

rabarar commented 8 months ago

I’m confused then. I simply cloned the repo master branch, made no modifications, and attempted to build it. So I don’t see how your CI is successful when I can’t replicate a clean, unmodified build.On Jan 4, 2024, at 12:55 PM, GUVWAF @.***> wrote: For the wio-e5 environment or in general? The firmware should build successfully for all supported devices on the master branch as can be seen by the CI. As I said, the wio-e5 is a work-in-progress in PR 2960 using branch stm32wl.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

jp-bennett commented 8 months ago

I’m confused then. I simply cloned the repo master branch, made no modifications, and attempted to build it. So I don’t see how your CI is successful when I can’t replicate a clean, unmodified build.On Jan 4, 2024, at 12:55 PM, GUVWAF @.> wrote: For the wio-e5 environment or in general? The firmware should build successfully for all supported devices on the master branch as can be seen by the CI. As I said, the wio-e5 is a work-in-progress in PR 2960 using branch stm32wl. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

You need to pick your build target before building. That said, it's a problem if we're building a WIP target by default.

jp-bennett commented 8 months ago

We've switched the default build target back to the T-beam. This should make the firmware build cleanly for that device, without setting the target, so closing this issue. Thanks for pointing out this unintended behavior!

rabarar commented 8 months ago

My pleasure!On Jan 4, 2024, at 1:24 PM, Jonathan Bennett @.***> wrote: We've switched the default build target back to the T-beam. This should make the firmware build cleanly for that device, without setting the target, so closing this issue. Thanks for pointing out this unintended behavior!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>