Date: Sun, 30 Jan 2000 01:47:25 -0900 From: Russ Pagenkopf <jnrp@uas.alaska.edu> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: ld-elf problem Message-ID: <38941695.305A442A@uas.alaska.edu> References: <3891FE4E.BBC95985@uas.alaska.edu> <38920C42.C8E098C0@slk.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38941695.305A442A>