On 1/4/2020 12:49 PM, Xi Ruoyao wrote:
On 2020-01-04 10:21 -0700,Alan Feuerbacher wrote:
I've run into a problem in building Version 20200101-systemd Section
6.9. Glibc-2.30.

After several repetitions of compiling, I've found that if I run
"make check", the various localedef invocations that follow, like
"localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8", sometimes fail with a message like
"cannot create temporary file: /tools/lib/locale/locale-archive.J6uC5g:
No such file or directory".
However, if I skip "make check", all of the "localedef" commands
run ok.
That's abnormal.  NEVER continue blindly with this kind of phenomena.  That may
be a bomb and may blow up your entire system.

Can you please expand on what I did wrong? I don't really understand what you mean by "continue blindly".

After some investigation I found the following:

The behavior is partly repeatable, in the sense that in doing about
half a dozen builds, sometimes the problem appeared and sometimes not.
I could see no pattern to the failures and successes. The final time
I ran "make check", all of the "localedef ..." commands succeeded.
So I've proceeded with the rest of Section 6 to nearly the end.

Before doing all builds again, I wiped the hard drive and started
from scratch, installing everything in the LFS book up through
Section 6.9.

A few details:

After all the runs of "make check", whether "localedef ..." succeeded
or not, /tools/lib exists but /tools/lib/locale does not exist. So
the question is: why is "localedef" sometimes looking for a
non-existent directory?
Glibc configuration script sets up a variable named "libc_cv_complocaledir".
It's value is defaulted to be $libdir/locale.  It's then hard-coded into
localedef binary and libc libraries.  So /tools/bin/localedef will always look
for /tools/lib/locale.
But I thought that configuring with --prefix=/usr forces files to be put in /usr/lib and /usr/bin . So I would think that you would get a default of /usr/lib/locale. I checked, and there does exist /usr/lib/locale/locale-archive, which I'm sure is correct.
My guess: either you forgot to run "make install" after "make check" (I really
have done this stupid thing several times), or you forgot to use "+h" in section
6.4.  Without "+h" bash may remember /tools/bin/localedef and use it even if
/usr/bin/localedef is newly installed.

I've wrapped the various commands in a sort of script, so that I can more easily run them reliably, since running each command individually from the LFS book is extremely prone to errors of omission for me. I think I screwed up some of the syntax.

I started over again with glibc after cleaning up my script. No issues now. Thanks!

Alan

--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to