Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 16:49:20 +0900
From:      OKAZAKI Tetsurou <okazaki@be.to>
To:        kline@tao.thought.org
Cc:        freebsd-ports@freebsd.org
Subject:   Re: xflame missing nanosleep in 2.2.8
Message-ID:  <199903250751.QAA15067@dune2.infonia.ne.jp>
In-Reply-To: In your message of "Wed, 24 Mar 1999 15:53:02 -0800 (PST)" <199903242353.PAA17150@tao.thought.org>
References:  <199903242121.GAA12980@dune2.infonia.ne.jp> <199903242353.PAA17150@tao.thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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? 

Tetsurou.


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?199903250751.QAA15067>