Skip to content

Fix three build and link breaks in shared code - #13

Open
mmmorks wants to merge 1 commit into
staging/meshcore-devfrom
pr/09b-build-fixes
Open

mmmorks wants to merge 1 commit into
staging/meshcore-devfrom
pr/09b-build-fixes

Conversation

@mmmorks

@mmmorks mmmorks commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

Three one-line fixes of the same kind — code that does not compile or link somewhere — kept together because splitting them further would be three trivial PRs.

ConfigSerializer.cpp does not compile in the host test build. It calls atoi/atol/atof and reaches them through Arduino.h on MCU targets, but not in the native googletest environment. On macOS the whole suite fails to compile at ConfigSerializer.o, taking every unit test down with it. Include <stdlib.h>.

LocationProvider::sendSentence() is declared but never defined. It was the class's key function under the Itanium ABI, so the base vtable is un-emittable and any translation unit that emits it gets an undefined reference. Every current subclass overrides it, which is why no build has failed yet. Give it an empty default body, matching the no-op override in EnvironmentSensorManager.cpp. This is a latent hazard, not the host-test-build failure above — the native env compiles neither this header nor its users.

CustomLLCC68Wrapper::doResetAGC() does not compile. It calls sx126xResetAGC() with one argument; the only overload takes (SX126x*, bool rx_boost_gain). No environment in the tree compiles this wrapper yet, but the first board to use it will not build. Pass getRxBoostedGainMode(), as the SX1262, SX1268 and STM32WLx wrappers do.

How it was tested

  • pio test -e native: all suites pass on macOS (before the <stdlib.h> fix none of them compile there).
  • Compiled for meshnology_w12_repeater (ESP32-S3).

Dependencies

Independent. Applies to dev.

The same <stdlib.h> include is also carried in a PR against the l5yth/meshcore-linux fork, which needs it for its own host build; whichever lands first makes the other's hunk a no-op.

ConfigSerializer.cpp calls atoi/atol/atof and reaches them through
Arduino.h on MCU targets, but not in the host `native` googletest build. On
macOS the whole suite fails to compile at ConfigSerializer.o, taking every
unit test down with it. Include <stdlib.h>.

LocationProvider::sendSentence() was declared virtual but never defined
anywhere in the tree. It was the class's key function under the Itanium ABI,
so the base vtable is un-emittable: any translation unit that emits it gets
an undefined reference. Every current subclass overrides it, which is why no
build has failed yet. Give it an empty default body, matching the no-op
override in EnvironmentSensorManager.cpp. This is a latent hazard, not a
host-test-build failure -- the native env compiles neither this header nor
its users.

CustomLLCC68Wrapper::doResetAGC() calls sx126xResetAGC() with one argument;
the only overload takes (SX126x*, bool rx_boost_gain). No environment in the
tree compiles this wrapper yet, which is why nothing has failed, but the
first board to use it will not build. Pass getRxBoostedGainMode(), as the
SX1262, SX1268 and STM32WLx wrappers do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant