Conversation
|
@ymorin-orange Could you please explain the circumstances where these changes are required? |
|
@ralight Thanks for looking at this PR!
The issues arrised when trying to bring the new Mosquitto version from the 2.1.x series, to Buildroot. Buildroot is a build system for embedded devices, using cross-compilation to build from source. In Buildroot, there is a script that (basically) builds a package using various toolchains, which are known to exhibit the issues most often reported when targetting devices in the wild. This uncovers corner cases (Like dependency on MMU for When cross-compiling, there are cases where:
I had thought the comments in the commit logs were enough; if not, tell me, so I can expand them (but I can surely fix the typoes I overlooked, of course! Sorry for those, I'm very bad at proof-reading my own words...). |
d599345 to
79331d1
Compare
|
@ralight Thanks for triggering the workflows. 👍 I'll address the build failures ASAP (expect a day or two so I can sneak that in my schedule). |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
79331d1 to
31badb1
Compare
|
@ymorin-orange Thanks for the details - sorry I missed the extended comments in the commits, it's more unusual to get PRs with them in. I've pushed the getaddrinfo commit already because that is fine as it is. I've fixed the C++ support case and pushed a commit for that, so it's just the getrandom which needs sorting. |
No worries, I'm more used to maling-list based workflows, so eh! ;-)
Thanks! I like your C++ fix better than mine, great!
If you need more about that, feel free to ask. It basically moves the check for the availability of getrandom() from the code (build time) to the CMake (configure). Ah... But I may have overlooked the build directly using Makefiles. That's what bothers you, right? If so, then I can address that as well. I think keeping the |
Exactly - at least for now the Makefiles have to keep support. |
OK, lemme look into that, then. Thanks for the review! |
Not all C libraries are glibc, or impersonating it; for example, musl does not pretend to be any version of glibc. Thus, building on musl fails when openssl is disabled, because no random-providing function is detected, although musl does provide getrandom(). uClibc-ng on the other hand, can impersonate glibc, but availability of getrandom() is not guatranteed there: getrandom() can be compiled out of uClinbc-ng, or uClibc-ng can be too old to have it. Add a configure-time check that getrandom() is available, as a fallback when TLS is not enabled (and thus openssl is not used), and when not on Win32 (where getting random numbers is always possible, at least from a build perspective). However, building with the plain Makefiles should keep working, so slightly rework the defines checks in the code to account for the fact that HAVE_GETRANDOM may already be defined at configure time. Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
31badb1 to
a572cd9
Compare
|
Nice, thanks very much |
fixesbranch is still based off the 2.0.x release seriesmake testwith your changes locally?masterThis series brings in a few build fixes for corner cases:
getaddrinfo_a()getrandom()at configure time