[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem compiling (gcc? glibc?)



On Thu, 13 Jan 2005 4:59 am, David wrote:
> On Wed, Jan 12, 2005 at 03:40:22PM +1300, Andrew Walbran wrote:
> > On Sun, 09 Jan 2005 12:34 pm, Andrew Walbran wrote:
> > > On Thu, 06 Jan 2005 10:19 pm, Andrea Vettorello wrote:
> > > > On Thu, 6 Jan 2005 18:20:35 +1300, Andrew Walbran <qwandor@gmail.com>
> >
> > wrote:
> > > > > I have recently started using Debian GNU / Linux, and have found
> > > > > that I am unable to compile anything with GCC. Compiling even a
> > > > > trivial program gives a number of 'undefined reference' errors:
> > > > >
> > > > > /lib/libc.so.6: undefined reference to
> >
> > [...]
> >
> > > > > Compiling with the -static flag succeeds without errors, but this
> > > > > is not really a solution.
> > > > >
> > > > > I am using the latest packages from the 'testing' section,
> > > > > including gcc 3.3.5-5 and glibc 2.3.2.ds1-20, on a Pentium II.
> > > > >
> > > > > I noticed that these errors refer to /lib/libc.so.6, whereas
> > > > > 'ldd /bin/echo' (for example) reports linking against
> > > > > /lib/tls/libc.so.6. I am not sure if this is relevant; what is the
> > > > > difference between the two libraries?
>
> One question.  Did you do a fresh install of Debian or did you by any
> chance install over an existing install?  FWIW, my /bin/echo links
> against /lib/libc.so.6
I installed woody a while ago, then upgraded to sarge / testing with apt-get.

>
> Do you by any chance have an environment variable "LD_LIBRARY_PATH" set?
No, LD_LIBRARY_PATH is not set.

> If so, this might be causing the error.  Also, "cat /etc/ld.so.conf" and
$ cat /etc/ld.so.conf
/usr/X11R6/lib
/usr/lib/atlas
/usr/local/lib

> see what's in there.  If there's a reference to the tls directory here,
> this _might_ cause the misdirected(?) link path.  If this file does
> contain a reference to that directory, I believe the correct way to
> correct this is with "ldconfig".  It sounds a bit scary to run this
> program (as root, of course), but this may be the way you will need to
> correct this.  It appears that you may have a configuration problem.

I've tried running ldconfig (as root), but it made no difference.

Thanks for your reply; any other ideas of what could be wrong?


Andrew Walbran

>
> > > > Do you have the "libc6-dev " library installed?
> > >
> > > Yes. libc6-dev 2.3.2.ds1-20 is installed.
> >
> > OK, seeing as no-one on this list can help, can anyone suggest where else
> > I could try? Is there some other mailing list more suited to this
> > question?



Reply to: