linking to libc and libc_r (was Re: Certain 4.10 apps failing to run as root)

Anthony Chavez acc at anthonychavez.org
Tue Jul 13 20:00:14 PDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here's an update...

On Thu, 10 Jun 2004 09:12:33 -0600 Anthony Chavez <acc at anthonychavez.org> wrote:
> I think that Kris has been swallowed up by other efforts at the moment,
> so I'm moving this to the freebsd-stable list, where it's probably more
> relevant anyhow.

Actually, this particular machine is actually running RELENG_4_10.  My
bad.  So I'm posting this back to -questions. :-)

> On Thu, 03 Jun 2004 01:35:33 -0600 Anthony Chavez <acc at anthonychavez.org> wrote:
>> I just upgraded one of my machines to 4.10-STABLE from 4.9-STABLE and

s/0-STABLE/0-RELEASE/

>> certain binaries (such as vim or vipw) when run as root (either with
>> sudo or su -) freeze up with "rcmdsh: unknown user:" followed by a bunch
>> of garbage.
>>
>> Any thoughts on what could be causing this?
>
> On Thu, 03 Jun 2004 07:22:09 -0600 Anthony Chavez <acc at anthonychavez.org> wrote:
>> On Thu, 3 Jun 2004 01:27:57 -0700 Kris Kennaway <kris at obsecurity.org> wrote:
>>> I've only seen this when something incorrectly links to both libc and
>>> libc_r.  Neither of those four binaries should be linked to libc_r at
>>> all though.  Can you confirm with ldd(1)?

I have successfully worked around the problem by passing -DLITE to make
when building editors/vim.  When I remove -DLITE, the error resurfaces.

The following binaries remain affected (there are others, but they are
irrelevant to vim):

/usr/X11R6/bin/glxinfo:
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28221000)
        libc.so.4 => /usr/lib/libc.so.4 (0x2831e000)
/usr/X11R6/bin/glxgears:
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x281ac000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28264000)

What is causing this?  My first suspicion is ccache.  Could it be that I
have set the following variables in /etc/make.conf?

CC=/usr/local/bin/cc
CPP=/usr/local/bin/cpp
CXX=/usr/local/bin/c++

( /usr/local/bin/c{c,pp,++} are symlinked to /usr/local/bin/ccache. )

Apart from that, the only difference between the system in question and
a stock FreeBSD installation is the following MARK_ARGS pair in
/usr/local/etc/pkgtools.conf:

'editors/vim' => '-DLITE -DWITH_CSCOPE -DWITH_PERL -DWITH_PYTHON -DWITH_RUBY -DWITH_TCL'

- -- 
Anthony Chavez                             http://www.anthonychavez.org/
mailto:acc at anthonychavez.org                jabber:acc at anthonychavez.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFA9KG1bZTbIaRBRXERAvYRAJ9Q+3AcEYJLB1iYSoSqWZM/ZMfxkACfXKeT
WTypK5pincbgv/4DyQ0abDU=
=FEw9
-----END PGP SIGNATURE-----



More information about the freebsd-questions mailing list