Hi
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:
$ cat test.c
int main() {
return 0;
}
$ gcc test.c
/lib/libc.so.6: undefined reference to
[EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to
[EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
collect2: ld returned 1 exit status
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 found some similar reports in the mailing list archives and debian bug
databases, but they were either specific to other architectures or marked as
fixed by newer versions.
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?
What could be going wrong here, and what can I do to fix it?
Andrew Walbran
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]