public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc default library location
@ 2001-08-01  3:56 Nathaniel Mallet
  2001-08-01  5:38 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Nathaniel Mallet @ 2001-08-01  3:56 UTC (permalink / raw)
  To: gcc-help

Hi All,

I recently build glibc 2.2.3 with gcc 2.95.3. The build went off ok,
and make check passed. I then ran make install in the default location
/usr/local.

But now, gcc keeps trying to link /usr/local/lib/ld.so.6 by default,
and I'd like to switch it back to /lib/ld.so.6.

Does anyone know where gcc picks up it's library paths? I've checked the
following;

	Environment variables - none
	/etc/ld.so.conf - They all point to /lib or /usr/lib, but
/usr/local/lib is not there
	gcc's specs file - The only thing I found was /lib/ld-linux.so.2

I also took a look at the gcc and glibc manuals and HOWTOs, and found nothing
there. I'm running out of options, and I'd rather not go through glibc's
makefile to figure out what install does.

Thanks in advance,

Nat

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc default library location
  2001-08-01  3:56 gcc default library location Nathaniel Mallet
@ 2001-08-01  5:38 ` Alexandre Oliva
  2001-08-01 19:55   ` Nathaniel Mallet
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Oliva @ 2001-08-01  5:38 UTC (permalink / raw)
  To: nathaniel.mallet; +Cc: gcc-help

On Aug  1, 2001, Nathaniel Mallet <nathaniel.mallet@home.com> wrote:

> I recently build glibc 2.2.3 with gcc 2.95.3. The build went off ok,
> and make check passed. I then ran make install in the default location
> /usr/local.

> But now, gcc keeps trying to link /usr/local/lib/ld.so.6 by default,
> and I'd like to switch it back to /lib/ld.so.6.

What do you mean by `gcc keeps trying to link /usr/local/lib/ld.so.6'?
Anyway, perhaps you shouldn't have build and installed in the default
location /usr/local, but used /usr instead?

Anyway, this mailing list is about GCC, not glibc, and the problem
appears to be in glibc, so maybe you'd get better answers asking in a
glibc-specific forum?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc default library location
  2001-08-01  5:38 ` Alexandre Oliva
@ 2001-08-01 19:55   ` Nathaniel Mallet
  2001-08-02 10:59     ` aoliva
  0 siblings, 1 reply; 4+ messages in thread
From: Nathaniel Mallet @ 2001-08-01 19:55 UTC (permalink / raw)
  To: gcc-help

I considered the possibility that this could be the wrong mailing list.
However, it is gcc that's giving me a hard time (and I apologize if that
wasn't clear), not glibc (although the glibc install is what started this),
and it is a gcc question:

Basically, I created very simple "Hello World" application to test my glibc
2.2.3 install. When I run the following:

    gcc -o hw main.o

I get a series of unresolved symbols found in /usr/local/lib/ld.so.6. These
errors showed up in gcc *after* I ran make install for glibc, and so I'm
trying to figure out what default environment settings gcc is picking up to
link to this particular version of ld.so.6, instead of the one found in /lib
(glibc 2.1.9). So far, I've verified:

    - Environement variables
    - The gcc specs files
    - /etc/ld.so.conf

And they all point to /lib. Not one of these locations is pointing to
/usr/local/lib

I do have an temporary fix for this issue, which is to rename
/usr/local/lib/ld.so.6 to something unrelated, and create a softlink to
/lib/ld.so.6. But this does not help me understand why gcc is linking my
application with /usr/local/lib/ld.so.6.

As for why I installed glibc in the default location, it's because I wasn't
interested in installing glibc 2.2.3 as my primary library. The glibc manual
suggests leaving the default install location if glibc is to be used as a
test library. The glibc HOWTO then suggests changes to force gcc to use the
test library during compilation, which I did *not* follow, specifically to
avoid this issue. I'd rather have a working compiler than a working test
library.

I appreciate how busy you must be, and how difficult and frustrating it can
be to deal with novice developers. If you still believe this is a glibc
issue as opposed to a gcc configuration issue, then disregard this email; I
won't push the issue any further.

Thank you for your efforts,

Nathaniel

----- Original Message -----
From: "Alexandre Oliva" <aoliva@redhat.com>
To: <nathaniel.mallet@home.com>
Cc: <gcc-help@gcc.gnu.org>
Sent: Wednesday, August 01, 2001 8:38 AM
Subject: Re: gcc default library location


> On Aug  1, 2001, Nathaniel Mallet <nathaniel.mallet@home.com> wrote:
>
> > I recently build glibc 2.2.3 with gcc 2.95.3. The build went off ok,
> > and make check passed. I then ran make install in the default location
> > /usr/local.
>
> > But now, gcc keeps trying to link /usr/local/lib/ld.so.6 by default,
> > and I'd like to switch it back to /lib/ld.so.6.
>
> What do you mean by `gcc keeps trying to link /usr/local/lib/ld.so.6'?
> Anyway, perhaps you shouldn't have build and installed in the default
> location /usr/local, but used /usr instead?
>
> Anyway, this mailing list is about GCC, not glibc, and the problem
> appears to be in glibc, so maybe you'd get better answers asking in a
> glibc-specific forum?
>
> --
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc default library location
  2001-08-01 19:55   ` Nathaniel Mallet
@ 2001-08-02 10:59     ` aoliva
  0 siblings, 0 replies; 4+ messages in thread
From: aoliva @ 2001-08-02 10:59 UTC (permalink / raw)
  To: Nathaniel Mallet; +Cc: gcc-help

On Aug  1, 2001, "Nathaniel Mallet" <Nathaniel.Mallet@home.com> wrote:

>     gcc -o hw main.o

> I get a series of unresolved symbols found in
> /usr/local/lib/ld.so.6.

Add -v to the command line and you'll see that GCC passes a command
line option to the linker that tells it which ld.so to use as the
program interpreter.  You'll have to override this in the command
line.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-02 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-01  3:56 gcc default library location Nathaniel Mallet
2001-08-01  5:38 ` Alexandre Oliva
2001-08-01 19:55   ` Nathaniel Mallet
2001-08-02 10:59     ` aoliva

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).