On Wed, Jan 14, 2026 at 10:36:53PM +0100, Bruno Haible wrote: > Eric Blake wrote: > > When updating m4 branch-1.6 to the latest gnulib (last done in May > > 2025, so before this patch), I'm now hitting: > > > > /usr/bin/ld: builtin.o: in function `m4_maketemp': > > /home/eblake/m4-1.6/src/builtin.c:1625:(.text+0x4128): undefined reference > > to `rpl_obstack_printf' > > /usr/bin/ld: /home/eblake/m4-1.6/src/builtin.c:1636:(.text+0x4415): > > undefined reference to `rpl_obstack_printf' > > /usr/bin/ld: debug.o: in function `trace_header': > > /home/eblake/m4-1.6/src/debug.c:327:(.text+0x1042): undefined reference to > > `rpl_obstack_printf' > > /usr/bin/ld: /home/eblake/m4-1.6/src/debug.c:329:(.text+0x1069): undefined > > reference to `rpl_obstack_printf' > > /usr/bin/ld: /home/eblake/m4-1.6/src/debug.c:330:(.text+0x1085): undefined > > reference to `rpl_obstack_printf' > > /usr/bin/ld: debug.o:/home/eblake/m4-1.6/src/debug.c:332: more undefined > > references to `rpl_obstack_printf' follow > > After creating a new, fresh checkout directory for the m4 branch-1.6 branch, > running 'bootstrap' there, and configuring anew, I don't reproduce this error. > > I conclude that the problem was caused by switching between branch-1.4 and > branch-1.6, and some leftover file(s). > > Although ideally, with a good build system, this shouldn't happen, it's > hard to tell the cause...
I finally figured out a workaround: after moving away from m4/gnulib-cache.m4 and sticking gnulib_modules= directly in bootstrap.conf, I still got the error while importing just obstack-printf-posix, but it went away once I also added obstack-printf to the list of modules to include. Which may mean that obstack-printf-posix should be depending on obtack-printf module so I don't have to list both by hand, but at least now I have the branch compiling again, and can focus on getting m4 1.4.21 out the door. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org
