Re: git: 1ef992fe22f7 - main - www/quark: Update to 20220816
Date: Fri, 18 Jul 2025 05:52:51 UTC
On Fri, Jul 18, 2025 at 07:20:22AM +0200, Zsolt Udvari wrote:
> Hello Alexey,
>
> The problem was while building: the BUFFER_SIZE was undefined - only
> sometimes! It's defined in project's config.h which is created by
> Makefile with simple copy of config.def.h.
> The config.h is dependency of every *.o and quark binary (declared in Makefile)
Ah, so this is suckless project, no wonder! Despite loud branding, their
code quality is pretty bad. In this case they forgot to specify queue.o's
dependencies -- easy to miss when done by hand.
Consider the following patch ("sleep 5" hunk should be removed upon commit
as I've left it there only to demonstrate the bug).
@@ -12,6 +12,7 @@ connection.o: connection.c config.h connection.h data.
data.o: data.c config.h data.h http.h server.h util.h config.mk
http.o: http.c config.h http.h server.h util.h config.mk
main.o: main.c arg.h config.h server.h sock.h util.h config.mk
+queue.o: queue.c config.h queue.h util.h
server.o: server.c config.h connection.h http.h queue.h server.h util.h
config.mk
sock.o: sock.c config.h sock.h util.h config.mk
util.o: util.c config.h util.h config.mk
@@ -20,7 +21,7 @@ quark: config.h $(COMPONENTS:=.o) $(COMPONENTS:=.h) ma
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(COMPONENTS:=.o) main.o
$(LDFLAGS)
config.h:
- cp config.def.h $@
+ sleep 5 ; cp config.def.h $@
clean:
rm -f quark main.o $(COMPONENTS:=.o)
./danfe