[Buildroot] package/mosquitto patch problem with gmake < 4.3
Trammell Hudson
hudson at trmm.net
Sat Oct 25 18:32:11 UTC 2025
It looks like the -lanl test was solved in the upstream mosquitto without
including any headers, so their upcoming 2.1.0 version does not cause
the problem with older gmake:
https://github.com/eclipse-mosquitto/mosquitto/commit/9be6f9a409585b579efa4002c7a5da26ae6a996a#diff-02ffa64880a3e0c0e7d284d6e86512af1c93edff5c9fb91d2112a54a1f5bd8d4
Does that seem like a reasonable test or would it make sense to use the
workaround proposed by the gnu make change notes?
--- mosquitto-2.0.22/config.mk.orig 2025-10-25 18:10:31.443956868 +0000
+++ mosquitto-2.0.22/config.mk 2025-10-25 18:10:57.115884412 +0000
@@ -318,8 +318,12 @@
endif
ifeq ($(WITH_ADNS),yes)
- BROKER_LDADD:=$(BROKER_LDADD) -lanl
BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_ADNS
+ HASH := \#
+ NEED_LIBANL := $(shell printf '$(HASH)include <stdlib.h>\n$(HASH)include <netdb.h>\nint main(){return getaddrinfo_a(0, NULL, 0, NULL);}'| $(CC) -D_GNU_SOURCE -o /dev/null -x c - 2>/dev/null || echo YES)
+ ifeq ($(NEED_LIBANL),YES)
+ BROKER_LDADD:=$(BROKER_LDADD) -lanl
+ endif
endif
ifeq ($(WITH_CONTROL),yes)
I also did a quick grep through the various makefiles and config.mk in the
other packages and do not see any problematic uses of # in make functions.
busybox explicitly handles it by defining C:=\# in Makefile.flags to avoid
older gmake problems.
--
Trammell
More information about the buildroot
mailing list