[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SVGALIB on Thinkpad
Dennis Payne wrote:
> > Which doesn't seem right. Now, I've no objection to messing around
> > building the X11 link lines, but I'm not sure I should and the FAQ
> > doesn't say I should have to. Especially since SDL depends on threads,
> > but supplies the thread link, but not the X11 link it also depends on.
> Actually if you don't link to pthreads and another library uses it,
> your program crashes under linux anyway. No one has told me why but I
> heard about it on the OmniOrb mailing list.
There was a long-standing bug in the Linux linker that caused you to need
to explicitly link with pthreads if you linked to another library that
needed pthreads - even if that library had all the necessary references
to avoid that need.
This is particularly evidenced with the Mesa library - which needs to be
linked with pthreads even if you don't otherwise use it.
I believe that recent 'ld' versions have fixed the problem - but it's
probably still a good idea to explicitly link your application against
pthreads just in case someone with an outdated 'ld' tries to build your
The effect of the error is a linker error that can appear *either* at
link time *or* when your program is being initially executed.
This bug was old enough to have made it into a Linux fortune cookie!!
----------------------------- Steve Baker -------------------------------
Mail : <email@example.com> WorkMail: <firstname.lastname@example.org>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net