Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Feb 2002 09:46:47 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        Maxim Sobolev <sobomax@FreeBSD.org>, Jason Evans <jasone@canonware.com>, jdp@FreeBSD.org, deischen@FreeBSD.org, jasone@FreeBSD.org, hackers@FreeBSD.org, jlemon@FreeBSD.org
Subject:   Re: Linking libc before libc_r into application causes weird problems
Message-ID:  <3C640F07.9E2E3525@mindspring.com>
References:  <1013147180.73417.2.camel@notebook> <20020207234233.D23162@canonware.com> <3C639A8C.6D100326@FreeBSD.org> <3C63A62D.3E4A4FC4@mindspring.com> <3C63AD02.79BA5AF5@FreeBSD.org> <20020208164132.D78163@sunbay.com> <3C63E5D1.1E423698@FreeBSD.org> <3C63E961.45706408@mindspring.com> <20020208172503.H78163@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov wrote:
> > Seriously, the "Evolution" build process is seriously
> > broken; it works on Linux because Linux has a simple
> > threads implementation, rather than an efficient one.
>
> Doctor's Assistant: "No library should ever have an explicit
> dependency on libc".

One case that springs to mind is the mount system
call interface change.  A librarr that wrapped mount
expecting the old version of the interface should be
linked against the shared object that exports the
interface on which it depends (in this case, that's
libc.so.<previous>).

There are some cases where this is true, but it's
incredibly rare.

In this case, though, we have a threaded program that
doesn't link libc_r first, which it's *required* to do,
even if it *happens* to work on Linux, it *won't* on a
lot of other UNIX systems.

It's questionable whether it's also erroneous to link
the .so's that link gainst libc.so with libc.so instead
of libc_r.so, if they are threaded, anyway.

Oh... another libc.so linked to a shared object example
that's valid:  libc_r.so should be linked against libc.so.
Duh!  Nearly missed that one!  8-).

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C640F07.9E2E3525>