Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947174 - dev-perl/Locale-gettext: Build fails at configure phase
Summary: dev-perl/Locale-gettext: Build fails at configure phase
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-12-29 16:18 UTC by Colin Gilbert
Modified: 2025-01-19 01:31 UTC (History)
3 users (show)

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


Attachments
emerge --info output (emerge-info.txt,15.79 KB, text/plain)
2024-12-29 19:35 UTC, Colin Gilbert
Details
build.log (build.log,2.80 KB, text/x-log)
2024-12-29 19:36 UTC, Colin Gilbert
Details
Output of emerge --info for gettext (gettext-emerge-info.txt,16.58 KB, text/plain)
2024-12-29 19:48 UTC, Colin Gilbert
Details
emerge --info output for dev-lang/perl (emerge-info-perl.txt,16.62 KB, text/plain)
2024-12-29 20:24 UTC, Colin Gilbert
Details
conftest.c (conftest.c,101 bytes, text/x-csrc)
2024-12-29 20:33 UTC, Alfred Wingate
Details
Patch for using Config::Autoconf (locale-gettext-test.patch,8.21 KB, patch)
2024-12-29 21:28 UTC, Alfred Wingate
Details | Diff
build.log, with patch applied (build.log.with-patch,4.26 KB, application/octet-stream)
2024-12-29 21:38 UTC, Colin Gilbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Gilbert 2024-12-29 16:18:12 UTC
It seems to break because it cannot find gettext from sys-devel/libintl. However, when I try to install libintl its blocked by portage.

It worked fine two days ago. Then I emerge --sync'd and now its broken.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-29 16:19:30 UTC
on glibc systems, libintl comes from glibc.

Anyway, please include the full build.log and emerge --info.
Comment 2 Colin Gilbert 2024-12-29 16:43:34 UTC
Hi Sam, and thank you for your prompt reply.

Bugzilla seems to have incorrectly detected a URL in the output of emerge --info. Since my account is less than 24 hours old, I cannot post it just yet. 

Please keep this issue open and tomorrow morning I'll be posting the full build.log and the output of emerge --info.


Thanks again!
Colin
Comment 3 Alfred Wingate 2024-12-29 18:48:42 UTC
You should be able to send emerge --info as a text file as well. I do that usually as my emerge --info is too long for a comment.
Comment 4 Colin Gilbert 2024-12-29 19:35:26 UTC
Created attachment 915493 [details]
emerge --info output
Comment 5 Colin Gilbert 2024-12-29 19:36:01 UTC
Created attachment 915494 [details]
build.log
Comment 6 Colin Gilbert 2024-12-29 19:37:05 UTC
I have attached the output of emerge --info and the contents of the build.log file to this bug report. I hope this helps.
Comment 7 Alfred Wingate 2024-12-29 19:42:59 UTC
It appears to be other way around. It fails to find gettext normally and then tries to gettext via libintl (and fails as expected). 

Could you share output from emerge --info sys-devel/gettext?
Comment 8 Colin Gilbert 2024-12-29 19:48:41 UTC
Created attachment 915495 [details]
Output of emerge --info for gettext

Here you go!
Comment 9 Alfred Wingate 2024-12-29 19:59:56 UTC
Output from nm -D /lib64/libc.so.6 | grep gettext ?
Comment 10 Colin Gilbert 2024-12-29 20:00:36 UTC
(In reply to Alfred Wingate from comment #9)
> Output from nm -D /lib64/libc.so.6 | grep gettext ?

0000000000035530 T __dcgettext@@GLIBC_2.2.5
0000000000035550 T __dgettext@@GLIBC_2.2.5
0000000000035530 W dcgettext@@GLIBC_2.2.5
0000000000036c40 W dcngettext@@GLIBC_2.2.5
0000000000035550 W dgettext@@GLIBC_2.2.5
0000000000036c60 W dngettext@@GLIBC_2.2.5
0000000000035560 W gettext@@GLIBC_2.2.5
0000000000036c70 W ngettext@@GLIBC_2.2.5
Comment 11 Alfred Wingate 2024-12-29 20:16:57 UTC
So for context.

unless (conftest("char *x = gettext(\"foo\");", "gettext", 0)) {
        # try with -lintl
        $libs = "-lintl";
        unless (conftest("char *x = gettext(\"foo\");", "gettext", 0)) {
                unlink("conftest.c");
                unlink("conftest");
                die "gettext function not found. Please install libintl";
        }
}

First tries to link gettext symbol with no libs (so implicitly libc.so). And it tries to do it with libintl.so (which doesn't exist separately with glibc).

It's a handmade conftest where it tries to compile+link this:
#include <libintl.h>
int main(int argc, char **argv) {
char *x = dcgettext(\"foo\", \"bar\", 0);
return 0; }

Seeing that your libc.so has the symbol it would mean that something is affecting the compile check to break it. dev-lang/perl is known to be sticky with cflags its built with affecting all other perl builds. 

So a emerge --info dev-lang/perl could be useful.

This may be something to look into even if it doesn't fix the issue here.
https://github.com/vandry/Perl-Locale-gettext/pull/3
Comment 12 Alfred Wingate 2024-12-29 20:20:34 UTC
(In reply to Alfred Wingate from comment #11)
> It's a handmade conftest where it tries to compile+link this:
> #include <libintl.h>
> int main(int argc, char **argv) {
> char *x = dcgettext(\"foo\", \"bar\", 0);
> return 0; }


Minor blunder here. 

char *x = gettext("foo");

instead of

char *x = dcgettext("foo", "bar", 0);
Comment 13 Colin Gilbert 2024-12-29 20:24:22 UTC
Created attachment 915496 [details]
emerge --info output for dev-lang/perl

Here is the emerge --info output for dev/lang perl. I hope this helps get to the bottom of this.
Comment 14 Alfred Wingate 2024-12-29 20:33:38 UTC
Created attachment 915497 [details]
conftest.c

Could you try manually building the conftest (attached)?

gcc conftest.c -o conftest
Comment 15 Alfred Wingate 2024-12-29 20:34:21 UTC
There should be no output and a new file "conftest" should be created from conftest.c.
Comment 16 Colin Gilbert 2024-12-29 20:36:36 UTC
(In reply to Alfred Wingate from comment #15)
> There should be no output and a new file "conftest" should be created from
> conftest.c.

It compiles and runs without issue
Comment 17 Alfred Wingate 2024-12-29 21:28:42 UTC
Created attachment 915499 [details, diff]
Patch for using Config::Autoconf

Could you put this into /etc/portage/patches/dev-perl/Locale-gettext-1.70.0-r1/ and then try to build the package?

If it fails share /var/tmp/portage/dev-perl/Locale-gettext-1.70.0-r1/work/Locale-gettext-1.07/config.log
Comment 18 Colin Gilbert 2024-12-29 21:38:16 UTC
Created attachment 915500 [details]
build.log, with patch applied

It didn't work, but here is the build.log of the attempted emerge.
Comment 19 Colin Gilbert 2024-12-29 21:39:47 UTC
(In reply to Alfred Wingate from comment #17)
> Created attachment 915499 [details, diff] [details, diff]
> Patch for using Config::Autoconf
> 
> Could you put this into
> /etc/portage/patches/dev-perl/Locale-gettext-1.70.0-r1/ and then try to
> build the package?
> 
> If it fails share
> /var/tmp/portage/dev-perl/Locale-gettext-1.70.0-r1/work/Locale-gettext-1.07/
> config.log

The config.log file doesn't exist, but I posted the build.log in my previous comment.
Comment 20 Alfred Wingate 2024-12-29 21:40:48 UTC
Sorry about that. I should've realised you may not have the new dependency. 

Install dev-perl/Config-AutoConf and try again.
Comment 21 Colin Gilbert 2024-12-29 21:56:23 UTC
(In reply to Alfred Wingate from comment #20)
> Sorry about that. I should've realised you may not have the new dependency. 
> 
> Install dev-perl/Config-AutoConf and try again.

It seems to work now. Hurray!
Comment 22 Alfred Wingate 2024-12-29 21:58:47 UTC
Thats good to hear. Simultaneously its a bit annoying as its not obvious in what way it didnt work before :D.

At least using this patch would be clear improvement as this failing should be easier to debug.
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-30 15:47:59 UTC
Thanks both. I'll pull in that patch.

It's a shame we can't know what the original problem is, I have no idea what it could've been (nothing's changed in this area), but it is what it is.
Comment 24 Larry the Git Cow gentoo-dev 2025-01-18 12:09:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea20c52e8689fe9ccba5834963011191f2c741b9

commit ea20c52e8689fe9ccba5834963011191f2c741b9
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-01-17 18:32:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-18 12:08:26 +0000

    dev-perl/Locale-gettext: add 1.70.0_p20181130
    
    [sam: A snapshot is a good idea here, given the last release was quite
    some time ago, there's a bunch of fixes in master, and it also got
    yanked (?) from CPAN because the author (told indirectly, so may not
    be accurate) thought it was obsolete these days.]
    
    Bug: https://bugs.gentoo.org/947174
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../Locale-gettext-1.70.0_p20181130.ebuild         | 32 ++++++++++++++++++++++
 dev-perl/Locale-gettext/Manifest                   |  1 +
 2 files changed, 33 insertions(+)
Comment 25 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-18 12:10:40 UTC
Let's call it UPSTREAM given we committed a fix for it indirectly. Let us know if it returns. Thank you!
Comment 26 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-18 12:10:57 UTC
(In reply to Sam James from comment #25)
> Let's call it UPSTREAM given we committed a fix for it indirectly. Let us
> know if it returns. Thank you!

(Wanted to avoid WORKSFORME as it sort of implies no code change.)
Comment 27 Larry the Git Cow gentoo-dev 2025-01-19 01:31:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43a82adfaa4428f278163d145a4dbe13401178c9

commit 43a82adfaa4428f278163d145a4dbe13401178c9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-19 01:30:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-19 01:30:21 +0000

    dev-perl/Locale-gettext: create config.log to ease debugging
    
    Prompted by a user in #gentoo who had a configure test fail with
    mold (the "plugin issue").
    
    Bug: https://bugs.gentoo.org/947174
    Signed-off-by: Sam James <sam@gentoo.org>

 .../Locale-gettext/Locale-gettext-1.70.0_p20181130.ebuild    |  1 +
 .../files/Locale-gettext-1.70.0_p20181130-config-log.patch   | 12 ++++++++++++
 2 files changed, 13 insertions(+)