Re: error by compiling

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260221025423.675yjqbwphaaoe4d@illithid>
Hi Bjarni,

At 2026-02-20T21:28:08+0000, Bjarni Ingi Gislason wrote:
> After cloning groff
> 
> commit ed68a4670c002a07cbaeba9e27d1ac2925449bf7 (HEAD
> -> master, tag: 1.24.0.rc4, origin/master, origin/HEAD)
> Author: G. Branden Robinson <[email protected]>
> Date:   Fri Feb 20 12:01:27 2026 -0600
> 
> , bootlogging and configuring (in directory build) with
> 
> GNU roff version 1.24.0.rc4 configuration summary
> ----------------------------------------------------------------------
>  installation directory prefix    : /usr/local
>  C++ compiler and options         : /usr/bin/g++-15 -Walloc-zero -Walloca
> -Wall -Wextra -Wformat=2 -Wattribute-warning -Wdate-time -Wformat-security
> -Wfree-nonheap-object -Winit-self -Wparentheses -Wpedantic
> -Wredundant-decls -Wshadow -Wsign-compare -Wstack-protector
> -Wstringop-overflow=4 -Wtype-limits -Wuninitialized -Wunused
> -Wunused-function -Wunused-parameter -Wvla -Wvla-parameter 
> -Wno-format-nonliteral  -fdiagnostics-generate-patch -fhardened
> -freport-bug -fsanitize=bool -fsanitize=enum
> -fsanitize=integer-divide-by-zero,shift,null -fsanitize-trap=all
> -fno-omit-frame-pointer -fsanitize=signed-integer-overflow
> -fsanitize=return
> -fsanitize=alignment,object-size,vptr,pointer-overflow -fno-common -ftrapv
> -fvar-tracking-assignments -fsanitize=null -fsanitize=nonnull-attribute
> -fsanitize-address-use-after-scope -ftree-vrp -funsigned-char   -O2 
> -Wmismatched-new-delete -Wdelete-incomplete -Wextra-semi -fcheck-new
> -std=gnu++23 -Woverloaded-virtual -Wc++20-extensions -Wc++23-extensions  
> -DGCC_LINT -DGNULIB_NO_VLA -Dlint
>  use libgroff's memory allocator  : no
>  C compiler and options           : /usr/bin/gcc-15 -Walloc-zero -Walloca
> -Wall -Wextra -Wformat=2 -Wattribute-warning -Wdate-time -Wformat-security
> -Wfree-nonheap-object -Winit-self -Wparentheses -Wpedantic
> -Wredundant-decls -Wshadow -Wsign-compare -Wstack-protector
> -Wstringop-overflow=4 -Wtype-limits -Wuninitialized -Wunused
> -Wunused-function -Wunused-parameter -Wvla -Wvla-parameter 
> -Wno-format-nonliteral  -fdiagnostics-generate-patch -fhardened
> -freport-bug -fsanitize=bool -fsanitize=enum
> -fsanitize=integer-divide-by-zero,shift,null -fsanitize-trap=all
> -fno-omit-frame-pointer -fsanitize=signed-integer-overflow
> -fsanitize=return
> -fsanitize=alignment,object-size,vptr,pointer-overflow -fno-common -ftrapv
> -fvar-tracking-assignments -fsanitize=null -fsanitize=nonnull-attribute
> -fsanitize-address-use-after-scope -ftree-vrp -funsigned-char   -O2  
> -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes
> -Wnested-externs -Wold-style-definition -Wstrict-prototypes 
> -Wold-style-declaration  -std=gnu23 -Wflex-array-member-not-at-end
> -fharden-control-flow-redundancy -Wreturn-mismatch
> -Wincompatible-pointer-types   -DGCC_LINT -DGNULIB_NO_VLA -Dlint
>  Perl interpreter version         : 5.40.1
>  Ghostscript command              : gs
>  URW fonts directory              : /usr/share/fonts/type1/urw-base35/
>  gropdf service level             : full
>  X11 support                      : enabled
>  X11 app defaults directory       : /usr/local/lib/X11/app-defaults
>  default paper format             : A4
>  'groff -l' uses print spooler    : no
>  preconv can use uchardet library : yes
>  can build groff.{info,html,txt}  : yes
>  can build groff.{dvi,pdf}        : yes
> ----------------------------------------------------------------------
> configure: Default X11 application defaults directory assumed.
> 
>   The application defaults files for gxditview (GXditview and
>   GXditview-color) will be installed in the following directory.
> 
>     /usr/local/lib/X11/app-defaults
> 
> -.-
> 
> Error message:
> 
>   GROFF    doc/webpage.html
> pre-grohtml: fatal error: 'pre-grohtml' exited with status 4; re-run with a
> different output driver to see diagnostic messages

I can't account for this.  No logic in pre-grohtml explicitly exits with
status 4 under any cirumstances.

There is a curious wrapper macro and function in
"src/preproc/html/pushback.cpp":

    48  #   define ERROR(X)   (void)(fprintf(stderr, "%s:%d error %s\n", __FILE__, __LINE__, X) && \
    49                              (fflush(stderr)) && localexit(1))
...
    96  /*
    97   *  localexit - wraps exit with a return code to aid the ERROR macro.
    98   */
    99
   100  int localexit (int i)
   101  {
   102    exit(i);
   103    return( 1 );
   104  }

For one thing, line 103 should be unreachable.

But I suppose this doesn't account for the problem either, because the
only caller of "localexit" is shown above (the function could have been
declared `static`); the function is only ever passed the value "1".

Unless more people can reproduce this, perhaps with compiler options
that less closely resemble Cyril Figgis laying down suppressing fire,[1]
I don't regard your report as gating the groff 1.24.0 release.

Regards,
Branden

[1] Nevertehless I just did a "paranoid" build as follows, which
    requires a high-capacity magazine, and can't reproduce the problem.

...
GNU roff version 1.24.0.rc4.8-765892 configuration summary
----------------------------------------------------------------------
 installation directory prefix    : /home/branden/groff-HEAD
 C++ compiler and options         : g++ -g -O2 
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2 
 Perl interpreter version         : 5.32.1
 Ghostscript command              : gs
 URW fonts directory              : /usr/share/fonts/type1/urw-base35/
 gropdf service level             : full
 X11 support                      : enabled
 X11 app defaults directory       : /home/branden/groff-HEAD/lib/X11/app-defaults
 default paper format             : letter
 'groff -l' uses print spooler    : lpr
 preconv can use uchardet library : yes
 can build groff.{info,html,txt}  : yes
 can build groff.{dvi,pdf}        : yes
----------------------------------------------------------------------
configure: Buggy version of Ghostscript detected.

  Ghostscript versions 9.00 <= x < 9.54 suffer from a rendering glitch
  that affects the AT&T troff (and groff) special character '\(lh'; see
  <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.  If your
  version of Ghostscript has not been patched to fix this problem, you
  may need to work around it in groff documents you render for the
  PostScript (and, for tbl(1) tables, HTML) output devices.
  
+ export CFLAGS CXXFLAGS
+ echo CFLAGS=-flto=auto -fcf-protection -fno-common -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -fstack-protector-strong -fstack-clash-protection -ftrapv -funsigned-char -fvar-tracking-assignments -Wall -Wbuiltin-declaration-mismatch -Wextra -Werror -Wformat=2 -Wformat-overflow -Walloc-zero -Wanalyzer-file-leak -Werror=format-security -Werror=return-type -Wredundant-decls -Wsign-compare -Wstringop-overflow=4 -Wshadow -Wunused -Wunused-parameter -O0 -Og -ggdb -D_FORTIFY_SOURCE=2 -Wdiscarded-qualifiers -Wenum-conversion -Wincompatible-pointer-types -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wstrict-prototypes -std=c99
CFLAGS=-flto=auto -fcf-protection -fno-common -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -fstack-protector-strong -fstack-clash-protection -ftrapv -funsigned-char -fvar-tracking-assignments -Wall -Wbuiltin-declaration-mismatch -Wextra -Werror -Wformat=2 -Wformat-overflow -Walloc-zero -Wanalyzer-file-leak -Werror=format-security -Werror=return-type -Wredundant-decls -Wsign-compare -Wstringop-overflow=4 -Wshadow -Wunused -Wunused-parameter -O0 -Og -ggdb -D_FORTIFY_SOURCE=2 -Wdiscarded-qualifiers -Wenum-conversion -Wincompatible-pointer-types -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wstrict-prototypes -std=c99
+ echo CXXFLAGS=-flto=auto -fcf-protection -fno-common -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -fstack-protector-strong -fstack-clash-protection -ftrapv -funsigned-char -fvar-tracking-assignments -Wall -Wbuiltin-declaration-mismatch -Wextra -Werror -Wformat=2 -Wformat-overflow -Walloc-zero -Wanalyzer-file-leak -Werror=format-security -Werror=return-type -Wredundant-decls -Wsign-compare -Wstringop-overflow=4 -Wshadow -Wunused -Wunused-parameter -O0 -Og -ggdb -D_FORTIFY_SOURCE=2 -fcheck-new -std=c++98 -pedantic -pedantic-errors -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1
CXXFLAGS=-flto=auto -fcf-protection -fno-common -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -fstack-protector-strong -fstack-clash-protection -ftrapv -funsigned-char -fvar-tracking-assignments -Wall -Wbuiltin-declaration-mismatch -Wextra -Werror -Wformat=2 -Wformat-overflow -Walloc-zero -Wanalyzer-file-leak -Werror=format-security -Werror=return-type -Wredundant-decls -Wsign-compare -Wstringop-overflow=4 -Wshadow -Wunused -Wunused-parameter -O0 -Og -ggdb -D_FORTIFY_SOURCE=2 -fcheck-new -std=c++98 -pedantic -pedantic-errors -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1
+ make -j10 check
...
============================================================================
Testsuite summary for GNU roff 1.24.0.rc4.8-765892
============================================================================
# TOTAL: 314
# PASS:  309
# SKIP:  0
# XFAIL: 5
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
...
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmmZHlgACgkQ0Z6cfXEm
bc4iNA//bM+NslOduILVueKrm/IGV6PhdMLZHe5dJKYybU6joaVMQEeeXF8ZHhDy
vBj86xiMkKXD68nkRgCpmv3WEf4wm3sgVot4vSJiS89BWTp9JIMvHeXRYVxsyNeF
i2bxhb1LKSX0rnSGGyLG8JmVQ11X5xJqVzCb9o5/MNiw05flzz4+FmtmdwiDdFpR
Kdb7sWOvn85QjYe1TjtN9qcqIVYzE7Uu1pek4LkfUypDoD0+17grqrXIFmCsvzb7
T4HmCH2yaQoqUDPLMwfU63I2/tlFnfLwmF3Fnd49+NbwjW46zsubFu504kQYtd5Q
8UXsVb1oTtfiRJ79cZm8YMcslyvpBHlqgHvpYX3HexbcqCh5N1OaEqjX9faOz7Yp
NZUJxhIJaZlTYdm9Bd2bFWNBTHXYihvvVKaKmpAijrIDCZgaVEZ2DDwJyJP3pJFZ
WOi5tGa0+FRmUZF0UhuphH6keB6Q9t2BgQ667ReyOniFvgQSSnSnwdeDAdRtyQNX
ouuooClAhCN6kS060FOFi22T5SqNsw5k51Y1LmnklvcW1/Lh/0aoJUXi+Y4arbAD
0cCojdiEAWfC4jm8yMEG0rL93rDPwgf26/2Zje6UFNHOehvGPGXIxFSnEfTmyOiq
Ykksr9+7hwSDtQYUrvn6Bd+jsbuJ6npGYdk8D4avW1ZsrzOnsKE=
=ky2T
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.