This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with librt.a - correction


Hi Daniel,
Yes, I must use static linking. I try your sugestion but I'm still
getting Invalid argument.

Thanks,
Guilherme

On 10/25/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Oct 25, 2007 at 03:23:14PM -0200, Guilherme Vilela wrote:
> > When I compile my program with gcc using dynamic libraries (gcc -o
> > test test.c -ltr) the function clock_gettime return 0 ("success"), but
> > when I compile the program using static libraries (gcc -o test test.c
> > -static -ltr) the function clock_gettime returns -1 ("Invalid
> > argument").
> >
> > Anybody knows why using librt.so the probram works but using librt.a
> > the program crashes?
>
> Don't use static linking.  This is one of many glibc problems that
> lurk there.
>
> If you must use static linking, try adding -lpthread explicitly.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]