Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912422 - sys-apps/help2man-1.49.3::gentoo_prefix failed (configure phase) bootstrap-prefix.sh stage3 fails
Summary: sys-apps/help2man-1.49.3::gentoo_prefix failed (configure phase) bootstrap-pr...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-17 20:11 UTC by Yadi Xiao
Modified: 2023-09-11 15:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
stage3 log part 1 when running bootstrap-prefix.sh (stage3_part1.log.xz,991.89 KB, application/x-xz)
2023-08-17 20:31 UTC, Yadi Xiao
Details
stage3 log part 2 when running bootstrap-prefix.sh (stage3_part2.log.xz,960.02 KB, application/x-xz)
2023-08-17 20:33 UTC, Yadi Xiao
Details
config.log for help2man-1.49.3 (config.log,11.91 KB, text/plain)
2023-08-23 18:42 UTC, Yadi Xiao
Details
build log for help2man-1.49.3 (build.log,3.54 KB, application/octet-stream)
2023-08-23 18:43 UTC, Yadi Xiao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yadi Xiao 2023-08-17 20:11:21 UTC
I received the error: “configure: error: perl module Locale::gettext required.” while bootstrapping stage 3. sys-apps/help2man appears to require dev-perl/Locale-gettext even with USE=-nls set.
Comment 1 Yadi Xiao 2023-08-17 20:31:02 UTC
Created attachment 868093 [details]
stage3 log part 1 when running bootstrap-prefix.sh
Comment 2 Yadi Xiao 2023-08-17 20:33:24 UTC
Created attachment 868094 [details]
stage3 log part 2 when running bootstrap-prefix.sh
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-18 07:06:00 UTC
(In reply to Yadi Xiao from comment #0)
> I received the error: “configure: error: perl module Locale::gettext
> required.” while bootstrapping stage 3. sys-apps/help2man appears to require
> dev-perl/Locale-gettext even with USE=-nls set.

but USE=nls is set here:
"""
./configure --prefix=/dev/shm/gentoo/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/dev/shm/gentoo/usr/share/man --infodir=/dev/shm/gentoo/usr/share/info --datadir=/dev/shm/gentoo/usr/share --sysconfdir=/dev/shm/gentoo/etc --localstatedir=/dev/shm/gentoo/var/lib --datarootdir=/dev/shm/gentoo/usr/share --docdir=/dev/shm/gentoo/usr/share/doc/help2man-1.49.3 --htmldir=/dev/shm/gentoo/usr/share/doc/help2man-1.49.3/html --libdir=/dev/shm/gentoo/usr/lib ac_cv_path_MSGFMT=/dev/shm/gentoo/usr/bin/false --enable-nls
"""

Note the --enable-nls.
Comment 4 Mitchell Dorrell 2023-08-18 17:13:06 UTC
Oops! Part of this misunderstanding is my fault. I failed to notice that the huge log file shows help2man being emerged three times. The first two emerges happen with USE=-nls, but you're right, the last emerge happens with nls enabled.

... and also, it clearly shows that dev-perl/Locale-gettext is emerged before help2man that third time, as well. There's still something weird happening, though. Any ideas why help2man can't find Locale-gettext?
Comment 5 Yadi Xiao 2023-08-23 18:42:55 UTC
Created attachment 868527 [details]
config.log for help2man-1.49.3

gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work/help2man-1.49.3/config.log
Comment 6 Yadi Xiao 2023-08-23 18:43:34 UTC
Created attachment 868528 [details]
build log for help2man-1.49.3

gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/temp/build.log
Comment 7 Yadi Xiao 2023-08-23 19:04:12 UTC
(In reply to Sam James from comment #3)
> (In reply to Yadi Xiao from comment #0)
> > I received the error: “configure: error: perl module Locale::gettext
> > required.” while bootstrapping stage 3. sys-apps/help2man appears to require
> > dev-perl/Locale-gettext even with USE=-nls set.
> 
> but USE=nls is set here:
> """
> ./configure --prefix=/dev/shm/gentoo/usr --build=x86_64-pc-linux-gnu
> --host=x86_64-pc-linux-gnu --mandir=/dev/shm/gentoo/usr/share/man
> --infodir=/dev/shm/gentoo/usr/share/info --datadir=/dev/shm/gentoo/usr/share
> --sysconfdir=/dev/shm/gentoo/etc --localstatedir=/dev/shm/gentoo/var/lib
> --datarootdir=/dev/shm/gentoo/usr/share
> --docdir=/dev/shm/gentoo/usr/share/doc/help2man-1.49.3
> --htmldir=/dev/shm/gentoo/usr/share/doc/help2man-1.49.3/html
> --libdir=/dev/shm/gentoo/usr/lib
> ac_cv_path_MSGFMT=/dev/shm/gentoo/usr/bin/false --enable-nls
> """
> 
> Note the --enable-nls.

Thank you for clarifying!
I tried running the script in both interactive mode and only stage 3, but I got the same error.
I found this kind of error has been occurring for a long time and some people solved it by manually unmerge dev-perl/Locale-gettext and sys-apps/help2man, then emerge sys-apps/help2man again. (https://bugs.gentoo.org/432682, https://forums.gentoo.org/viewtopic-t-313901-highlight-help2man.html)
Is it possible to solve this error for bootstrapping using the same way?

I have copied the log related to help2man below:

"""
>>> Emerging (94 of 128) sys-apps/help2man-1.49.3::gentoo_prefix
 * help2man-1.49.3.tar.xz BLAKE2B SHA512 size ;-) ...                    [ ok ]
>>> Unpacking source...
>>> Unpacking help2man-1.49.3.tar.xz to /dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work
>>> Source unpacked in /dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work
>>> Preparing source in /dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work/help2man-1.49.3 ...
 * Applying help2man-1.46.1-linguas.patch ...
patching file Makefile.in
Hunk #2 succeeded at 87 with fuzz 2.
Hunk #3 succeeded at 96 with fuzz 2.
Hunk #4 succeeded at 160 (offset 2 lines).
Hunk #5 succeeded at 170 (offset 2 lines).
Hunk #6 succeeded at 192 with fuzz 2 (offset 1 line).
 [ ok ]
>>> Source prepared.
>>> Configuring source in /dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work/help2man-1.49.3 ...
./configure --prefix=/dev/shm/gentoo/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/dev/shm/gentoo/usr/share/man --infodir=/dev/shm/gentoo/usr/share/info --datadir=/dev/shm/gentoo/usr/share --sysconfdir=/dev/shm/gentoo/etc --localstatedir=/dev/shm/gentoo/var/lib --datarootdir=/dev/shm/gentoo/usr/share --docdir=/dev/shm/gentoo/usr/share/doc/help2man-1.49.3 --htmldir=/dev/shm/gentoo/usr/share/doc/help2man-1.49.3/html --libdir=/dev/shm/gentoo/usr/lib ac_cv_path_MSGFMT=/dev/shm/gentoo/usr/bin/false --enable-nls
checking for perl... perl
checking for module Locale::gettext... no
checking for msgfmt... (cached) /dev/shm/gentoo/usr/bin/false
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to enable C11 features... none needed
checking for library containing dlsym... -ldl
checking for library containing bindtextdomain... none required
configure: error: perl module Locale::gettext required

!!! Please attach the following file when seeking support:
!!! /dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work/help2man-1.49.3/config.log
 * ERROR: sys-apps/help2man-1.49.3::gentoo_prefix failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line 136:  Called src_configure
 *             environment, line 623:  Called econf 'ac_cv_path_MSGFMT=/dev/shm/gentoo/usr/bin/false' '--enable-nls'
 *        phase-helpers.sh, line 732:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line 112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/help2man-1.49.3::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/help2man-1.49.3::gentoo_prefix'`.
 * The complete build log is located at '/dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/temp/build.log'.
 * The ebuild environment file is located at '/dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/temp/environment'.
 * Working directory: '/dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work/help2man-1.49.3'
 * S: '/dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/work/help2man-1.49.3'

>>> Failed to emerge sys-apps/help2man-1.49.3, Log file:

>>>  '/dev/shm/gentoo/var/tmp/portage/sys-apps/help2man-1.49.3/temp/build.log'
"""
Comment 8 Yadi Xiao 2023-08-31 15:44:15 UTC
I ran the bootstrap-prefix.sh script in a different EPREFIX and encountered the same error once again. In this case, the EPREFIX I used is /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP.

I tried to figure out why the configure script of help2man is unable to locate the Perl module Locale::gettext. I added "export PERL=/ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/usr/bin/perl" in bootstrap-prefix.sh and ran the bootstrap-prefix.sh script, which should continue to install help2man.

This time help2man found the appropriate Perl, it still couldn't locate the Locale::gettext module. I examined the contents of the help2man configure file. It uses the command "perl -mLocale::gettext -e 1" to verify the existence of the Locale::gettext module. 

While I run it manually , I get this result:
$ /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/usr/bin/perl -mLocale::gettext -e 1
Can't locate Locale/gettext.pm in @INC (you may need to install the Locale::gettext module) (@INC entries checked: /etc/perl /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/tmp/usr/local/lib/perl5/5.38/x86_64-linux /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/tmp/usr/local/lib/perl5/5.38 /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/tmp/usr/lib/perl5/vendor_perl/5.38/x86_64-linux /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/tmp/usr/lib/perl5/vendor_perl/5.38 /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/tmp/usr/lib/perl5/5.38/x86_64-linux /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP/tmp/usr/lib/perl5/5.38).
BEGIN failed--compilation aborted.

It seems that the @INC associated with this Perl interpreter is incorrect.
Comment 9 Fabian Groffen gentoo-dev 2023-09-01 05:33:47 UTC
Ok, thanks, that must mean the perl was built in stage2 and should be therefore rebuilt.  (Or Locale-gettext needs to be emerged in stage2.)
Comment 10 Yadi Xiao 2023-09-01 20:15:25 UTC
(In reply to Fabian Groffen from comment #9)
> Ok, thanks, that must mean the perl was built in stage2 and should be
> therefore rebuilt.  (Or Locale-gettext needs to be emerged in stage2.)

Thanks! I'll try to add emerged Locale-gettext in stage 2 and see if it works. I will update with the outcome.
Comment 11 Yadi Xiao 2023-09-05 14:56:02 UTC
(In reply to Fabian Groffen from comment #9)
> Ok, thanks, that must mean the perl was built in stage2 and should be
> therefore rebuilt.  (Or Locale-gettext needs to be emerged in stage2.)

I added dev-perl/Locale-gettext into the bootstrap_stage2() function:
    # Build a basic compiler and portage dependencies in $ROOT/tmp.
    pkgs=(
        ...
        dev-perl/Locale-gettext
    )
After adding this, I executed the script in a new prefix, but I had the same error as before.

I checked the log file.
During stage2, Locale-gettext was installed at 
    {$EPREFIX}/tmp/usr/lib64/perl5/vendor_perl/Locale/gettext.pm.
Again at stage3, Locale-gettext was installed at
    {$EPREFIX}/usr/lib/perl5/vendor_perl/5.38/x86_64-linux/Locale/gettext.pm.

However, during the configuration of help2man in stage3, the configure log reported:
Can't locate Locale/gettext.pm in @INC (you may need to install the Locale::gettext module) (@INC entries checked: /etc/perl /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP_stage2gettext/tmp/usr/local/lib/perl5/5.38/x86_64-linux /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP_stage2gettext/tmp/usr/local/lib/perl5/5.38 /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP_stage2gettext/tmp/usr/lib/perl5/vendor_perl/5.38/x86_64-linux /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP_stage2gettext/tmp/usr/lib/perl5/vendor_perl/5.38 /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP_stage2gettext/tmp/usr/lib/perl5/5.38/x86_64-linux /ocean/projects/sys890003p/xiaoy/gentoo_64_DISRAP_stage2gettext/tmp/usr/lib/perl5/5.38).

The @INC paths did not seem to include the correct path to Locale/gettext.pm.
Comment 12 Fabian Groffen gentoo-dev 2023-09-10 11:06:33 UTC
DISRAP seems to suggest you disabled RAP support.  If so, please try the latest bootstrap-prefix.sh
Comment 13 Yadi Xiao 2023-09-11 15:17:24 UTC
(In reply to Fabian Groffen from comment #12)
> DISRAP seems to suggest you disabled RAP support.  If so, please try the
> latest bootstrap-prefix.sh

Thank you for pointing that out. I did disable RAP support earlier.
I tried the latest bootstrap-prefix.sh (commit 10296d4b, 2023-09-11 12:37:44 +0200) as you suggested, and encountered an issue. You can find the details of the bug here: https://bugs.gentoo.org/914006.