From owner-freebsd-hackers Wed Apr 1 20:12:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA12619 for freebsd-hackers-outgoing; Wed, 1 Apr 1998 20:12:14 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.calweb.com (mail.calweb.com [208.131.56.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA12610 for ; Wed, 1 Apr 1998 20:12:11 -0800 (PST) (envelope-from fritcher@calweb.com) Received: by mail.calweb.com (8.8.6/8.8.6) with SMTP id UAA28122 for ; Wed, 1 Apr 1998 20:12:11 -0800 (PST) X-SMTP: helo web2.calweb.com from fritcher@calweb.com server fritcher@web2.calweb.com ip 208.131.56.52 Date: Wed, 1 Apr 1998 20:12:11 -0800 (PST) From: "Jason K. Fritcher" Reply-To: "Jason K. Fritcher" To: hackers@FreeBSD.ORG Subject: pthread question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I was experimenting with the pthread libraries earlier and I stumbled across an interesting problem. I was playing with one of the short test programs out of O'Reilly's Pthreads Programming, and decided to see how big a statically linked executable would be, but when running gcc with the -static flag, it complains that _pthread_join is an undefined symbol. If I compile the program without the -static flag it compiles just fine and runs normally. This is the exact command and the results that I get. [jkf@sys1:~/src/thread]$ gcc -g -D_THREAD_SAFE -lc_r -static -o blah blah.c blah.c:22: Undefined symbol `_pthread_join' referenced from text segment blah.c:23: Undefined symbol `_pthread_join' referenced from text segment I looked in libc_r.a and the uthread_join.o object is in there so, I really don't understand why this is happening. I've also searched through the questions/hackers list archive and can't find anything in there that relates to this. Thanx. :) -------------------------------------------------------------------------- Jason K. Fritcher Sr. Technical Support fritcher@calweb.com Calweb Internet Services http://www.calweb.com/ 916-641-9320 -------------------------------------------------------------------------- Bits/KeyID Date Fingerprint 2048/C6663B59 1997/07/11 D3678FFC53D4EA7E 19329F41812F0F58 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message