[CMake] CMake Error: Unable to link function recv

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sun Jan 27 14:44:14 EST 2008


I recently updated my cmake installation from cvs and now I can't get
it to configure for 'Unix Makefiles'. I am now getting this error:

Performing Test curl_cv_recv
Performing Test curl_cv_recv - Failed
CMake Error: Unable to link function recv

I'm using the same cvs download, built with ms visual studio 8, to
configure a 'Unix Makefiles' build for a cygwin environment.

When I track the error message, I find that the following test in
'Utilities/cmcurl/CMake/OtherTests.cmake' is returning an empty
curl_cv_recv, which in turn causes the if/else structure end up in the

CHECK_C_SOURCE_COMPILES("recv(0, 0, 0, 0)" curl_cv_recv)
MESSAGE(STATUS "Inspect:${curl_cv_recv}")          # curl_cv_recv is empty
  MESSAGE(FATAL_ERROR "Unable to link function recv")

Now, I'm trying to debug the issue so that I can do some development
for the eclipse generator, but I get some weird behaviour. When I
start putting messages to print and inspect variables in the
CHECK_C_SOURCE_COMPILES, like below, they never print.

  MESSAGE(STATUS "Inspect: ${SOURCE} ${VAR}")      # never prints!!
  IF("${VAR}" MATCHES "^${VAR}$")

I'm guessing that this macro is implemented in the source code? and it
is not the one that is called from the

I would really appreciate some help with this...


PS - I'm also getting the following message at the beginning of the
configure stage, which I don't know if it has changed or if it was
previously the same:

The CXX compiler identification is unknown

More information about the CMake mailing list