Skip to content

3.5.0 merge for 5.2.1 - #159

Merged
WouterJansen merged 15 commits into
5.2.1from
5.2.1dev
Sep 16, 2026
Merged

WouterJansen merged 15 commits into
5.2.1from
5.2.1dev

Conversation

@WouterJansen

Copy link
Copy Markdown
Contributor

No description provided.

WouterJansen and others added 15 commits September 16, 2026 09:52
This test is undefined behaviour, and not only on macOS.

`std::tm t;` is uninitialised, and "2018-February-22 15:24:00" is parsed with
to_time_t's default format "%Y-%m-%d %H:%M:%S". `%m` expects a number and cannot
read "February", so get_time sets failbit and leaves the struct as whatever was
on the stack. mktime is then called on that garbage:

    parse failed? YES
    tm_year=118 tm_mon=0 tm_mday=1 tm_hour=-117784575
    mktime  = -1

The sun's position is computed for time_t -1 -- 1969 -- so the altitude assert
fails, and the whole suite aborts before SettingsTest and SimpleFlightTest run.

Whether it passes is a property of the stack, not of the code, which is why it
survives on some toolchains and aborts on others. Passing "%Y-%B-%d %H:%M:%S"
parses correctly (mktime = 1519341840) and the test passes.

Not a macOS fix: it is a real bug everywhere that merely happens to be latent.
`brew install llvm@8` fails on any current Homebrew -- the oldest formula
available is llvm@14, so setup.sh cannot complete on macOS at all.

The line's own comment already says "Update below line for newer versions", and
build.sh does not want a pinned version either: its macOS branch resolves the
compiler as $(brew --prefix)/opt/llvm/bin/clang with the comment "now pick up
whatever setup.sh installs", having commented out the old llvm@8 path years ago.
Plain `llvm` is what the rest of the build already expects.

Verified on macOS 15.7.7 / Apple M1 Pro: setup.sh completes, and build.sh then
produces native arm64 libAirLib.a, librpc.a and libMavLinkCom.a in 1m43s.
…fixes the macOS plugin build)

manually done #145 by v3g42
Documented multiple build fixes for MacOS in the changelog.
The server binds six parameters and the client sent five, so every call
failed on arity. The Python client already passes all six.
…GPULiDAR, Echo & DistanceSensor) and updating for v3.5.0 release
@WouterJansen
WouterJansen merged commit d0511bd into 5.2.1 Sep 16, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants