From owner-freebsd-hackers Wed Apr 1 20:47:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA16960 for freebsd-hackers-outgoing; Wed, 1 Apr 1998 20:47:51 -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 UAA16954 for ; Wed, 1 Apr 1998 20:47:46 -0800 (PST) (envelope-from fritcher@calweb.com) Received: by mail.calweb.com (8.8.6/8.8.6) with SMTP id UAA04667 for ; Wed, 1 Apr 1998 20:47:46 -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:47:46 -0800 (PST) From: "Jason K. Fritcher" To: hackers@FreeBSD.ORG Subject: Re: pthread question In-Reply-To: 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 On Wed, 1 Apr 1998, Jason K. Fritcher wrote: > 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. Oh, also, I am doing this on a 2.2.6-STABLE system that was cvsuped about a week ago. -------------------------------------------------------------------------- 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