Open ffontaine opened 5 months ago
Thanks @ffontaine for reporting the issue, which we also investigated today. However I think your patch is not completely correct, as it would break the build for toolchains older than glibc 2.35, for which getaddrinfo_a is in the separate libanl.so library.
Also, your sentence "So do not hardcode -lanl in config.mk as anl is already added if needed in src/CMakeLists.txt since https://github.com/eclipse/mosquitto/commit/8406c08124a6984053c95b41cceff87878278a32" is quite confusing. Indeed, there's no relationship between config.mk and CMakeLists.txt.
In addition, the CMakeLists.txt also get it wrong: it only checks for getaddrinfo_a in the anl library. But in fact, now getaddrinfo_a is available directly in the C library itself. So the CMakeLists.txt should check in C library first, then in libanl, and if not disable adns support.
libanl is not built since glibc 2.35 and https://github.com/bminor/glibc/commit/737e873b305d8a2d925a8e346b84910eae5a39b3 resulting in the following build failure:
So do not hardcode
-lanl
inconfig.mk
as anl is already added if needed insrc/CMakeLists.txt
since https://github.com/eclipse/mosquitto/commit/8406c08124a6984053c95b41cceff87878278a32Fixes: