Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2002 12:38:25 +0100
From:      Emiel Kollof <coolvibe@hackerheaven.org>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: More information (was Re: pthread woes)
Message-ID:  <20021220113825.GA80454@hackerheaven.org>
In-Reply-To: <200212200333.04276.coolvibe@hackerheaven.org>
References:  <20021220013445.GA75547@hackerheaven.org> <20021220020545.GC75547@hackerheaven.org> <200212200333.04276.coolvibe@hackerheaven.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Emiel Kollof (coolvibe@hackerheaven.org) wrote:
> On Friday 20 December 2002 03:05, Emiel Kollof wrote:
> 
> > % gcc -o gtktest gtktest.c `gtk12-config --libs` `gtk12-config --cflags`
> > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_signal'
> > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stub_'
> > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcast'
> > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stub_'
> 
> It seems that XThrStub is causing problems. Even after a recompile of 
> XFree86-4-libraries the problems still occur. What do I do now? I'm stuck.

I filed a pr with number 46387. Even forcibly compiling stuff with
-pthread doesn't solve my problems. It seems that there is something
wicked is going on in XThrStub. When looking at the source, I find
strange #pragma preprocessor commands of which I'm not sure what they
are supposed to do. They involve _Xthr_zero_stub_ and Xthr_self_stub_
and somehow they don't seem to be present in the library symbols.

I googled around for a bit, and it seems that this has happened before
and was a problem in XFree86-4. It's not really clear what the problem
was, but it seems to have resurfaced.

Is nobody seeing what I'm seeing, or am I alone here?

Please, anyone try this snippet of code: (yes, it's the same as I
submitted in the PR)

--- test.c ---

char XOpenDisplay{};

int main() {
	XOpenDisplay();
	return 0;
}
--- end test.c ---

Compile as follows:

gcc -o test test.c -L /usr/X11R6/lib -pthread -lX11

If you see this:

azazel# gcc -o test test.c -L /usr/X11R6/lib -pthread -lX11
/usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stub_'
/usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stub_'

your system has the same problems as I do. Also, somehow I doubt that
*every* X11 program needs -pthread or -lc_r. 

Cheers,
Emiel
-- 
Miss, n.:
	A title with which we brand unmarried women to indicate that
they are in the market.
		-- Ambrose Bierce, "The Devil's Dictionary"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021220113825.GA80454>