[Libwebsockets] Failure to compile lws + libuv on MAC

Meir Yanovich meiry242 at gmail.com
Thu Jul 28 11:49:24 CEST 2016


Hello
i try to compile lws + libuv on MAC but im getting compilation errors
the libuv compiled just fine :

meirs-Mac-mini:lib meiryanovich$ file libuv.1.dylib
libuv.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64

using cmake 3.1

OSX el capitan 10.11.4 (15E65)

cc --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix

The command i run with cmake :

cmake .. -DLWS_WITH_LIBUV=ON
-DLWS_LIBUV_LIBRARIES="/Users/meiryanovich/Documents/ws_game_server/libs/libuv/lib"
-DLWS_LIBUV_INCLUDE_DIRS="/Users/meiryanovich/Documents/ws_game_server/libs/libuv/libuv-1.x/include"
-DLIB_SUFFIX=64

output :

-- The C compiler identification is AppleClang 7.3.0.7030031

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- CMAKE_TOOLCHAIN_FILE=''

-- Found Git: /usr/bin/git

fatal: Not a git repository (or any of the parent directories): .git

Git commit hash: meiryanovich at meirs-Mac-mini.local-

-- Performing Test LWS_HAVE_inline

-- Performing Test LWS_HAVE_inline - Success

-- Performing Test LWS_HAVE___inline__

-- Performing Test LWS_HAVE___inline__ - Success

-- Performing Test LWS_HAVE___inline

-- Performing Test LWS_HAVE___inline - Success

-- Looking for bzero

-- Looking for bzero - found

-- Looking for fork

-- Looking for fork - found

-- Looking for getenv

-- Looking for getenv - found

-- Looking for malloc

-- Looking for malloc - found

-- Looking for memset

-- Looking for memset - found

-- Looking for realloc

-- Looking for realloc - found

-- Looking for socket

-- Looking for socket - found

-- Looking for strerror

-- Looking for strerror - found

-- Looking for vfork

-- Looking for vfork - found

-- Looking for execvpe

-- Looking for execvpe - not found

-- Looking for getifaddrs

-- Looking for getifaddrs - found

-- Looking for snprintf

-- Looking for snprintf - found

-- Looking for _snprintf

-- Looking for _snprintf - not found

-- Looking for _vsnprintf

-- Looking for _vsnprintf - not found

-- Looking for getloadavg

-- Looking for getloadavg - found

-- Looking for dlfcn.h

-- Looking for dlfcn.h - found

-- Looking for fcntl.h

-- Looking for fcntl.h - found

-- Looking for in6addr.h

-- Looking for in6addr.h - not found

-- Looking for inttypes.h

-- Looking for inttypes.h - found

-- Looking for memory.h

-- Looking for memory.h - found

-- Looking for netinet/in.h

-- Looking for netinet/in.h - found

-- Looking for stdint.h

-- Looking for stdint.h - found

-- Looking for stdlib.h

-- Looking for stdlib.h - found

-- Looking for strings.h

-- Looking for strings.h - found

-- Looking for string.h

-- Looking for string.h - found

-- Looking for sys/prctl.h

-- Looking for sys/prctl.h - not found

-- Looking for sys/socket.h

-- Looking for sys/socket.h - found

-- Looking for sys/stat.h

-- Looking for sys/stat.h - found

-- Looking for sys/types.h

-- Looking for sys/types.h - found

-- Looking for unistd.h

-- Looking for unistd.h - found

-- Looking for vfork.h

-- Looking for vfork.h - not found

-- Looking for zlib.h

-- Looking for zlib.h - found

-- Looking for 4 include files stdlib.h, ..., float.h

-- Looking for 4 include files stdlib.h, ..., float.h - found

-- Performing Test LWS_HAVE_VISIBILITY

-- Performing Test LWS_HAVE_VISIBILITY - Success

CMake Error at CMakeLists.txt:676 (if):

  if given arguments:


    "UNIX" "||" "LWS_WITH_ESP8266"


  Unknown arguments specified





Error log :

Determining if the function execvpe exists failed with the following output:

Change Dir:
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp


Run Build Command:"/usr/bin/make" "cmTryCompileExec1280293769/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec1280293769.dir/build.make
CMakeFiles/cmTryCompileExec1280293769.dir/build

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_progress_report
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CMakeFiles
1

Building C object
CMakeFiles/cmTryCompileExec1280293769.dir/CheckFunctionExists.c.o

/usr/bin/cc  -DKEYWORD=__inline -DCHECK_FUNCTION_EXISTS=execvpe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
  -o CMakeFiles/cmTryCompileExec1280293769.dir/CheckFunctionExists.c.o   -c
/usr/local/Cellar/cmake/3.1.0/share/cmake/Modules/CheckFunctionExists.c

Linking C executable cmTryCompileExec1280293769

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec1280293769.dir/link.txt --verbose=1

/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=execvpe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
 CMakeFiles/cmTryCompileExec1280293769.dir/CheckFunctionExists.c.o  -o
cmTryCompileExec1280293769

Undefined symbols for architecture x86_64:

  "_execvpe", referenced from:

      _main in CheckFunctionExists.c.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see
invocation)

make[1]: *** [cmTryCompileExec1280293769] Error 1

make: *** [cmTryCompileExec1280293769/fast] Error 2



Determining if the function _snprintf exists failed with the following
output:

Change Dir:
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp


Run Build Command:"/usr/bin/make" "cmTryCompileExec149758955/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec149758955.dir/build.make
CMakeFiles/cmTryCompileExec149758955.dir/build

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_progress_report
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CMakeFiles
1

Building C object
CMakeFiles/cmTryCompileExec149758955.dir/CheckFunctionExists.c.o

/usr/bin/cc  -DKEYWORD=__inline -DCHECK_FUNCTION_EXISTS=_snprintf -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
  -o CMakeFiles/cmTryCompileExec149758955.dir/CheckFunctionExists.c.o   -c
/usr/local/Cellar/cmake/3.1.0/share/cmake/Modules/CheckFunctionExists.c

Linking C executable cmTryCompileExec149758955

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec149758955.dir/link.txt --verbose=1

/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=_snprintf -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
 CMakeFiles/cmTryCompileExec149758955.dir/CheckFunctionExists.c.o  -o
cmTryCompileExec149758955

Undefined symbols for architecture x86_64:

  "__snprintf", referenced from:

      _main in CheckFunctionExists.c.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see
invocation)

make[1]: *** [cmTryCompileExec149758955] Error 1

make: *** [cmTryCompileExec149758955/fast] Error 2



Determining if the function _vsnprintf exists failed with the following
output:

Change Dir:
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp


Run Build Command:"/usr/bin/make" "cmTryCompileExec84506801/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec84506801.dir/build.make
CMakeFiles/cmTryCompileExec84506801.dir/build

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_progress_report
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CMakeFiles
1

Building C object
CMakeFiles/cmTryCompileExec84506801.dir/CheckFunctionExists.c.o

/usr/bin/cc  -DKEYWORD=__inline -DCHECK_FUNCTION_EXISTS=_vsnprintf
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
  -o CMakeFiles/cmTryCompileExec84506801.dir/CheckFunctionExists.c.o   -c
/usr/local/Cellar/cmake/3.1.0/share/cmake/Modules/CheckFunctionExists.c

Linking C executable cmTryCompileExec84506801

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec84506801.dir/link.txt --verbose=1

/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=_vsnprintf -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
 CMakeFiles/cmTryCompileExec84506801.dir/CheckFunctionExists.c.o  -o
cmTryCompileExec84506801

Undefined symbols for architecture x86_64:

  "__vsnprintf", referenced from:

      _main in CheckFunctionExists.c.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see
invocation)

make[1]: *** [cmTryCompileExec84506801] Error 1

make: *** [cmTryCompileExec84506801/fast] Error 2



Determining if the include file in6addr.h exists failed with the following
output:

Change Dir:
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp


Run Build Command:"/usr/bin/make" "cmTryCompileExec3126646753/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec3126646753.dir/build.make
CMakeFiles/cmTryCompileExec3126646753.dir/build

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_progress_report
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CMakeFiles
1

Building C object
CMakeFiles/cmTryCompileExec3126646753.dir/CheckIncludeFile.c.o

/usr/bin/cc  -DKEYWORD=__inline -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
  -o CMakeFiles/cmTryCompileExec3126646753.dir/CheckIncludeFile.c.o   -c
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c

/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10:
fatal error: 'in6addr.h' file not found

#include <in6addr.h>

         ^

1 error generated.

make[1]: ***
[CMakeFiles/cmTryCompileExec3126646753.dir/CheckIncludeFile.c.o] Error 1

make: *** [cmTryCompileExec3126646753/fast] Error 2



Determining if the include file sys/prctl.h exists failed with the
following output:

Change Dir:
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp


Run Build Command:"/usr/bin/make" "cmTryCompileExec3534415985/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec3534415985.dir/build.make
CMakeFiles/cmTryCompileExec3534415985.dir/build

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_progress_report
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CMakeFiles
1

Building C object
CMakeFiles/cmTryCompileExec3534415985.dir/CheckIncludeFile.c.o

/usr/bin/cc  -DKEYWORD=__inline -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
  -o CMakeFiles/cmTryCompileExec3534415985.dir/CheckIncludeFile.c.o   -c
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c

/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10:
fatal error: 'sys/prctl.h' file not found

#include <sys/prctl.h>

         ^

1 error generated.

make[1]: ***
[CMakeFiles/cmTryCompileExec3534415985.dir/CheckIncludeFile.c.o] Error 1

make: *** [cmTryCompileExec3534415985/fast] Error 2



Determining if the include file vfork.h exists failed with the following
output:

Change Dir:
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp


Run Build Command:"/usr/bin/make" "cmTryCompileExec2021582694/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec2021582694.dir/build.make
CMakeFiles/cmTryCompileExec2021582694.dir/build

/usr/local/Cellar/cmake/3.1.0/bin/cmake -E cmake_progress_report
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CMakeFiles
1

Building C object
CMakeFiles/cmTryCompileExec2021582694.dir/CheckIncludeFile.c.o

/usr/bin/cc  -DKEYWORD=__inline -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
  -o CMakeFiles/cmTryCompileExec2021582694.dir/CheckIncludeFile.c.o   -c
/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c

/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/libwebsockets-master/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10:
fatal error: 'vfork.h' file not found

#include <vfork.h>

         ^

1 error generated.

make[1]: ***
[CMakeFiles/cmTryCompileExec2021582694.dir/CheckIncludeFile.c.o] Error 1

make: *** [cmTryCompileExec2021582694/fast] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160728/76e438ab/attachment.html>


More information about the Libwebsockets mailing list