Glenn Fowler wrote:
> On Tue, 28 Mar 2006 06:56:09 +0200 Roland Mainz wrote:
> > Glenn Fowler wrote:
> > > > > egrep 'socket|net' $INSTALLROOT/src/cmd/ksh93/FEATURE/poll
> > > ^^^^^^^
> > >
> > > this file is in the build directory tree ($INSTALLROOT), not the src
> >
> > Yes... sorry... I picked the wrong one... ;-(
> > -- snip --
> > % egrep 'socket|net'
> > ~/ksh93/build1/arch/sol10.i386/src/cmd/ksh93/FEATURE/poll
> > #define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
> > #define _sys_socket 1 /* #include <sys/socket.h> ok */
> > -- snip --
>
> > |_lib_socket| is not set, likely causing all the trouble... ;-(
>
> right
> socket() not in libc
> solaris is still in the 70's on this one
Well, maybe one argument could be that most small applications do not
need networking... but I do not know the exact argumentation.
Maybe Casper Dik can explain why libsocket/libnsl were not integrated
into libc yet (other stuff such as threading support was integrated for
Solaris 10 - why didn't that happen with networking, too ?) ...
> is it in -lsocket?
> the build should have picked that up
> snarf the iffe poll feature line from the build logs
> grep 'iffe.*features/poll' $INSTALLROOT/lib/package/gen/make.out*
This results in:
-- snip --
% find . -name make.out
./arch/sol10.i386/lib/package/gen/make.out
% grep 'iffe.*features/poll' ./arch/sol10.i386/lib/package/gen/make.out
+ iffe -v -c cc -g -xs -Xa -xstrconst -z combreloc -xildoff ref
-L. -L/home/test001/ksh93/build1/arch/sol10.i386/lib
-I/home/test001/ksh93/build1/arch/sol10.i386/include/ast
-I/home/test001/ksh93/build1/arch/sol10.i386/include
/home/test001/ksh93/build1/arch/sol10.i386/lib/libdll.a
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm
/home/test001/ksh93/build1/arch/sol10.i386/lib/libcmd.a
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm -lm
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm : run
/home/test001/ksh93/build1/src/cmd/ksh93/features/poll
-- snip --
Full output of "iffe" looks like this:
-- snip --
+ cc -g -xs -Xa -xstrconst -z combreloc -xildoff -I.
-I/home/test001/ksh93/build1/src/cmd/ksh93 -Iinclude
-I/home/test001/ksh93/buil
d1/src/cmd/ksh93/include
-I/home/test001/ksh93/build1/arch/sol10.i386/include/ast
-DSHOPT_MULTIBYTE -DSHOPT_HISTEXPAND -DKSHELL -DSH
OPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -D_BLD_shell -DSHOPT_OO
-DSHOPT_DYNAMIC -c /home/test001/ksh93/build1/src/cmd/ksh93/
bltins/read.c
+ iffe -v -c cc -g -xs -Xa -xstrconst -z combreloc -xildoff ref
-L. -L/home/test001/ksh93/build1/arch/sol10.i386/lib -I/home/t
est001/ksh93/build1/arch/sol10.i386/include/ast
-I/home/test001/ksh93/build1/arch/sol10.i386/include
/home/test001/ksh93/build1/arch
/sol10.i386/lib/libdll.a
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm
/home/test001/ksh93/build1/arch/sol10.i386/lib/
libcmd.a /home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm -lm
/home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a -lm : run
/home/test001/ksh93/build1/src/cmd/ksh93/features/poll
iffe: test: is sys/types.h a header ... yes
iffe: test: is /home/test001/ksh93/build1/arch/sol10.i386/lib/libdll.a a
library ... yes
iffe: test: is /home/test001/ksh93/build1/arch/sol10.i386/lib/libast.a a
library ... yes
iffe: test: is -lm a library ... yes
iffe: test: is /home/test001/ksh93/build1/arch/sol10.i386/lib/libcmd.a a
library ... yes
iffe: test: is poll.h a header ... yes
iffe: test: is socket.h a header ... no
iffe: test: is netinet/in.h a header ... yes
iffe: test: is sys/poll.h a header ... yes
iffe: test: is sys/socket.h a header ... yes
iffe: test: is sys/netinet/in.h a header ... no
iffe: test: is select a library function ... yes
iffe: test: is poll a library function ... yes
iffe: test: is socket a library function ... no
iffe: test: is htons a library function ... yes
iffe: test: is htonl a library function ... yes
iffe: test: is time.h a header ... yes
iffe: test: is sys/time.h a header ... yes
iffe: test: is sys/times.h a header ... yes
iffe: test: is stddef.h a header ... yes
iffe: test: is stdlib.h a header ... yes
iffe: test: is sys/select.h a header ... yes
iffe: test: is fd_set a type or typedef ... yes
iffe: test: use socketpair() for peekable pipe() ... no
iffe: test: /dev/fd/N handles socketpair() ... no
iffe: test: fchmod() after socketpair() shutdown() ... no
iffe: test: cat{ ... }end ... yes
-- snip --
BTW: AFAIK you do always need "-lsocket -lnsl" and not only "-lsocket"
when linking applications which use |*socket*()|-functions...
I have attached the full "make.out" log file as
"ksh93_arch_sol10_i386_lib_package_gen_make.out.gz" ...
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksh93_arch_sol10_i386_lib_package_gen_make.out.gz
Type: application/x-gzip
Size: 40830 bytes
Desc: not available
URL:
<http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/attachments/20060330/667e1d31/attachment.bin>