pos spec lint fails.

275 views
Skip to first unread message

Golden Preet Kaur

unread,
Sep 24, 2021, 7:57:53 PM9/24/21
to discuss-webrtc
I am trying to publish a pod. Its spec contains a subpec which uses webRTC. When trying to run pod spec lint, I get following error:

 ld: warning: building for iOS Simulator, but linking in dylib built for iOS, 'WebRTC.framework'

    ld: warning: Could not find or use auto-linked framework 'WebRTC'

    Undefined symbols for architecture arm64:

      "_OBJC_CLASS_$_RTCAudioSessionConfiguration", referenced from:

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCEAGLVideoView", referenced from:

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCAudioTrack", referenced from:

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCMediaStream", referenced from:

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCCameraVideoCapturer", referenced from:

          objc-class-ref in WebRTCClient.o

      "_kRTCMediaConstraintsOfferToReceiveAudio", referenced from:

          closure #1 () -> [Swift.String : Swift.String] in HippoCallClient.WebRTCClient.(mediaConstrains in _5E9150C121774D3BA8E9EA0C41D6AAFA).getter : [Swift.String : Swift.String] in WebRTCClient.o

      "_kRTCMediaConstraintsValueTrue", referenced from:

          closure #1 () -> [Swift.String : Swift.String] in HippoCallClient.WebRTCClient.(mediaConstrains in _5E9150C121774D3BA8E9EA0C41D6AAFA).getter : [Swift.String : Swift.String] in WebRTCClient.o

      "_kRTCMediaConstraintsOfferToReceiveVideo", referenced from:

          closure #1 () -> [Swift.String : Swift.String] in HippoCallClient.WebRTCClient.(mediaConstrains in _5E9150C121774D3BA8E9EA0C41D6AAFA).getter : [Swift.String : Swift.String] in WebRTCClient.o

      "_RTCSetMinDebugLogLevel", referenced from:

          function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of generic specialization <HippoCallClient.CallClient> of function signature specialization <Arg[0] = Existential To Protocol Constrained Generic> of HippoCallClient.WebRTCClient.init(delegate: HippoCallClient.WebRTCClientDelegate, credentials: HippoCallClient.CallClientCredential, isVoiceOnlyCall: Swift.Bool) -> HippoCallClient.WebRTCClient in CallClient.o

      "_OBJC_CLASS_$_RTCSessionDescription", referenced from:

          objc-class-ref in RTCSessionDescription+JSON.o

      "_OBJC_CLASS_$_RTCIceCandidate", referenced from:

          objc-class-ref in RTCIceCandidate+JSON.o

      "_OBJC_CLASS_$_RTCIceServer", referenced from:

          objc-class-ref in CallClient.o

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCConfiguration", referenced from:

          objc-class-ref in CallClient.o

      "_OBJC_CLASS_$_RTCMediaConstraints", referenced from:

          objc-class-ref in CallClient.o

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCVideoTrack", referenced from:

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCPeerConnectionFactory", referenced from:

          objc-class-ref in CallClient.o

      "_OBJC_CLASS_$_RTCDispatcher", referenced from:

          objc-class-ref in CallClient.o

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCAudioSession", referenced from:

          objc-class-ref in CallClient.o

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCMTLVideoView", referenced from:

          objc-class-ref in WebRTCClient.o

      "_OBJC_CLASS_$_RTCDefaultVideoDecoderFactory", referenced from:

          objc-class-ref in CallClient.o

      "_OBJC_CLASS_$_RTCDefaultVideoEncoderFactory", referenced from:

          objc-class-ref in CallClient.o

    ld: symbol(s) not found for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    

    ** BUILD FAILED **

    

    

    The following build commands failed:

    CompileSwift normal x86_64

    CompileSwift normal arm64

    Ld /Users/Golden/Library/Developer/Xcode/DerivedData/App-eisplzxmgxcjfubwfkltfptuyeof/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/HippoCallClient.build/Objects-normal/arm64/Binary/HippoCallClient normal arm64.


I tried everything I found on stack overflow. But its been 2 months, I am unable to fix this. WebRTC is already compiled for arm64, x86_64 architectures.
But I am repeatedly getting  this: The spec did not pass validation, due to 1 error.

Golden Preet Kaur

unread,
Sep 29, 2021, 9:17:24 AM9/29/21
to discuss...@googlegroups.com
This is sorted.
Thank you

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/a5819cf9-3761-4e1f-bf1c-6feb0f58e366n%40googlegroups.com.

Emin DENİZ

unread,
Dec 27, 2021, 4:01:59 PM12/27/21
to discuss-webrtc
Hi,

I am trying to build iOS WebRTC manually and seeing same error after exporting the framework. Compiling with ninja successful, I can generate XCFramework, everything seems fine. But When I integrate it to my project Xcode Gives me similar undefined symbol error. 

Undefined symbols for architecture arm64:

  "_OBJC_CLASS_$_RTCAudioSession", referenced from:


I am seeing this error for all the WebRTC classes I am using, not just for RTCAudioSession. Anyone has any idea what can be wrong? I tried multiple GN config but no luck. Here is my latest config;


gn gen out/ios_arm64 --args='target_os="ios" target_cpu="arm64" is_component_build=false is_debug=false use_xcode_clang=false ios_deployment_target="10.0" rtc_libvpx_build_vp9=true use_goma=false ios_enable_code_signing=false enable_stripping=true enable_ios_bitcode=false'
ninja -C out/ios_arm64 framework_objc

gn gen out/ios_x64_sim --args='target_os="ios" target_cpu="x64" target_environment="simulator" is_component_build=false is_debug=true use_xcode_clang=false ios_deployment_target="10.0" rtc_libvpx_build_vp9=true use_goma=false ios_enable_code_signing=false enable_stripping=true enable_ios_bitcode=false rtc_include_tests=false'
ninja -C out/ios_x64_sim sdk:framework_objc



Reply all
Reply to author
Forward
0 new messages