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

Dependencies of cocos2d-x.
142 stars 169 forks source link

how to build websocket lib for ssl support? #125

Closed Neimd closed 7 years ago

Neimd commented 8 years ago

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.

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 input_file] ... [-info] [-detailed_info] [-output output_file] [-create] [-arch_blank ] [-thin ] [-remove ] ... [-extract ] ... [-extract_family ] ... [-verify_arch ...] [-replace ] ... 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

zilongshanren commented 7 years ago

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

keppelcao commented 7 years ago

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

keppelcao commented 7 years ago

Is there anyone?

zilongshanren commented 7 years ago

@Neimd @keppelcao https://github.com/cocos2d/cocos2d-x-3rd-party-libs-src/pull/129