Article delegate-en/3296 of [1-4224] on the server localhost:7119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3293@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: linux (CentOS/RHEL) socket problem
08 Jun 2006 23:58:53 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project

Hi,

In message <_A3293@delegate-en.ML_> on 06/09/06(03:42:34)
you "Jon Slenk" <p3egabdyi-mxhgu42pb33w.ml@delegate.org> wrote:
 |I am trying to build DeleGate on Centos 4.3 x86. During the configuration it 
 |tries to link and cannot find "socket()". I get the error output below. 
 |However, there is no /usr/lib/libsocket.so (there *is* /usr/lib/libnsl.so) 
 |and I think modern Linux distributions don't support -lsocket. But I don't 
 |know enough about what to do. Perhaps I am missing a version of the standard 
 |C/++ library that contains socket support?

The checking is for non-C++ compilers on ancient Unixes.  It is in
"./maker/mkmake.c" which is wrapped with

  #ifndef __cplusplus
  ...
  #endif

so I'm not sure why it is activated.
It can happen if you once compiled it as C, while you are compiling it
as C++ now.  For example, it can reproduced as this:

 % make                ## possibly with CC=gcc or CC=cc
 % rm lib/libsubst.a
 % make CC=g++

DeleGate creates and use "mkmake.exe" from "./make/mkmake.c" as a
wrappper of make to cope with multiple platforms.  It is not removed
with "make clean" so it must be removed explicitly when you switch
CC from C to C++.

 % rm mkmake.exe

Cheers,
Yutaka
--
  D G   Yutaka Sato <pfqcabdyi-mxhgu42pb33w.ml@delegate.org> http://delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


 |##ERROR## ***
 |##ERROR## g++ -c -o _.o  _.c
 |##ERROR## _.c: In function `int main()':
 |##ERROR## _.c:1: error: `socket' was not declared in this scope
 |##ERROR##
 |##ERROR## ***
 |##ERROR## g++ _.o -L../lib ../lib/libresolvy.a  ../lib/libteleport.a 
 |../lib/libmd5.a .\
 |./lib/libcfi.a ../lib/library.a ../lib/libmimekit.a 
 |../lib/libfsx.a -lnsl -ldl -lutil \
 |-lstdc++ ../lib/library.a -lc
 |##ERROR## _.c: In function `int main()':
 |##ERROR## _.c:1: error: `socket' was not declared in this scope
 |##ERROR## g++: _.o: No such file or directory
 |##ERROR##
 |FATAL!!!!: Socket library should be given.
 |FATAL!!!!: You may have to specify
 |FATAL!!!!:     LIBS=-lnsl -lsocket
 |FATAL!!!!:     LIBS=WSOCK32.LIB
 |FATAL!!!!:     ... 

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V