cocos2d / cocos2d-x-3rd-party-libs-src

Dependencies of cocos2d-x.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to compile libwebsockets on mac

PatriceJiang opened this issue · comments

build output

-- The C compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /usr/bin/xcrun
-- Check for working C compiler: /usr/bin/xcrun -- broken
CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/usr/bin/xcrun"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/mac-x86_64/websockets/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/make" "cmTC_9d37a/fast"
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_9d37a.dir/build.make CMakeFiles/cmTC_9d37a.dir/build
    Building C object CMakeFiles/cmTC_9d37a.dir/testCCompiler.c.o
    /usr/bin/xcrun cc   -isysroot;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk;-mmacosx-version-min=10.7;-DMACOSX_DEPLOYMENT_TARGET=10.7;-m64;-O3;-DNDEBUG;-I/Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/install-mac/x86_64/include;-O3;-DNDEBUG  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk   -o CMakeFiles/cmTC_9d37a.dir/testCCompiler.c.o   -c /Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/mac-x86_64/websockets/CMakeFiles/CMakeTmp/testCCompiler.c
    clang: error: argument to '-isysroot' is missing (expected 1 value)
    clang: error: no input files
    /bin/sh: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk: is a directory
    /bin/sh: -mmacosx-version-min=10.7: command not found
    /bin/sh: -DMACOSX_DEPLOYMENT_TARGET=10.7: command not found
    /bin/sh: -m64: command not found
    /bin/sh: -O3: command not found
    /bin/sh: -DNDEBUG: command not found
    /bin/sh: -I/Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/install-mac/x86_64/include: No such file or directory
    /bin/sh: -O3: command not found
    /bin/sh: -DNDEBUG: command not found
    make[2]: *** [CMakeFiles/cmTC_9d37a.dir/testCCompiler.c.o] Error 127
    make[1]: *** [cmTC_9d37a/fast] Error 2
  

bad toolchain.cmake generated

set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_C_FLAGS  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7 -m64 -O3 -DNDEBUG -I/Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/install-mac/x86_64/include -O3 -DNDEBUG)
set(CMAKE_CXX_FLAGS  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7 -m64 -O3 -DNDEBUG -I/Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/install-mac/x86_64/include -O3 -DNDEBUG)
set(CMAKE_LD_FLAGS  -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DMACOSX_DEPLOYMENT_TARGET=10.7 -m64 -L/Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/install-mac/x86_64/lib)
set(CMAKE_AR ar CACHE FILEPATH Archiver)
set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk)
set(CMAKE_C_COMPILER xcrun cc)
set(CMAKE_CXX_COMPILER xcrun c++)
set(CMAKE_FIND_ROOT_PATH /Users/cocos/Github/cocos2d-x-3rd-party-libs-src/contrib/install-mac/x86_64)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)