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

Re: Problems when linking against the profiled libc



Shlomi Fish <shlomif@techst02.technion.ac.il> writes:

> When invoking the following command:
> 
> gcc -Wall -o mptest -L. test_multi_parallel.o -lfcs -lm -pg -lc_p

I don't think you should use -lc_p explicitly. Using -pg in the link
command should link the right library

> to `__libc_internal_tsd_set@@GLIBC_2.0' is a loop

What version of glibc are you using? You would probably do well
upgrading from 2.0. I am not sure that this is what causes your
problem, but...

> I checked that the problem persists with the command:
> gcc test.c -pg -lc_p
> 
> Where test.c is the hello world program.

It works for me (checked on RH7.1, Linux 2.4.9-12):

$ cat > hello.c
#include <stdio.h>
int main(void)
{
        printf("Hello, world!\n");
        return 0;
}
$ gcc -pg hello.c -lc
$ a.out
Hello, world!
$ rpm -qa | grep glibc
glibc-2.2.4-19
glibc-common-2.2.4-19
glibc-profile-2.2.4-19
glibc-devel-2.2.4-19
$

Profiling works just fine, and I don't use -static explicitly.

-- 
Oleg Goldshmidt | ogoldshmidt@NOSPAM.computer.org 
"If it ain't broken, it has not got enough features yet."

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il