bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sockets module and Solaris


From: Simon Josefsson
Subject: Re: sockets module and Solaris
Date: Mon, 29 Sep 2008 09:45:05 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Hi Simon,
>
> Here are two change requests regarding the 'sockets' module:
>
> 1) Currently it adds the library option -lws2_32 to LIBS. But I don't want
>    to link all gettext tools against this libray, just because one program
>    (test-sys_select) needs to link with it. So I propose to introduce a
>    variable, LIBSOCKET, with which programs that use sockets need to link.

Hi Bruno.  Fine with me.

> 2) On Solaris, the test-sys_select program fails to link:
>
>    /bin/bash ../libtool --tag=CC --preserve-dup-deps   --mode=link cc 
> -xarch=v9 -O  -g    -o test-sys_select test-sys_select.o libtests.a 
> ../gnulib-lib/libgettextlib.la libtests.a  
>    libtool: link: cc -xarch=v9 -O -g -o .libs/test-sys_select 
> test-sys_select.o  libtests.a ../gnulib-lib/.libs/libgettextlib.so 
> -L/opt/gnu/lib 
> /home/haible/gettext-0.18-pre2-louvre/gettext-tools/intl/.libs/libintl.so -lc 
> -lxml2 /opt/gnu/lib/libiconv.so -ltermcap libtests.a -R/opt/gnu/lib
>    ild: (undefined symbol) bind -- referenced in the text segment of 
> test-sys_select.o
>    ild: (undefined symbol) connect -- referenced in the text segment of 
> test-sys_select.o
>    ild: (undefined symbol) shutdown -- referenced in the text segment of 
> test-sys_select.o
>    ild: (undefined symbol) accept -- referenced in the text segment of 
> test-sys_select.o
>    ild: (undefined symbol) setsockopt -- referenced in the text segment of 
> test-sys_select.o
>    ild: (undefined symbol) listen -- referenced in the text segment of 
> test-sys_select.o
>    ild: (undefined symbol) socket -- referenced in the text segment of 
> test-sys_select.o
>    *** Error code 5
>    make: Fatal error: Command failed for target `test-sys_select'
>
>    There are two socket libraries on Solaris: libsocket [1][2] and libxnet 
> [3].
>    The normal one appears to be libsocket. libxnet depends on libsocket.
>    Therefore I think the right one to use is libsocket.

Ah, yes, I remember this.  The module was never tested on Solaris
before.  Btw, possibly you'll need -lnsl too?  I recall that the idiom
to get anything moderately complex to build on Solaris was to add -lnsl
-lsockets.

> Here is a proposed patch (assuming it passes testing on Solaris and mingw).
> OK to commit?

Please do.

Thanks,
Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]