[Libwebsockets] Failure to compile lws + libuv on MAC

Andy Green andy at warmcat.com
Fri Jul 29 18:57:50 CEST 2016



On July 29, 2016 11:29:17 PM GMT+08:00, Meir Yanovich <meiry242 at gmail.com> wrote:
>Sorry to say , i upgreaded to cmake 3.5.2 and upgraded to the latest
>lws
>lib from git
>But still getting cmake error , what can be the problem ?

I was just guessing what might be related, since I can't reproduce it.

>------------------------------------------
>
>The C compiler identification is AppleClang 7.3.0.7030031
>
>Check for working C compiler using: Xcode
>
>Check for working C compiler using: Xcode -- works
>
>Detecting C compiler ABI info
>
>Detecting C compiler ABI info - done
>
>Detecting C compile features
>
>Detecting C compile features - done
>
>CMAKE_TOOLCHAIN_FILE=''
>
>Found Git: /usr/bin/git
>
>Git commit hash: meiryanovich at meirs-Mac-mini.local-v2.0.0-118-g243e1a5
>
>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

Try removing the || LWS_WITH_ESP8266 on line 676 and see if that helps.  Since you're so far the only way to get the symptom, you're the only way to debug it.

-Andy

>
>----------------------------------------------
>
>
>here is some cmake log errors
>
>
>
>Ld Debug/cmTC_5c650 normal x86_64
>
>    cd
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp
>
>    export MACOSX_DEPLOYMENT_TARGET=10.11
>
>
>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
>-arch x86_64 -isysroot
>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
>-L/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/Debug
>-F/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/Debug
>-filelist
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_5c650.build/Objects-normal/x86_64/cmTC_5c650.LinkFileList
>-mmacosx-version-min=10.11 -Xlinker -no_deduplicate
>-Wl,-search_paths_first
>-Wl,-headerpad_max_install_names -Xlinker -dependency_info -Xlinker
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_5c650.build/Objects-normal/x86_64/cmTC_5c650_dependency_info.dat
>-o
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/Debug/cmTC_5c650
>
>Undefined symbols for architecture x86_64:
>
>  "_execvpe", referenced from:
>
>      _main in CheckFunctionExists.o
>
>ld: symbol(s) not found for architecture x86_64
>
>clang: error: linker command failed with exit code 1 (use -v to see
>invocation)
>
>
>** BUILD FAILED **
>
>
>
>The following build commands failed:
>
>Ld Debug/cmTC_5c650 normal x86_64
>
>(1 failure)
>
>
>
>
>Ld Debug/cmTC_5ddd4 normal x86_64
>
>    cd
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp
>
>    export MACOSX_DEPLOYMENT_TARGET=10.11
>
>
>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
>-arch x86_64 -isysroot
>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
>-L/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/Debug
>-F/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/Debug
>-filelist
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_5ddd4.build/Objects-normal/x86_64/cmTC_5ddd4.LinkFileList
>-mmacosx-version-min=10.11 -Xlinker -no_deduplicate
>-Wl,-search_paths_first
>-Wl,-headerpad_max_install_names -Xlinker -dependency_info -Xlinker
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_5ddd4.build/Objects-normal/x86_64/cmTC_5ddd4_dependency_info.dat
>-o
>/Users/meiryanovich/Documents/ws_game_server/libs/libwebsockets/git/libwebsockets/build/CMakeFiles/CMakeTmp/Debug/cmTC_5ddd4
>
>Undefined symbols for architecture x86_64:
>
>  "__snprintf", referenced from:
>
>      _main in CheckFunctionExists.o
>
>ld: symbol(s) not found for architecture x86_64
>
>clang: error: linker command failed with exit code 1 (use -v to see
>invocation)
>
>
>** BUILD FAILED **
>
>
>On Thu, Jul 28, 2016 at 2:10 PM, Andy Green <andy at warmcat.com> wrote:
>
>> On Thu, 2016-07-28 at 14:03 +0300, Meir Yanovich wrote:
>> > Strange how do you compile libuv?
>>
>>  - my machine: Fedora's distro libuv package (1.7.5)
>>
>>  - travis linux: some really old libuv from Debian (0.9 or so)
>>
>>  - travis mac: some old "bottle" package
>>
>> ==> Downloading
>https://downloads.sf.net/project/machomebrew/Bottles/li
>> buv-0.10.
>>
>#######################################################################
>> # 100.0%
>> ==> Pouring libuv-0.10.21.mavericks.bottle.1.tar.gz
>> 🍺  /usr/local/Cellar/libuv/0.10.21: 16 files, 340K
>>
>>  - appveyor: some recent (1.9?) version from libuv project windows
>> prebuilts
>>
>> There's no sign it's anything at all to do with libuv, it seems to do
>> with cmake.
>>
>> Why don't you try what I suggested already.
>>
>> -Andy
>>




More information about the Libwebsockets mailing list