Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: configure failure on Solaris9

From: Steven M. Schweda <>
Date: Wed, 23 Jun 2010 11:07:25 -0500 (CDT)

From: "Alona Rossen" <>

> I submitted config.log yesterday. I re-submit it in this email.

   That's easier than answering a couple of simple questions? Ok. The
curl version was somewhere in the first hundred lines, but it's still
not clear (to me) which (unreleased) 7.20.1 kit you used. But, it may
not matter much.

> > $> CC -V=20
> > CC: Sun C++ 5.5 2003/03/12=20
> Is someone using "CC" (not "cc")?

> ./configure CC=CC [...]

   Why use a C++ compiler ("CC") instead of a C compiler ("cc")?

> [...]
> configure:14438: checking if compiler is SunPro C
> configure:14459: CC -E conftest.c
> configure:14459: $? = 0
> configure:14491: result: no
> [...]

Around here (curl-7.21.1-20100623, "CC=cc ./configure"):

configure:14458: checking if compiler is SunPro C
configure:14479: cc -E conftest.c
configure:14479: $? = 0
configure:14501: result: yes

I can imagine that an unrecognized compiler might cause more problems
than a recognized compiler. Better yet:

> [...]
> configure:17524: CC -o conftest -ldl conftest.c -lsocket -lnsl >&5
> Undefined first referenced
> symbol in file
> int connect(int,void*,int) conftest.o
> ld: fatal: Symbol referencing errors. No output written to conftest
> [...]

Around here:

configure:17505: checking for connect in libraries
configure:17532: cc -o conftest -s -xO2 conftest.c -lnsl >&5
Undefined first referenced
 symbol in file
connect conftest.o
ld: fatal: Symbol referencing errors. No output written to conftest
configure:17532: $? = 1

and, later:

> [...]
configure:24778: checking if connect can be linked
configure:24799: cc -o conftest -s -xO2 conftest.c -lldap -lsocket
 -lnsl -lz >&5
configure:24799: $? = 0
configure:24801: result: yes
configure:24816: checking if connect is prototyped
configure:24829: result: yes
configure:24845: checking if connect is compilable
configure:24866: cc -c -s -xO2 conftest.c >&5
configure:24866: $? = 0
configure:24868: result: yes
configure:24883: checking if connect usage allowed
configure:24886: result: yes
configure:24896: checking if connect might be used
configure:24902: result: yes
> [...]

   I'm no C++ expert, but isn't it interesting that the missing symbol

> symbol in file
> int connect(int,void*,int) conftest.o

is not "connect", but rather "int connect(int,void*,int)"? I'd guess
that this is the result of using a C++ compiler on code which was
written for a C compiler (only).

> [...]
> configure:17524: $? = 1
> configure: failed program was:
> [...]
> | #ifndef HAVE_WINDOWS_H
> | int connect(int, void*, int);
> | #endif
> [...]

Perhaps a well-written test program would use the usual C++ bracket
code, like, say:

#ifdef __cplusplus
    extern "C" {


#ifdef __cplusplus

around its function prototypes, but I'd guess that this would be more
work than it would be worth. Especially when most people simply use a C
compiler for C code, not a C++ compiler. (Perhaps you should try that.)


   Steven M. Schweda sms_at_antinode-info
   382 South Warwick Street (+1) 651-699-9818
   Saint Paul MN 55105-2547
List admin:
Received on 2010-06-23

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET