Date: Thu, 25 Mar 1999 10:04:29 -0800 (PST) From: Gary Kline <kline@tao.thought.org> To: okazaki@be.to (OKAZAKI Tetsurou) Cc: freebsd-ports@freebsd.org Subject: Re: xflame missing nanosleep in 2.2.8 Message-ID: <199903251804.KAA24298@tao.thought.org> In-Reply-To: <199903250751.QAA15067@dune2.infonia.ne.jp> from OKAZAKI Tetsurou at "Mar 25, 99 04:49:20 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
According to OKAZAKI Tetsurou: > At Wed, 24 Mar 1999 15:53:02 -0800 (PST), > Gary Kline <kline@tao.thought.org> wrote: > > > > According to OKAZAKI Tetsurou: > > > So maybe you have to pass the flag '-pthread' to the compiler. > > > > > > > No, because it (nanosleep()) is missing from existing libraries. > > FYI, the libc_r is installed in /usr/lib since 2.2.7-RELEASE. > If you have upgraded OS to 2.2.8 from 2.2.6 or earlier by just > `make world` at the source tree, libc_r is not installed because > the line of -DWANT_LIBC_R is commented out in /etc/make.conf. > To install libc_r, please read the 'INSTALLATION' section of pthread(3). > > > I could back-port this, but that's too much mousing around-- > > cutting and pasting. :-) > > I tried building xflame on 2.2.8-RELEASE. > > bash$ make configure build > [snip configure outputs] > ===> Building for xflame-1.1.1 > cc -O2 -I/usr/X11R6/include -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO -c xflame.c -o xflame.o > rm -f xflame > cc -o xflame xflame.o -O2 -L/usr/X11R6/lib -lXext -lX11 -lxpg4 > xflame.o: Undefined symbol `_nanosleep' referenced from text segment > xflame.o: Undefined symbol `_nanosleep' referenced from text segment > *** Error code 1 > > Stop. > [snip the rest of error messages.] > > Then, cd to the ${WRKSRC}.... > > bash$ make CC="cc -pthread" all > rm -f xflame > cc -pthread -o xflame xflame.o -O2 -L/usr/X11R6/lib -lXext -lX11 -lxpg4 > bash$ ldd xflame > xflame: > -lXext.6 => /usr/X11R6/lib/libXext.so.6.3 (0x20021000) > -lX11.6 => /usr/X11R6/lib/libX11.so.6.1 (0x2002a000) > -lxpg4.2 => /usr/lib/libxpg4.so.2.0 (0x200bb000) > -lc_r.3 => /usr/lib/libc_r.so.3.0 (0x200be000) > bash$ ./xflame > > Wow:-). > > However, I don't know an easy way to pass the '-pthread' flag > in the case when a port Makefile is marked as USE_IMAKE=yes. > > Am I missing the context of your question? > No, you have it correctly; and your pointer to `man 3 pthreads' and the INSTALLATION sections makes it all the clearer. Right now I'm wondering how much faster, if any, the nanosleep() code will make the app run. Have to try and see. So far I've only run xflame with the code commented, and in geometries of any size (say 250x200 or so) the graphic is fairly slow. Yet to be tried! thank you, gary > -- Gary D. Kline kline@tao.thought.org Public service uNix To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903251804.KAA24298>