New: Generating locale en_US.UTF-8 fails on 64bit fedora linux host
https://bugs.busybox.net/show_bug.cgi?id=7262
Summary: Generating locale en_US.UTF-8 fails on 64bit fedora
linux host
Product: buildroot
Version: 2014.05
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: normen.bolling at teufel.de
CC: buildroot at uclibc.org
Estimated Hours: 0.0
Hi there,
on my fedora20 64bit linux PC the build process stopped with the following error:
Generating locale en_US.UTF-8
cannot create temporary file: No such file or directory
make: *** [target-generatelocales] Error 1
=> Corresponding Makefile target: "target-generatelocales"
Manually creation of a symbolic link "lib64" in the directory "buildroot/output/target/usr" solved the problem:
ls -oga ~/git/buildroot/output/target/usr
total 44
drwxr-xr-x. 7 4096 Jul 2 17:30 . drwxr-xr-x. 20 4096 Jul 2 17:30 .. drwxr-xr-x. 2 4096 Jul 2 17:30 bin drwxr-xr-x. 10 20480 Jul 2 17:30 lib lrwxrwxrwx. 1 3 Jul 2 15:53 lib32 -> lib lrwxrwxrwx. 1 3 Jul 2 17:24 lib64 -> lib drwxr-xr-x. 3 4096 Jul 2 17:30 libexec drwxr-xr-x. 2 4096 Jul 2 17:30 sbin drwxr-xr-x. 15 4096 Jul 2 17:30 share
Cheers,
Normen Bolling
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
https://bugs.busybox.net/show_bug.cgi?id=7262
--- Comment #1 from Thomas Petazzoni <[email protected]> 2014-07-02 15:58:40 UTC --- Thanks for the bug report! Could you attach the Buildroot .config that exhibits
the problem so that we can easily reproduce? Thanks!
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
--- Comment #2 from normen.bolling at teufel.de 2014-07-02 16:06:18 UTC --- Created attachment 5480
--> https://bugs.busybox.net/attachment.cgi?id=5480
.config
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
--- Comment #3 from Thomas De Schampheleire <[email protected]> 2014-08-08 14:02:56 UTC --- I find it very odd that creating a link in the _target_ directory would modify
the behavior of a host command (being localedef, which generates the error).
Are you sure that the adding of the link is directly related to the solving of the error? Can you reproduce that flow?
If so, could you provide more details on where the connection is between the error scenario and the link?
I cannot reproduce this, but I looked at the source code of localedef, and the error is generated in a path like this (based on string matching):
/* Create a temporary file in the correct directory. */ fd = mkstemp (fname);
if (fd == -1)
error (EXIT_FAILURE, errno, _("cannot create temporary file"));where as far as I understand this temporary file would be created in output/target/usr/share/locale. The creation of this directory happens in the buildroot Makefile, and this code has been there for a while now.
So currently I don't understand what really happens. Any feedback you can give, possible with an 'strace -f' output would be very useful.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
Thomas De Schampheleire <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME--- Comment #4 from Thomas De Schampheleire <[email protected]> 2014-08-12 18:05:11 UTC --- I installed Fedora 20 on a 64-bit VirtualBox machine, and built buildroot
2014.05 with the configuration you provided.
The build went successful, and thus I am not able to reproduce this issue:
Quoted 1 line
Quoted 1 line
Quoted 1 line
host-localedef 2.14.1-r17443-ptx1 Installing to host directory
/usr/bin/install -D -m 0755 /home/tdescham/buildroot-2014.05/output/build/host-localedef-2.14.1-r17443-ptx1/localedef /home/tdescham/buildroot-2014.05/output/host/usr/bin/localedef
Generating locale en_US.UTF-8
Quoted 1 line
Quoted 1 line
Quoted 1 line
Finalizing target directory
rm -f /home/tdescham/buildroot-2014.05/output/build/locales.nopurge for i in C en; do echo $i >> /home/tdescham/buildroot-2014.05/output/build/locales.nopurge; done
Moreover, as I mentioned in a previous comment, the relation between a lib64 symlink in output/target and the generation of locales failing due to a temporary file, sounds very odd to me.
For these reasons, I am closing this bug report.
Do reopen this bug if you can prove that the problem is reproducible. In this case, please try to provide us with more detail regarding the problem, given that I was not able to reproduce with seemingly the same configuration. Do also verify with the latest buildroot in this case.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
--- Comment #5 from romain.naour at openwide.fr 2014-08-12 22:09:24 UTC --- Created attachment 5558
--> https://bugs.busybox.net/attachment.cgi?id=5558
strace log of localedef
I ThomasDS,
I have just give a try and I'm able to reproduce this issue with the latest buildroot master on a Federa 20 64bits.
It seems that localedef can't create "target/usr/lib64/locale/locale-archive.dRUlDK" file since the directory "target/usr/lib64" doesn't exist.
When the symbolic link is created in target/usr/lib64 to target/usr/lib/, the locale-archive.dRUlDK file is correctly created.
So yes, localedef fail to create a temporary file, not in target/usr/share/locale but in target/usr/lib64/locale.
Here is the strace log of localedef.
I hope it can help you.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
Thomas De Schampheleire <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WORKSFORME |--- Comment #6 from Thomas De Schampheleire <[email protected]> 2014-08-13 19:12:53 UTC --- (Reopen after more feedback from Romain)
Hi Romain,
Thanks a lot for the strace!
It's odd though, as I don't see the same here. If I run the same strace in my 64-bit VirtualBox Fedora 20 installation, I see locale-archive is searched in output/target/usr/lib/locale/, not lib64.
Looking in the sources of localedef: (just some snippets)
glibc/locale/programs/locarchive.c:57:
#define ARCHIVE_NAME LOCALEDIR "/locale-archive"
if (output_prefix)
memcpy (archivefname, output_prefix, prefix_len);
strcpy (archivefname + prefix_len, ARCHIVE_NAME);
strcpy (stpcpy (fname, archivefname), ".XXXXXX");Makefile:
-DLOCALEDIR='"$(localedir)"'
localedir = $(libdir)/locale
prefix = /usr
exec_prefix = ${prefix}
libdir = ${exec_prefix}/libIn the building of localedef, I can see in the build commands that -DLOCALEDIR=/usr/lib/locale is passed.
Could you checked what is passed in your case? Is it lib64 or lib?
In locarchive.c, the filename that is used for the mktemp call is composed from the prefix we pass (TARGET_DIR --> output/target) followed by the ARCHIVE_NAME. This ARCHIVE_NAME starts with LOCALEDIR, which is thus supposed to be /usr/lib/locale.
The only way I can see this failing (currently) is when LOCALEDIR in the build commands of host-localedef is already using lib64, which would mean that either the configure command does something unexpected, or the 'libdir' variable in the localedef Makefile is overruled on the command-line.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
--- Comment #7 from romain.naour at openwide.fr 2014-08-13 21:32:03 UTC --- Created attachment 5564
--> https://bugs.busybox.net/attachment.cgi?id=5564
Fedora 20 config.site file
Hi Thomas,
I found the issue, see the patch:
http://patchwork.ozlabs.org/patch/379752/
At the top of configure script output I had:
"configure: loading site script /usr/share/config.site" (see attached file)
Without that, target/usr/lib/locale/ is used as expected.
I think this bug can be closed now :)
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
--- Comment #8 from Thomas De Schampheleire <[email protected]> 2014-08-14 19:09:41 UTC --- Thanks for this further investigation and fix!
Using 'yum whatprovides /usr/share/config.site' I was able to determine that this file is installed by the 'autoconf' package. Since my Fedora installation does not have autoconf installed, I could not reproduce the bug. Copying your config.site file manually indeed causes the bug for me too.
I tested your patch successfully. I will provide this feedback on the mailing list. Once your patch is applied, we can close this bug.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7262] Generating locale en_US.UTF-8 fails on 64bit fedora linux host
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7262
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED--- Comment #9 from Thomas Petazzoni <[email protected]> 2014-08-16 13:44:17 UTC --- Proposed patch was applied as commit
http://git.buildroot.net/buildroot/commit/?id=85448febb3c9f21e6e4082fc344b3ef46261c782.
Closing bug.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.