Subject: bug#79213: closed (Re: [bug-diffutils] bug#79213: Issue compiling diffutils-3.12 during LFS cross-compilation (help2man error))

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 11 Aug 2025 16:22:03 +0000

Your bug report

#79213: Issue compiling diffutils-3.12 during LFS cross-compilation (help2man error)

which was filed against the diffutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
79213: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79213
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug-diffutils] bug#79213: Issue compiling diffutils-3.12 during LFS cross-compilation (help2man error)
From: Paul Eggert <[email-masked]>
To: 吴浩杰 <[email-masked]>
Cc: [email-masked]
Date: Mon, 11 Aug 2025 09:20:49 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

tags: notabug

On 2025-08-11 02:30, 吴浩杰 wrote:

> ./sdiff: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ./sdiff)
...
> Do you have any suggestions on how to resolve this? For example, the error message mentions using the --no-discard-stderr option with help2man. Could you please advise how to properly use this option to bypass or handle the error during the build process?
> 
> Alternatively, is there a recommended way to skip generating the manual pages during build when running in this kind of cross-compilation environment?

This has nothing to do with help2man, and bypassing manual page 
generation won't help, as you have built executables that don't run.

To fix the problem, build on a system compatible with your runtime 
environment. It is typically OK to build on one version and then run on 
a later version, as great efforts are made to support backward 
compatibility. The reverse (which is what you are trying to do) often 
does not work.

Subject: Issue compiling diffutils-3.12 during LFS cross-compilation (help2man error)
From: 吴浩杰 <[email-masked]>
To: [email-masked]
Date: Sun, 10 Aug 2025 18:14:17 +0800 (CST)
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear diffutils developers,
I am currently building Linux From Scratch and cross-compiling temporary tools. When compiling diffutils-3.12 with the following script:
./configure --prefix=/usr \
            --host=$LFS_TGT \
            gl_cv_func_strcasecmp_works=y \
            --build=$(./build-aux/config.guess) \
&& make -j$(nproc) \
&& make DESTDIR=$LFS install

I encounter these errors during make:

help2man: can't get `--help' info from sdiff
Try `--no-discard-stderr' if option outputs to stderr
help2man: can't get `--help' info from cmp
Try `--no-discard-stderr' if option outputs to stderr
help2man: can't get `--help' info from diff
Try `--no-discard-stderr' if option outputs to stderr
make[1]: *** [Makefile:2574: sdiff.1] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2574: cmp.1] Error 1
make[1]: *** [Makefile:2574: diff.1] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/diffutils-3.12/man'
make: *** [Makefile:2437: all-recursive] Error 1

My host system is Ubuntu 22.04 with gcc 11.4.0. According to the Linux From Scratch book, this problem should not occur, so I am unsure why it happens on my system.

I have tried several methods to bypass or fix this issue, including:

make HELP2MAN=: or make HELP2MAN=true 

Running make with HELP2MAN="help2man --no-discard-stderr"

Exporting HELP2MAN=: or make HELP2MAN=true  shell environment

None of these attempts resolved the problem.

Could you please advise:

Why this problem might be occurring in my environment?

What is the recommended way to bypass or fix the help2man step during the build?

Thank you very much for your time and assistance.

Best regards,