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

Dependencies of cocos2d-x.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to build websocket lib for ssl support?

Neimd opened this issue · comments

commented

I changed flag of 'DLWS_WITH_SSL' from 0 to 1 and proceed to build, which to support for ssl in websocket. But I failed to build because of error.

I got few question.

  • Is there anything else we need to do to support ssl without changing flag of 'DLWS_WITH_SSL'?
  • I got below error messge while I was doing bulind process. How to fix this error?

build command : ./build.sh -p=ios --libs=websockets
build error :
-- Configuring incomplete, errors occurred!
See also "/Users/kks/_works/cocos2d-x-3rd-party-libs-src/contrib/ios-x86_64/websockets/CMakeFiles/CMakeOutput.log".
See also "/Users/kks/_works/cocos2d-x-3rd-party-libs-src/contrib/ios-x86_64/websockets/CMakeFiles/CMakeError.log".
make: *** [.websockets] Error 1
/Users/kks/_works/cocos2d-x-3rd-party-libs-src/build
create folder for library with specify arch. ios/websockets/prebuilt/x86_64
cp: /Users/kks/_works/cocos2d-x-3rd-party-libs-src/build/../contrib/install-ios/x86_64/lib/libwebsockets.a: No such file or directory
copying dependent archives...
Copying needed heder files
cp: /Users/kks/_works/cocos2d-x-3rd-party-libs-src/build/../contrib/install-ios/x86_64/include/libwebsockets.h: No such file or directory
cleaning up
yes
create fat library libwebsockets for
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: no input files specified
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo [input_file] ... [-arch <arch_type> input_file] ... [-info] [-detailed_info] [-output output_file] [-create] [-arch_blank <arch_type>] [-thin <arch_type>] [-remove <arch_type>] ... [-extract <arch_type>] ... [-extract_family <arch_type>] ... [-verify_arch <arch_type> ...] [-replace <arch_type> <file_name>] ...
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: ios/websockets/prebuilt/libwebsockets.a (No such file or directory)
create fat library for dependent archives...
create fat library libz for ios/z/prebuilt/arm64/libz.a
ios/z/prebuilt/armv7/libz.a
ios/z/prebuilt/i386/libz.a
ios/z/prebuilt/x86_64/libz.a
Architectures in the fat file: ios/z/prebuilt/libz.a are: armv7 i386 x86_64 arm64

build env.
osx version : 10.12
xcode version : 8.0

@Neimd @ericduck40
I will check this issue within two days. After that, I will post it here.

build env.
osx version: 10.12.1
xcode version: 8.1

output following msg:


-- Configuring done
-- Generating done
-- Build files have been written to: /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets
cd websockets && /Applications/Xcode.app/Contents/Developer/usr/bin/make VERBOSE=1 install
/usr/local/Cellar/cmake/3.7.0/bin/cmake -H/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets -B/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.7.0/bin/cmake -E cmake_progress_start /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets/CMakeFiles /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/websockets.dir/build.make CMakeFiles/websockets.dir/depend
cd /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets && /usr/local/Cellar/cmake/3.7.0/bin/cmake -E cmake_depends "Unix Makefiles" /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets/CMakeFiles/websockets.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/websockets.dir/build.make CMakeFiles/websockets.dir/build
[ 2%] Building C object CMakeFiles/websockets.dir/lib/base64-decode.c.o
/usr/bin/xcrun clang -I/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets -I/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets/lib -I/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/install-ios/i386/include -Wall -fvisibility=hidden -isysroot;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk;-arch;i386;-miphoneos-version-min=6.0;-I/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/install-ios/i386/include;-O3;-DNDEBUG -Wno-deprecated-declarations -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -o CMakeFiles/websockets.dir/lib/base64-decode.c.o -c /Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/ios-i386/websockets/lib/base64-decode.c
clang: error: argument to '-isysroot' is missing (expected 1 value)
clang: error: no input files
/bin/sh: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk: is a directory
/bin/sh: -arch: command not found
/bin/sh: i386: command not found
/bin/sh: -miphoneos-version-min=6.0: command not found
/bin/sh: -I/Volumes/Data/dev/cocos2d-x-3rd-party-libs-src/contrib/install-ios/i386/include: No such file or directory
/bin/sh: -O3: command not found
/bin/sh: -DNDEBUG: command not found
make[3]: *** [CMakeFiles/websockets.dir/lib/base64-decode.c.o] Error 127
make[2]: *** [CMakeFiles/websockets.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [.websockets] Error 2

Is there anyone?