skvadrik / re2c

Lexer generator for C, C++, D, Go, Haskell, Java, JS, OCaml, Python, Rust, V and Zig.
https://re2c.org
Other
1.11k stars 174 forks source link

[4.0] build failure with --enable-docs #503

Closed jcfp closed 4 days ago

jcfp commented 5 days ago

The release tarball only has api2_{c,go,rust}.rst in doc/manual/basics/api/ but not the ones for all newly supported languages, which causes the build to fail if instructed to regenerate the manpages. The git repo does have the missing files, and building the docs using the github "full repo" source tar.gz works as expected.

To reproduce, try building off the release tarball with ./configure --enable-docs. Tail of the build log:

g++ -DHAVE_CONFIG_H -I.   -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++11  -W  -Wall  -Wextra  -Weffc++  -pedantic  -Wformat=2  -Wredundant-decls  -Wsuggest-attribute=format  -Wconversion  -Wsign-conversion  -Wold-style-cast  -Werror=return-type  -O2  -DRE2C_STDLIB_DIR='"/usr/share/re2c/stdlib/"'  -DRE2C_LANG=Lang::ZIG -DRE2C_PROG=\"re2zig\" -g -O2 -ffile-prefix-map=/build/re2c-4.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o src/msg/re2zig-help_re2zig.o `test -f 'src/msg/help_re2zig.cc' || echo './'`src/msg/help_re2zig.cc
/usr/bin/mkdir -p doc
/usr/bin/python3 ./build/split_man.py ./doc/re2c.rst ./doc/re2c.rst \
    && /usr/bin/python3 ./build/rst2man.py --tab-width=4 ./doc/re2c.rst > doc/re2c.1 \
    && cp doc/re2c.1 ./bootstrap/doc/re2c.1
/usr/bin/mkdir -p doc
/usr/bin/python3 ./build/split_man.py ./doc/re2d.rst ./doc/re2d.rst \
    && /usr/bin/python3 ./build/rst2man.py --tab-width=4 ./doc/re2d.rst > doc/re2d.1 \
    && cp doc/re2d.1 ./bootstrap/doc/re2d.1
/usr/bin/mkdir -p doc
/usr/bin/python3 ./build/split_man.py ./doc/re2go.rst ./doc/re2go.rst \
    && /usr/bin/python3 ./build/rst2man.py --tab-width=4 ./doc/re2go.rst > doc/re2go.1 \
    && cp doc/re2go.1 ./bootstrap/doc/re2go.1
./doc/re2d.rst:62: (SEVERE/4) Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'doc/manual/basics/api/api2_d.rst_'.
Exiting due to level-4 (SEVERE) system message.
make[3]: *** [Makefile:21066: doc/re2d.1] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/build/re2c-4.0'
make[2]: *** [Makefile:18489: all-recursive] Error 1
make[2]: Leaving directory '/build/re2c-4.0'
make[1]: *** [Makefile:3892: all] Error 2
make[1]: Leaving directory '/build/re2c-4.0'
skvadrik commented 5 days ago

Thanks @jcfp ! Here's a fix: https://github.com/skvadrik/re2c/commit/a1c42047daac4d26befae7b129eaa10ff307c834 (it also makes sure it won't break in the same way next time).

skvadrik commented 5 days ago

I will release 4.0.1 in a few days with this fix and a few more minor things.