VLprojects / mediasoup-client-swift

Swift wrapper for libmediasoupclient
MIT License
46 stars 19 forks source link

getting compilation error while executing build.sh directly #7

Closed leokangmh closed 1 year ago

leokangmh commented 1 year ago

I cloned the project and executed build.sh without any modifications. Then, I got this error:

FAILED: obj/sdk/arm64/WebRTC obj/sdk/arm64/WebRTC.TOC if [ ! -e "obj/sdk/arm64/WebRTC" -o ! -e "obj/sdk/arm64/WebRTC.TOC" ] || ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "obj/sdk/arm64/WebRTC" | grep -q LC_REEXPORT_DYLIB ; then TOOL_VERSION=1675933541 ../../../../Mediasoup/dependencies/webrtc/src/build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --deterministic ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -B ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -shared -all_load -install_name @rpath/WebRTC.framework/WebRTC -Wl,-install_name,@rpath/WebRTC.framework/WebRTC -Wl,-fatal_warnings -target arm64-apple-ios13.0 -Wl,-dead_strip -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wl,-ObjC -Wl,-objc_abi_version,2 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,@loader_path/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/lib/swift -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -o "obj/sdk/arm64/WebRTC" -Wl,-filelist,"obj/sdk/arm64/WebRTC.rsp" -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreFoundation -framework CoreText -framework Foundation -framework CFNetwork -framework Security -framework SystemConfiguration -framework UIKit -framework AudioToolbox -framework VideoToolbox -framework CoreVideo -framework Network -framework QuartzCore -framework Metal -framework MetalKit -framework GLKit -framework OpenGLES && { ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "obj/sdk/arm64/WebRTC" | grep LC_ID_DYLIB -A 5; ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm -gPp "obj/sdk/arm64/WebRTC" | cut -f1-2 -d' ' | grep -v U$$; true; } > "obj/sdk/arm64/WebRTC.TOC"; else TOOL_VERSION=1675933541 ../../../../Mediasoup/dependencies/webrtc/src/build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --deterministic ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -B ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -shared -all_load -install_name @rpath/WebRTC.framework/WebRTC -Wl,-install_name,@rpath/WebRTC.framework/WebRTC -Wl,-fatal_warnings -target arm64-apple-ios13.0 -Wl,-dead_strip -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wl,-ObjC -Wl,-objc_abi_version,2 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,@loader_path/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/lib/swift -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -o "obj/sdk/arm64/WebRTC" -Wl,-filelist,"obj/sdk/arm64/WebRTC.rsp" -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreFoundation -framework CoreText -framework Foundation -framework CFNetwork -framework Security -framework SystemConfiguration -framework UIKit -framework AudioToolbox -framework VideoToolbox -framework CoreVideo -framework Network -framework QuartzCore -framework Metal -framework MetalKit -framework GLKit -framework OpenGLES && { ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "obj/sdk/arm64/WebRTC" | grep LC_ID_DYLIB -A 5; ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm -gPp "obj/sdk/arm64/WebRTC" | cut -f1-2 -d' ' | grep -v U$$; true; } > "obj/sdk/arm64/WebRTC.tmp" && if ! cmp -s "obj/sdk/arm64/WebRTC.tmp" "obj/sdk/arm64/WebRTC.TOC"; then mv "obj/sdk/arm64/WebRTC.tmp" "obj/sdk/arm64/WebRTC.TOC" ; fi; fi

It seems to be casuse by Xcode 14. How can I fix it ?

fedulvtubudul commented 1 year ago

I've faced similar error message recently while running build script on a new machine. The reason was a misconfigured Python. Try running python --version on terminal. It's not python2 nor python3, just python!. If you get something like "command not found", most probably it is the actual reason.

Here is an option how to manage python version on your machine:

fedulvtubudul commented 1 year ago

Build time dependencies checks (for python and cmake) were added to the build script with corresponding instructions. Closing issue.