Opened 11 years ago
Closed 11 years ago
#3595 closed task (worksforme)
6.9.2. Configuring Glibc
Reported by: | Ryan P.C. McQuen | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6 |
Component: | Book | Version: | SVN |
Severity: | normal | Keywords: | timezone, tzselect, glibc |
Cc: |
Description
" One way to determine the local time zone is to run the following script:
tzselect " It should be added that this script must be run from '/usr/share/zoneinfo'. Otherwise an error like this will happen:
/usr/bin/tzselect: line 439: /sources/glibc-build/America/Los_Angeles: No such file or directory /usr/bin/tzselect: time zone files are not set up correctly
Attachments (4)
Change History (24)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Yes I do. It worked perfectly from /usr/share/zoneinfo. At this point in the book though you will actually be in the '/sources/glibc-build' directory, which the command will not work from.
Here is what I got running the command from the '/root' directory:
root:~# tzselect /usr/bin/tzselect: line 171: /root/iso3166.tab: No such file or directory /usr/bin/tzselect: time zone files are not set up correctly
So it should be specified in some way ...
Either '/' or '/usr/share/zoneinfo'.
comment:3 by , 11 years ago
It works fine for me from /sources/glibc-build. You need to trace through the script and see why yours is not working.
It's hard to say that the book is wrong since this is the first problem with this and that command has been in the book for many years.
comment:4 by , 11 years ago
Perhaps you should verify that you ran that sed command (should be the first command on the Glibc page) that fixes the installation of tzselect - I believe this problem is exactly what happens when you don't use that. What is the result of
grep '^:.*TZDIR' /usr/bin/tzselect"
comment:5 by , 11 years ago
Did you mean?
grep '^:.*TZDIR' "/usr/bin/tzselect"
If so:
: ${TZDIR=`pwd`}
comment:7 by , 11 years ago
Yup, that does indicate you didn't use that sed command. This should fix the problem:
sed -i.bak '/^:.*TZDIR/s@`pwd`@/usr/share/zoneinfo@' /usr/bin/tzselect
comment:10 by , 11 years ago
Is it this one?
sed -i 's/\\$$(pwd)/`pwd`/' timezone/Makefile
If so, I ran it, have it in my .bash_history. See attached photo.
comment:11 by , 11 years ago
No...the sed command in the book is the one that's supposed to be run during the Glibc build. The sed command I gave is just to fix the problem after Glibc is already installed, usually due to having missed the command in the book.
Also, that screenshot you gave doesn't indicate anything since you apparently weren't even in the Glibc source dir when you ran that, so it would have had an error if you did use it then. Also, I don't know why it shows you running that immediately after creating /etc/group, since there should be the installation of the Linux headers and Man-pages in between. Either that isn't an actual screenshot of your complete build procedure for Chapter 6 so far, or you're doing something strange to deviate from the book's instructions, in which case you'll need to clarify what that is.
comment:12 by , 11 years ago
I got to that command by pressing 'up' through my history. You'll note the 2 commands in a row that were run, copied verbatim from my shell. Is this the command you said I 'missed'? If so, I did not miss it, and there is some other issue.
cd glibc-2.19 sed -i 's/\\$$(pwd)/`pwd` /' timezone/Makefile
comment:13 by , 11 years ago
When I asked you to run
grep '^:.*TZDIR' "/usr/bin/tzselect"
the output from that command that you gave is exactly what you get when you don't use that sed command on the Glibc page. Plus, as Bruce said, plenty of people have been using these same instructions for a while, and they are known to work. Try rebuilding Glibc and double-checking your commands, and tzselect should work fine.
comment:15 by , 11 years ago
The first one in the Glibc instructions, the one you keep saying you ran. it looks like either you did miss it or mistyped it.
comment:16 by , 11 years ago
This is copied and pasted from my .bash_history:
cd glibc-2.19 sed -i 's/\\$$(pwd)/`pwd` /' timezone/Makefile
Do you see the typo?
comment:17 by , 11 years ago
There's an extra space in there - compare to what's in the book. Though, I don't think that particular difference should cause an issue, so there's likely a problem somewhere else, but I have no idea where. Just try rebuilding Glibc, paying close attention to the commands, and see if you get the same problem.
comment:18 by , 11 years ago
Alternately, copy the entire contents of /usr/bin/tzselect and glibc-build/config.log, as they might give hints as to what the problem is.
by , 11 years ago
by , 11 years ago
Attachment: | config.log added |
---|
comment:19 by , 11 years ago
Thank you for your help Chris!
I've attached the requested files. I hope we can get to the bottom of this.
: - )
comment:20 by , 11 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I'm closing this. Take this to lfs-support. The ticket system is the wrong place to debug individual problems.
Do you actually have the TZ data set up properly? It runs from chroot / directory just fine.