Date: Sat, 21 Dec 2002 10:51:36 +0000 (GMT) From: ranjit@rugragging.com To: "freebsd-stable@FreeBSD.ORG" <freebsd-stable@FreeBSD.ORG> Subject: Re: More information (was Re: pthread woes) Message-ID: <1040467896.3e0447b80b734@webmail.rugragging.com> In-Reply-To: <20021220113825.GA80454@hackerheaven.org> References: <20021220013445.GA75547@hackerheaven.org> <20021220020545.GC75547@hackerheaven.org> <200212200333.04276.coolvibe@hackerheaven.org> <20021220113825.GA80454@hackerheaven.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Emiel,
I tried and it failed, I think there's a syntax error in the first line. When I
change it to:
char XOpenDisplay() {};
it works fine:
-rwxr-xr-x 1 ranjit wheel 4281 Dec 21 11:41 test
bash-2.05b$ uname -a
FreeBSD drommen.internal.com 4.7-STABLE FreeBSD 4.7-STABLE #4: Tue Dec 17
14:43:37 CET 2002 root@drommen.internal.com:/usr/obj/usr/src/sys/DESKTOP i386
Hope this helps.
Regards,
Bruce
Quoting Emiel Kollof <coolvibe@hackerheaven.org>:
> * 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
>
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?1040467896.3e0447b80b734>
