Fossil User Forum

make --shuffle=reverse error
Login

make --shuffle=reverse error

make --shuffle=reverse error

(1.1) By Barak A. Pearlmutter (barak_pearlmutter) on 2025-05-13 21:45:42 edited from 1.0 [source]

Debian is systematically trying to shake out missing dependencies in Makefiles by rebuilding everything with make --shuffle=reverse. In the case of fossil 2.25 this results in

cc -I. -I./src -I./extsrc -Ibld -Wall -Wdeclaration-after-statement -DFOSSIL_ENABLE_JSON -DFOSSIL_ENABLE_TH1_DOCS -DFOSSIL_ENABLE_TH1_HOOKS -DFOSSIL_DYNAMIC_BUILD=1 -I/build/reproducible-path/fossil-2.25/compat/tcl-8.6/generic -DFOSSIL_HAVE_FUSEFS -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/fossil-2.25=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -I/build/reproducible-path/fossil-2.25/compat/tcl-8.6/generic -DHAVE_AUTOCONFIG_H  -c ./src/th_lang.c -o bld/th_lang.o
/usr/bin/ld: cannot open output file bld/mkversion: No such file or directory
collect2: error: ld returned 1 exit status

Details and discussion at DBS#1105310 which includes a pointer to a complete build log.

(2) By Bo Lindbergh (_blgl_) on 2025-05-14 03:21:38 in reply to 1.1 [link] [source]

A bit tedious to analyse, but src/main.mk doesn't need that many changes.

Add explicit dependencies on $(OBJDIR) to these targets:

$(OBJDIR)/translate
$(OBJDIR)/makeheaders
$(OBJDIR)/mkindex
$(OBJDIR)/mkbuiltin
$(OBJDIR)/mkversion
$(OBJDIR)/codecheck1
$(OBJDIR)/shell.o
$(OBJDIR)/linenoise.o
$(OBJDIR)/th.o
$(OBJDIR)/th_lang.o
$(OBJDIR)/th_tcl.o
$(OBJDIR)/pikchr.o
$(OBJDIR)/cson_amalgamation.o

Remove no-longer-needed explicit dependencies on $(OBJDIR) from these targets:

all
test

Remove no-longer-needed -mkdir -p $(OBJDIR) command from the $(OBJDIR)/translate target.

All the translated source files already depend on $(OBJDIR)/translate, so no change needed there.

(3) By Richard Hipp (drh) on 2025-05-14 09:52:45 in reply to 2 [link] [source]

Add explicit dependencies on $(OBJDIR) to these targets:

Is that right? Because then whenever a new file is added to $(OBJDIR), the mtime of that directory will change and require all of those targets to be rebuilt, no?

(4) By Stephan Beal (stephan) on 2025-05-14 10:43:39 in reply to 1.1 [link] [source]

cc -I. -I./src -I./extsrc -Ibld -Wall -Wdeclaration-after-statement -DFOSSIL_ENABLE_JSON -DFOSSIL_ENABLE_TH1_DOCS

Unrelated: is there a particular reason that build is done with --json and --enable-th1-docs? Neither of those are enabled in the canonical releases and the latter is considered an "iffy" feature which we'd prefer that people willfully activate if they insist on using it (all the while recommending that they don't).