[please keep the groff list CCed]

Hi folks,

While compiling groff recently I had a failure.

  YACC     src/preproc/pic/pic.cpp
/.../src/GIT/groff/build/../src/preproc/pic/pic.ypp:93.1-7: warning: POSIX Yacc 
does not support %expect [-Wyacc]
   93 | %expect 2
      | ^~~~~~~
/.../src/GIT/groff/build/../src/preproc/pic/pic.ypp:1456.11-1461.17: warning: 
rule useless in parser due to conflicts [-Wother]
 1456 |         | ORDINAL LAST object_type relative_path
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
updating src/preproc/pic/pic.output
mv: cannot move 'tmp-pic.output' to '../src/preproc/pic/pic.output': No such 
file or directory
../build-aux/ylwrap: line 206: ../src/preproc/pic/pic.cpp: No such file or 
directory
updating src/preproc/pic/pic.hpp
mv: cannot move 'tmp-pic.hpp' to '../src/preproc/pic/pic.hpp': No such file or 
directory
make[2]: *** [Makefile:11822: src/preproc/pic/pic.cpp] Error 1
make[2]: Leaving directory '/.../src/GIT/groff/build'
make[1]: *** [Makefile:13256: check-recursive] Error 1
make[1]: Leaving directory '/.../src/GIT/groff/build'
make: *** [Makefile:15773: check] Error 2

This looked shockingly like another problem that just came up recently.

https://savannah.gnu.org/bugs/?67754

I checked to see if the build/src/preproc/pic directory existed in my
build tree, and sure enough it didn't.  (I've made one of my build
scripts use `--disable-dependency-tracking` to smoke out this sort of
problem.)

Applying the following "conceptual" patch to "build-aux/ylwrap" resolved
the problem.

$ diff -u build-aux/ylwrap{.old,}
--- build-aux/ylwrap.old        2025-12-08 02:43:03.133977418 -0600
+++ build-aux/ylwrap    2025-12-08 02:39:46.346813071 -0600
@@ -216,6 +216,11 @@
           rm -f "$target"
         else
           echo "updating $to"
+          if ! test -d "${realtarget%/*}"
+          then
+            echo "GBR: creating ${realtarget%/*}" >&2
+            mkdir -p  ${realtarget%/*}
+          fi
           mv -f "$target" "$realtarget"
         fi
       fi

Trying "make" again with the patch applied got a satisfactory outcome.

make[2]: Entering directory '/.../src/GIT/groff/build'
  YACC     src/preproc/pic/pic.cpp
/.../src/GIT/groff/build/../src/preproc/pic/pic.ypp:93.1-7: warning: POSIX Yacc 
does not support %expect [-Wyacc]
   93 | %expect 2
      | ^~~~~~~
/.../src/GIT/groff/build/../src/preproc/pic/pic.ypp:1456.11-1461.17: warning: 
rule useless in parser due to conflicts [-Wother]
 1456 |         | ORDINAL LAST object_type relative_path
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
updating src/preproc/pic/pic.output
GBR: creating ../src/preproc/pic
updating src/preproc/pic/pic.hpp
  CXX      src/preproc/pic/pic-pic.o

I hope this is enough info for someone with more expertise to craft a
more proper patch.  (I don't know to access a thread-safe mkdir(1),
detected by Autoconf, from the "ylwrap" script.)

I furthermore have a question: how do I patch "build-aux/ylwrap" in situ
so that I can hobble along until gnulib has an official fix?

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

  • ylwrap needs a &qu... G. Branden Robinson

Reply via email to