From owner-freebsd-stable Fri Dec 20 3:39:23 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83EBE37B401 for ; Fri, 20 Dec 2002 03:39:21 -0800 (PST) Received: from tiamat.ipv6.hackerheaven.org (ipv6.hackerheaven.org [80.126.0.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6A9843EE6 for ; Fri, 20 Dec 2002 03:39:19 -0800 (PST) (envelope-from coolvibe@hackerheaven.org) Received: from tiamat.ipv6.hackerheaven.org (localhost.ipv6.hackerheaven.org [127.0.0.1]) by tiamat.ipv6.hackerheaven.org (8.12.6/8.12.6) with ESMTP id gBKBcQ51080580 for ; Fri, 20 Dec 2002 12:38:26 +0100 (CET) (envelope-from coolvibe@tiamat.ipv6.hackerheaven.org) Received: (from coolvibe@localhost) by tiamat.ipv6.hackerheaven.org (8.12.6/8.12.6/Submit) id gBKBcQ6X080579 for freebsd-stable@FreeBSD.ORG; Fri, 20 Dec 2002 12:38:26 +0100 (CET) Date: Fri, 20 Dec 2002 12:38:25 +0100 From: Emiel Kollof To: freebsd-stable@FreeBSD.ORG Subject: Re: More information (was Re: pthread woes) Message-ID: <20021220113825.GA80454@hackerheaven.org> References: <20021220013445.GA75547@hackerheaven.org> <20021220020545.GC75547@hackerheaven.org> <200212200333.04276.coolvibe@hackerheaven.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212200333.04276.coolvibe@hackerheaven.org> X-Mailer: Mutt 1.3.23i (2001-10-09) X-Editor: Vim http://www.vim.org/ X-Info: http://www.hackerheaven.org/ X-Info2: http://www.cmdline.org/ X-Info3: http://www.coolvibe.org/ X-message-flag: Out of cheese error! User-Agent: Mutt/1.5.1i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.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