#762 closed defect (fixed)
Host System Reqs - libc.so.6 on Fedora x86_64
Reported by: | Andrew Bradford | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | CLFS Embedded 1.0.0 |
Component: | BOOK | Version: | CLFS Embedded GIT |
Keywords: | Cc: |
Description
Turns out that on x86_64 versions of Fedora 13 (and possibly others), libc.so.6 isn't located in /lib, it's in /lib64. This means that the version-check.sh in Host System Requirements can't find it even when glibc is properly installed.
version-check.sh should check both /lib and /lib64 (or use a path that's already set?) to look for libc.so.6 rather than explicitly looking in /lib.
Change History (10)
comment:1 by , 13 years ago
comment:2 by , 12 years ago
Per my comment [1], could update the way to find which version of libc.so is being used (to remove the explicit /bin/bash) with:
ldd $(which bash) | grep libc.so | cut -d ' ' -f 3 | bash | head -n 1 | cut -d ' ' -f 1-7
[1]: http://lists.cross-lfs.org/pipermail/clfs-support-cross-lfs.org/2012-August/001400.html
Tested on Debian 6 amd64 and Ubuntu 12.04 x86_64.
follow-up: 6 comment:3 by , 12 years ago
bradfa,
ldd $(which bash) Do most distros include which in the base instaled? I haven't ran across a default install that didn't, but if some distro doesn't, would ldd $(type -p bash) be better as bash should be used?
Also if using type -p bash would that work when the SHELL is dash as in the case of current debian based systems?
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This ticket was opened on the Embedded book. The main CLFS book was fixed, but Embedded has not been.
Reopening.
comment:6 by , 12 years ago
Replying to kb0iic:
ldd $(which bash) Do most distros include which in the base instaled? I haven't ran across a default install that didn't, but if some distro doesn't, would ldd $(type -p bash) be better as bash should be used?
Also if using type -p bash would that work when the SHELL is dash as in the case of current debian based systems?
Bash is "essential" for Squeeze, Wheezy, and Sid, right now. Dash (as I understand it) is just kind of a front-end for your shell of choice, but many people choose Bash as it's often the default shell you actually use. Which is a part of debianutils, which is also "essential" and should be on all Debian based systems. I would assume which and bash are available on 99% of people's machines, whereas the issue that this fixes will start affecting quite a lot of people "real soon now" since Ubuntu and Fedora no longer have /lib/libc.so.6 anymore.
But, if you'd like something using $SHELL, use:
ldd $(which $SHELL)
But then you're reliant upon $SHELL being set. I'm not sure if it ever isn't, but it might not be. It (SHELL) is set in Debian and Ubuntu (what I have to test with right now).
comment:7 by , 12 years ago
Oops didn't mean to close this ticket for embedded. I need to see if I have write permissions for the embedded book. If so, I'll add what I did to the cross-lfs book which you had above with bash and finding the version as well.
follow-up: 9 comment:8 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:9 by , 12 years ago
Just for giggles, remove the need for bash:
ldd $(which ${SHELL}) | grep libc.so | cut -d ' ' -f 3 | ${SHELL} | head -n 1 | cut -d ' ' -f 1-7
I've only tested with bash, ironically... :)
Another option is to find where libc.so lives is to use ldd:
The result should be the absolute path of libc.so. From that, the usual command can be run to pull out the actual version of glibc installed.
Tested on Debian 6 x86_64 and Ubuntu 11.10 i386. Ubuntu 11.10 stores libc.so.6 in /lib/i386-linux-gnu/libc.so.6 due to the somewhat implementation of multi-arch, so Fedora or others who also store libc.so.6 somewhere different than directly in /lib should also work.