* [Buildroot] package/mosquitto patch problem with gmake < 4.3
@ 2025-10-24 18:10 Trammell Hudson via buildroot
2025-10-25 18:32 ` Trammell Hudson via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Trammell Hudson via buildroot @ 2025-10-24 18:10 UTC (permalink / raw)
To: Buildroot
The 0002-Add-configure-time-check-for-lanl.patch for package/mosquitto seems
to have a compilation problem with older make, such as 4.2.1. The handling
of # characters in function calls or strings changed in 4.3 to no longer
be treated as make end of line comments.
https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html
* WARNING: Backward-incompatibility! Number signs (#) appearing inside a macro reference or function invocation no longer introduce comments and should not be escaped with backslashes: thus a call such as: foo := $(shell echo '#') is legal. Previously the number sign needed to be escaped, for example: foo := $(shell echo '\#') Now this latter will resolve to "\#". If you want to write makefiles portable to both versions, assign the number sign to a variable: H := \# foo := $(shell echo '$H') This was claimed to be fixed in 3.81, but wasn't, for some reason. To detect this change search for 'nocomment' in the .FEATURES variable.
The error occurs when building mosquitto with an older make.
>>> mosquitto 2.0.22 Building
[...]config.mk:322: *** unterminated call to function 'shell': missing ')'. Stop.
make[1]: *** [package/pkg-generic.mk:273: /data/scratch/build/shairport-pi/buildroot/output/build/mosquitto-2.0.22/.stamp_built] Error 2
The test is:
NEED_LIBANL := $(shell printf '#include <stdlib.h>\n#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)
Is there a minimum make version required? And if so should the top level
build check for it?
--
Trammell Hudson
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] package/mosquitto patch problem with gmake < 4.3
2025-10-24 18:10 [Buildroot] package/mosquitto patch problem with gmake < 4.3 Trammell Hudson via buildroot
@ 2025-10-25 18:32 ` Trammell Hudson via buildroot
2025-12-12 6:58 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Trammell Hudson via buildroot @ 2025-10-25 18:32 UTC (permalink / raw)
To: buildroot
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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] package/mosquitto patch problem with gmake < 4.3
2025-10-25 18:32 ` Trammell Hudson via buildroot
@ 2025-12-12 6:58 ` Peter Korsgaard
0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2025-12-12 6:58 UTC (permalink / raw)
To: Trammell Hudson via buildroot, titouan.christophe; +Cc: Trammell Hudson
>>>>> "Trammell" == Trammell Hudson via buildroot <buildroot@buildroot.org> writes:
Hi,
Sorry for the slow response.
> 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
Ahh yes, as explained in the pull request there is an implementation of
that in the fixes branch that we should just cherry pick and replace
this patch:
https://github.com/eclipse-mosquitto/mosquitto/pull/3358
Care to give that a test and send a patch doing that to the Buildroot
list?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-12 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 18:10 [Buildroot] package/mosquitto patch problem with gmake < 4.3 Trammell Hudson via buildroot
2025-10-25 18:32 ` Trammell Hudson via buildroot
2025-12-12 6:58 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.