Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180546 - glibc ldd needs dependency on bash
Summary: glibc ldd needs dependency on bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 182522 184025 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-01 13:18 UTC by Mike McQuaid
Modified: 2007-07-02 22:02 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike McQuaid 2007-06-01 13:18:07 UTC
http://www.linuxfromscratch.org/lfs/view/development/chapter06/glibc.html

As documented here, glibc's ldd fails silently on a non-bash shell.
glibc should probably have a dependency on bash and/or change the ldd script from
#!/bin/sh
to
#!/bin/bash
so as to avoid confusion situations where /bin/sh is not /bin/bash.
Comment 1 SpanKY gentoo-dev 2007-06-01 13:27:44 UTC
or you fix ldd
Comment 2 Mike McQuaid 2007-06-01 13:54:48 UTC
It's a fairly terrifying script and I'd have to learn more bash that I do at the moment to sort it out.

It seems the plot thickens and that if you don't have bash on your system glibc rewrites the script at compile time. The problem comes if you have /bin/bash but /bin/sh isn't /bin/bash.

In the situation that the user has bash but it isn't the primary shell you should probably change /bin/sh to /bin/bash
Comment 3 SpanKY gentoo-dev 2007-06-01 14:21:08 UTC
"/bin/sh isnt bash" isnt something i can work with

that LFS page contains no details

dash fails, but that's a bug in dash and i've opened another one for that
Comment 4 DrChandra the Gentoo Person 2007-06-01 17:26:50 UTC
I'd change this to resolved wontfix. Bash is a system package. So is glibc (which contains ldd). Bash technically depends on glibc for libdl, but doesn't have glibc as a dep in portage.

The only way this is a Gentoo problem is if someone patched ldd so it now includes bash-specific code.

Otherwise, how can Gentoo be held responsible for whatever the user points /usr/sh at? How can anything be enforced?

I suppose the original suggested fix might be the answer, since bash is a system package.
Comment 5 SpanKY gentoo-dev 2007-06-01 19:22:35 UTC
i dug into this more and did some experimenting and the glibc configure script makes an attempt at locating /bin/bash but will detect /bin/sh instead due to the configure script using "BASH" as the variable which is set to /bin/sh when bash is invoked as /bin/sh

i'll send a patch upstream and see what drepper says
Comment 6 SpanKY gentoo-dev 2007-06-18 03:10:05 UTC
my suggestions have been merged upstream ... this will be fixed in next release of glibc
Comment 7 Mike McQuaid 2007-06-18 11:17:42 UTC
Wow, good man. Impressive work!
Comment 8 SpanKY gentoo-dev 2007-06-19 01:52:00 UTC
*** Bug 182522 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-07-02 22:02:56 UTC
*** Bug 184025 has been marked as a duplicate of this bug. ***