Dear m4 developers,
I am currently building Linux From Scratch and trying to cross-compile
temporary tools. When compiling m4-1.4.20 with the following script:
./configure --prefix=/usr \
--host=$LFS_TGT \
--build=$(./build-aux/config.guess) \
&& make -j$(nproc) \
&& make DESTDIR=$LFS install
I encounter this error during the make step:
make[2]: Entering directory '/mnt/lfs/sources/m4-1.4.20/doc'
Updating man page m4.1
help2man: can't get `--help' info from ../src/m4
Try `--no-discard-stderr' if option outputs to stderr
make[2]: *** [Makefile:2960: m4.1] Error 2
According to the Linux From Scratch book, this problem should not occur, so I
am unsure why it happens on my system. My host system is Ubuntu 22.04 with gcc
11.4.0.
Since I am only building temporary tools for cross-compilation, I would like to
skip the help2man step entirely.
I tried:
Running make help2man=: after make
Adding --no-discard-stderr via:
sed -i '/\$(HELP2MAN)/ s/$(HELP2MAN)/$(HELP2MAN) --no-discard-stderr/'
doc/Makefile.am
However, these attempts did not resolve the issue.
Could you please advise:
Why this problem might be occurring on my system (is it related to the host
environment?), and
How to either bypass the help2man step during the build, or correctly add
--no-discard-stderr so the build completes successfully.
Thank you very much for your time and help.
Best regards,