From owner-freebsd-questions Mon Jan 31 2:45:40 2000 Delivered-To: freebsd-questions@freebsd.org Received: from vali.uas.alaska.edu (vali.uas.alaska.edu [137.229.150.18]) by hub.freebsd.org (Postfix) with SMTP id 8A3F614EEB for ; Mon, 31 Jan 2000 02:45:37 -0800 (PST) (envelope-from jnrp@uas.alaska.edu) Received: from 69-pm5.jdc.alaska.net [209.112.137.69] (HELO uas.alaska.edu) by vali.uas.alaska.edu (AltaVista Mail V2.0r/2.0r BL25r listener) id 0000_0068_3895_67b9_284f; Mon, 31 Jan 2000 01:45:13 -0900 Message-ID: <38941695.305A442A@uas.alaska.edu> Date: Sun, 30 Jan 2000 01:47:25 -0900 From: Russ Pagenkopf Reply-To: russ.pagenkopf@uas.alaska.edu X-Mailer: Mozilla 4.08 (Macintosh; I; PPC) MIME-Version: 1.0 To: FreeBSD Questions Subject: Re: ld-elf problem References: <3891FE4E.BBC95985@uas.alaska.edu> <38920C42.C8E098C0@slk.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Back again... Douglas Brian Quayle wrote: > > pthread_attr_setscope() is a function used by Posix threads. I am guessing > you do not have Pthread support compiled into your kernel, though I could > be wrong. You're right, I didn't, so I followed the instructions below. > In your kernel configuration file, do you have the following three lines? > > options "P1003_1B" > options "_KPOSIX_PRIORITY_SCHEDULING" > options "_KPOSIX_VERSION=199309L" > > Try adding these three lines and rebuilding the kernel > (config -r KERNEL; cd ../../compile/KERNEL; make depend; make; make > install). Ok, did this, and ... One more time I get, /usr/libexec/ld-elf.so.1: ./CGServer: Undefined symbol "pthread_attr_setscope" when I try to run the program. So a little more digging through the list archives and I find this, "we already have threading support (minus pthread cancel) compile/link with gcc -pthread" So a little digging through the man pages for cc (ie. gcc) gets me this, "-pthread Link a user-threaded process against libc_r instead of libc. Objects linked into user-threaded process- es should be compiled with -D_THREAD_SAFE." So, go back and "make depend" and "make" and peruse the screen output and I see several different options added to cc which brings me to the next question. How do I add the -pthread option when I'm making the kernel? I've dug through the Makefiles and I can't figure out how to do this. Thanks for the help, Russ Pagenkopf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message