# Debug version of WebRTC library gives "Undefined symbols for architecture arm64"

**URL:** <https://react-native-webrtc.discourse.group/t/debug-version-of-webrtc-library-gives-undefined-symbols-for-architecture-arm64/1505>\
**Category:** iOS\
**Created:** [March 10, 2022, 1:30pm UTC](https://react-native-webrtc.discourse.group/t/debug-version-of-webrtc-library-gives-undefined-symbols-for-architecture-arm64/1505 "2022-03-10T13:30:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seast](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@seast](https://react-native-webrtc.discourse.group/u/seast)\
**Post date:** [March 10, 2022, 1:30pm UTC](https://react-native-webrtc.discourse.group/t/debug-version-of-webrtc-library-gives-undefined-symbols-for-architecture-arm64/1505/1 "2022-03-10T13:30:25Z")

</div>

I need to produce a debug version of WebRTC so I can try and track down an ipv6 issue.

I followed the instructions here: [https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/BuildingWebRTC.md](https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/BuildingWebRTC.md)

checked out the M92 branch of WebRTC and built the debug version of the library with the following:

> python build-webrtc.py --setup --ios /my/directory/  
> cd /my/directory/build\_webrtc/webrtc/ios/src/  
> git checkout -b build-M92 refs/remotes/branch-heads/4515  
> cd /tools/directory  
> python build-webrtc.py --sync --ios /my/directory/  
> python build-webrtc.py --build --ios --debug /my/directory/

This seemed to work although I did notice a few warnings were produced during that process:

> Running cmd: gn gen out/Debug-ios-x64 --args=‘treat\_warnings\_as\_errors=false is\_component\_build=false rtc\_libvpx\_build\_vp9=true is\_debug=true target\_cpu=“x64” enable\_dsyms=true rtc\_enable\_objc\_symbol\_export=true rtc\_include\_tests=false enable\_ios\_bitcode=true ios\_deployment\_target=“11.0” ios\_enable\_code\_signing=false target\_os=“ios” use\_xcode\_clang=true’  
> WARNING at the command-line “–args”:1:162: Build argument has no effect.  
> treat\_warnings\_as\_errors=false is\_component\_build=false rtc\_libvpx\_build\_vp9=true is\_debug=true target\_cpu=“x64” enable\_dsyms=true rtc\_enable\_objc\_symbol\_export=true rtc\_include\_tests=false enable\_ios\_bitcode=true ios\_deployment\_target=“11.0” ios\_enable\_code\_signing=false target\_os=“ios” use\_xcode\_clang=true  
> ^—  
> The variable “rtc\_enable\_objc\_symbol\_export” was set as a build argument  
> but never appeared in a declare\_args() block in any buildfile.
> 
> To view all possible args, run “gn args --list \<out\_dir\>”
> 
> The build continued as if that argument was unspecified.

I then replaced the original WebRTC.xcframework in react-native-webrtc/apple with the new debug version of the WebRTC.xcframework in build\_webrtc/build/ios/

I cleaned the build but when I try and recompile the app I now get undefined symbols:

> Undefined symbols for architecture arm64:  
> “_OBJC\_CLASS_$\_RTCMediaConstraints”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCPeerConnection.o)  
> “_OBJC\_CLASS_$\_RTCDataBuffer”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCDataChannel.o)  
> “_OBJC\_CLASS_$\_RTCMediaStreamTrack”, referenced from:  
> \__OBJC_$_CATEGORY\_RTCMediaStreamTrack_$\_React in libreact-native-webrtc.a(RTCMediaStreamTrack+React.o)  
> “_OBJC\_CLASS_$\_RTCDataChannelConfiguration”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)  
> “_OBJC\_CLASS_$\_RTCSessionDescription”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCPeerConnection.o)  
> “_OBJC\_CLASS_$\_RTCCameraVideoCapturer”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(VideoCaptureController.o)  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCMediaStream.o)  
> “\_kRTCFieldTrialEnabledValue”, referenced from:  
> -[WebRTCModule initWithEncoderFactory:decoderFactory:] in libreact-native-webrtc.a(WebRTCModule.o)  
> “_OBJC\_CLASS_$\_RTCPeerConnection”, referenced from:  
> \__OBJC_$_CATEGORY\_RTCPeerConnection_$\_VideoTrackAdapter in libreact-native-webrtc.a(WebRTCModule+VideoTrackAdapter.o)  
> \__OBJC_$_CATEGORY\_RTCPeerConnection_$\_React in libreact-native-webrtc.a(WebRTCModule+RTCPeerConnection.o)  
> “_OBJC\_CLASS_$\_RTCPeerConnectionFactory”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule.o)  
> “_OBJC\_CLASS_$\_RTCDefaultVideoDecoderFactory”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule.o)  
> “\_RTCInitFieldTrialDictionary”, referenced from:  
> -[WebRTCModule initWithEncoderFactory:decoderFactory:] in libreact-native-webrtc.a(WebRTCModule.o)  
> “_OBJC\_CLASS_$\_RTCEAGLVideoView”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(RTCVideoViewManager.o)  
> “_OBJC\_METACLASS_$\_RTCVideoCapturer”, referenced from:  
> _OBJC\_METACLASS_$\_ScreenCapturer in libreact-native-webrtc.a(ScreenCapturer.o)  
> “_OBJC\_CLASS_$\_RTCVideoFrame”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(ScreenCapturer.o)  
> “_OBJC\_CLASS_$\_RTCConfiguration”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)  
> “_OBJC\_CLASS_$\_RTCIceServer”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)  
> “_OBJC\_CLASS_$\_RTCIceCandidate”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)  
> “_OBJC\_CLASS_$\_RTCCVPixelBuffer”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(ScreenCapturer.o)  
> “_OBJC\_CLASS_$\_RTCVideoCapturer”, referenced from:  
> _OBJC\_CLASS_$\_ScreenCapturer in libreact-native-webrtc.a(ScreenCapturer.o)  
> “_OBJC\_CLASS_$\_RTCDefaultVideoEncoderFactory”, referenced from:  
> objc-class-ref in libreact-native-webrtc.a(WebRTCModule.o)  
> ld: symbol(s) not found for architecture arm64

There is an ios-arm64 folder in the debug WebRTC.xcframework.

Does anyone know what I am doing wrong when building the debug library as clearly something is not set up right?

Thanks, Simon.
