Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471020 - <sys-libs/glibc-2.25-r7 on HPPA - locale-gen: localedef: cannot map archive header: Invalid argument
Summary: <sys-libs/glibc-2.25-r7 on HPPA - locale-gen: localedef: cannot map archive h...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: HPPA Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords: PATCH, REVIEWED
Depends on: 518460
Blocks: glibc-2.25
  Show dependency tree
 
Reported: 2013-05-22 16:47 UTC by Jeroen Roovers (RETIRED)
Modified: 2017-10-19 19:22 UTC (History)
2 users (show)

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


Attachments
strace -f -o localedef.strace localedef -i en_GB -f UTF-8 -A /usr/share/locale/locale.alias en_GB (localedef.strace,72.28 KB, text/plain)
2013-05-22 16:47 UTC, Jeroen Roovers (RETIRED)
Details
localedef SHMLBA (0001-BZ-10283-localedef-align-fixed-maps-to-SHMLBA.patch,2.40 KB, patch)
2013-05-23 21:06 UTC, SpanKY
Details | Diff
sys-libs:glibc-2.17:20130524-153217.log.gz (20130524-153217.log.gz,300.17 KB, application/x-gzip)
2013-05-24 16:24 UTC, Jeroen Roovers (RETIRED)
Details
strace -f -o localedef-patched.strace localedef -i en_GB -f UTF-8 -A /usr/share/locale/locale.alias en_GB (localedef-patched.strace,72.38 KB, text/plain)
2013-05-24 16:24 UTC, Jeroen Roovers (RETIRED)
Details
localedef SHMLBA v2 (0001-BZ-10283-localedef-align-fixed-maps-to-SHMLBA.patch,8.28 KB, patch)
2013-05-25 18:42 UTC, SpanKY
Details | Diff
0070_all_glibc-2.18-localedef-page-align-1.patch (0070_all_glibc-2.18-localedef-page-align-1.patch,1.92 KB, patch)
2013-06-25 00:45 UTC, SpanKY
Details | Diff
0071_all_glibc-2.18-localedef-page-align-2.patch (0071_all_glibc-2.18-localedef-page-align-2.patch,8.95 KB, patch)
2013-06-25 00:46 UTC, SpanKY
Details | Diff
sys-libs:glibc-2.17:20130625-071726.log.gz (20130625-071726.log.gz,168.56 KB, application/x-gzip)
2013-06-25 10:27 UTC, Jeroen Roovers (RETIRED)
Details
0072_all_glibc-2.18-localedef-page-align-3.patch (0072_all_glibc-2.18-localedef-page-align-3.patch,740 bytes, patch)
2013-06-25 19:19 UTC, SpanKY
Details | Diff
Patch fixing the issue (local-shmlba.patch,918 bytes, patch)
2014-09-10 12:57 UTC, Guy Martin (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2013-05-22 16:47:29 UTC
Created attachment 348930 [details]
strace -f -o localedef.strace localedef -i en_GB -f UTF-8 -A /usr/share/locale/locale.alias en_GB

# localedef -i en_GB -f UTF-8 -A /usr/share/locale/locale.alias en_GB
cannot map archive header: Invalid argument
# echo $?
1

This happens for every locale that locale-gen tries to create. Re-emerging sys-libs/glibc didn't help.

I only see this on a C8000 with a 64-bit kernel;, not on a C3650 (with a 64-bit kernel).

I found an ancient bug report that doesn't appear to help much.[1]


[1] http://sourceware.org/bugzilla/show_bug.cgi?id=10283
Comment 1 SpanKY gentoo-dev 2013-05-23 04:56:55 UTC
thanks, i've re-opened that bug to see about fixing things
Comment 2 SpanKY gentoo-dev 2013-05-23 21:06:17 UTC
Created attachment 349030 [details, diff]
localedef SHMLBA

(In reply to comment #0)

can you try this patch to see if it fixes things ?  you should be able to drop it into /etc/portage/patches/sys-libs/glibc/.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-24 16:24:10 UTC
Created attachment 349074 [details]
sys-libs:glibc-2.17:20130524-153217.log.gz

Sadly, the same error message is produced.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-24 16:24:54 UTC
Created attachment 349076 [details]
strace -f -o localedef-patched.strace localedef -i en_GB -f UTF-8 -A /usr/share/locale/locale.alias en_GB
Comment 5 SpanKY gentoo-dev 2013-05-25 18:42:44 UTC
Created attachment 349150 [details, diff]
localedef SHMLBA v2

yeah, that patch was garbage.  try this one instead.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-26 16:22:16 UTC
Comment on attachment 349150 [details, diff]
localedef SHMLBA v2

Yes, that does seem to work.
Comment 7 SpanKY gentoo-dev 2013-06-25 00:45:43 UTC
Created attachment 351856 [details, diff]
0070_all_glibc-2.18-localedef-page-align-1.patch
Comment 8 SpanKY gentoo-dev 2013-06-25 00:46:06 UTC
Created attachment 351858 [details, diff]
0071_all_glibc-2.18-localedef-page-align-2.patch

these are the two patches i committed upstream.  can you give them a spin before i merge them to 2.17 ?
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-25 10:27:41 UTC
Created attachment 351886 [details]
sys-libs:glibc-2.17:20130625-071726.log.gz

/var/tmp/portage/sys-libs/glibc-2.17/work/build-default-hppa2.0-unknown-linux-gnu-nptl/locale/locarchive.o: In function `prepare_add
ress_space':                                                                                                                        /var/tmp/portage/sys-libs/glibc-2.17/work/glibc-2.17/locale/programs/locarchive.c:91: undefined reference to `PTR_ALIGN_UP'
/var/tmp/portage/sys-libs/glibc-2.17/work/build-default-hppa2.0-unknown-linux-gnu-nptl/locale/locarchive.o: In function `file_data_a
vailable_p':                                                                                                                        /var/tmp/portage/sys-libs/glibc-2.17/work/glibc-2.17/locale/programs/locarchive.c:287: undefined reference to `ALIGN_DOWN'
collect2: ld returned 1 exit status
Comment 10 SpanKY gentoo-dev 2013-06-25 18:19:01 UTC
(In reply to Jeroen Roovers from comment #9)

you applied both patches right ?  the first one updates libc-internal.h which every glibc file should implicitly include ...
Comment 11 SpanKY gentoo-dev 2013-06-25 19:19:14 UTC
(In reply to SpanKY from comment #10)

nm, that's not how libc-internal.h works.  you'll need this minor patch too.
Comment 12 SpanKY gentoo-dev 2013-06-25 19:19:29 UTC
Created attachment 351944 [details, diff]
0072_all_glibc-2.18-localedef-page-align-3.patch
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-26 10:35:33 UTC
(In reply to SpanKY from comment #11)
> (In reply to SpanKY from comment #10)
> 
> nm, that's not how libc-internal.h works.  you'll need this minor patch too.

And now it works.
Comment 14 SpanKY gentoo-dev 2013-06-26 16:48:37 UTC
(In reply to Jeroen Roovers from comment #13)

thanks.  pushed in 2.17.
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-09 13:47:41 UTC
localedef with recent kernels misbehaves again. The mailing list seems to somewhat agree that the glibc patches need reviewing. Or we revert the kernel changes (for the time being).
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-12 20:05:29 UTC
I just merged 2.19-r1 and it still seems to have this problem, so I guess the recent changes for bug #518460 didn't patch this issue.
Comment 17 Guy Martin (RETIRED) gentoo-dev 2014-09-10 12:57:29 UTC
Created attachment 384524 [details, diff]
Patch fixing the issue

This patch wasn't included in the commit fixing #518460.

It does fix the problem for generating locales.

Can it be integrated in our patchset ?

Thanks.
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2015-09-13 06:11:21 UTC
Not fixed in glibc 2.22.
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2017-01-06 10:55:41 UTC
Also 2.23-r3.
Comment 20 Brendan Horan 2017-05-23 05:08:33 UTC
(In reply to Jeroen Roovers from comment #19)
> Also 2.23-r3.

Yep, using the patch from C17 resolved it for me.
Not sure if that is the best way.
Comment 22 Jeroen Roovers (RETIRED) gentoo-dev 2017-08-23 21:48:59 UTC
(In reply to Andreas K. Hüttel from comment #21)
> From upstream bug:

You didn't even bother to read this bug.
Comment 23 Andreas K. Hüttel archtester gentoo-dev 2017-09-11 10:37:10 UTC

I cherry-picked the upstream commit from glibc-bug 19838, which should be equivalent. Will be in the next 2.25 patchset (and in 2.26 anyway).
Comment 24 Andreas K. Hüttel archtester gentoo-dev 2017-10-19 19:22:51 UTC
Fixed in 2.25-r7