public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@airs.com>
To: jj@sunsite.ms.mff.cuni.cz
Cc: rth@cygnus.com, binutils@sourceware.cygnus.com
Subject: Re: [RFC] Adding --skip-mismatch option to ld
Date: Thu, 01 Jul 1999 00:00:00 -0000	[thread overview]
Message-ID: <19990609151538.2567.qmail@daffy.airs.com> (raw)
In-Reply-To: <19990609163754.V949@mff.cuni.cz>

   Date: Wed, 9 Jun 1999 16:37:54 +0200
   From: Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>

   on sparc64, say the distribution will give the users the choice to install
   all libraries in both ABIs, so the installer will nicely polulate both */lib
   and */lib64 trees. But then a user will compile his own package in 64bit and
   install it, its library will go say into /usr/lib.

Why would a user install a library in /usr/lib?  I think of that as a
system destination.  It shouldn't be used for user-installed packages.

   Say he compiles yet
   another package (again 64bit) whose configure will look for that library,
   find it in /usr/lib and add /usr/lib to the list to be passed as -L into
   LDFLAGS.

Why would a configure script add a -L option for /usr/lib?  /usr/lib
is on the default search path anyhow.  If a configure script can find
a library using a -l option, it shouldn't add a -L option.

   And now you have problem, because the -L/usr/lib will come before
   the system libraries which include /usr/lib64, so the link will not succeed.
   Yes, it can be solved e.g. by adding -L/usr/lib64 before -L/usr/lib, but I
   suppose many people will be horribly confused by that.

I agree that this scenario is possible.  But I think the user made a
mistake and I think the configure script make a mistake.  How much
should the linker try to compensate for mistakes in other packages?

On the other hand, do you see the potential confusion if
--skip-mismatch becomes the default?  The user will accidentally
update libfoo.a in some directory with the wrong version.  The user
will link against -lfoo.  The linker will report that there is no such
library, or much worse will find an older version of -lfoo which
matches.  The user will pull his or her hair out trying to get the
linker to see the newly updated library.  This is also due to a
mistake.  Isn't it just as bad as the one you describe?

Ian

  reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Jakub Jelinek
1999-07-01  0:00 ` Richard Henderson
1999-07-01  0:00   ` Ian Lance Taylor
1999-07-01  0:00     ` Richard Henderson
1999-07-01  0:00       ` Ian Lance Taylor
1999-07-01  0:00         ` Jakub Jelinek
1999-07-01  0:00           ` Ian Lance Taylor [this message]
1999-07-01  0:00             ` Jakub Jelinek
1999-07-01  0:00               ` Ian Lance Taylor
1999-07-01  0:00                 ` Richard Henderson
1999-07-01  0:00                   ` Ian Lance Taylor
1999-07-01  0:00   ` Jakub Jelinek
1999-07-01  0:00     ` Ian Lance Taylor
1999-07-01  0:00     ` Richard Henderson
1999-07-01  0:00 ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990609151538.2567.qmail@daffy.airs.com \
    --to=ian@airs.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=jj@sunsite.ms.mff.cuni.cz \
    --cc=rth@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).