link errors after building for macOS

341 views
Skip to first unread message

Taylor Holliday

unread,
Apr 25, 2024, 7:13:57 AMApr 25
to discuss-webrtc
Hello :)

We've managed to build successfully for iOS, but getting some link errors on macOS when linking our app, for symbols I think should be available (i.e. not iOS-only API):

Undefined symbol: _OBJC_CLASS_$_RTCAudioTrack
Undefined symbol: _OBJC_CLASS_$_RTCCallbackLogger
Undefined symbol: _OBJC_CLASS_$_RTCCameraVideoCapturer
Undefined symbol: _OBJC_CLASS_$_RTCConfiguration
Undefined symbol: _OBJC_CLASS_$_RTCDataBuffer
Undefined symbol: _OBJC_CLASS_$_RTCDataChannel
Undefined symbol: _OBJC_CLASS_$_RTCDataChannelConfiguration
Undefined symbol: _OBJC_CLASS_$_RTCDefaultVideoDecoderFactory
Undefined symbol: _OBJC_CLASS_$_RTCDefaultVideoEncoderFactory
Undefined symbol: _OBJC_CLASS_$_RTCIceCandidate
Undefined symbol: _OBJC_CLASS_$_RTCIceServer
Undefined symbol: _OBJC_CLASS_$_RTCMTLNSVideoView
Undefined symbol: _OBJC_CLASS_$_RTCMediaConstraints
Undefined symbol: _OBJC_CLASS_$_RTCPeerConnection
Undefined symbol: _OBJC_CLASS_$_RTCPeerConnectionFactory
Undefined symbol: _OBJC_CLASS_$_RTCSessionDescription
Undefined symbol: _OBJC_CLASS_$_RTCStatistics
Undefined symbol: _OBJC_CLASS_$_RTCStatisticsReport
Undefined symbol: _OBJC_CLASS_$_RTCVideoCapturer
Undefined symbol: _OBJC_CLASS_$_RTCVideoTrack
Undefined symbol: _RTCInitializeSSL
Undefined symbol: _RTCSetMinDebugLogLevel
Undefined symbol: _kRTCMediaConstraintsOfferToReceiveAudio
Undefined symbol: _kRTCMediaConstraintsOfferToReceiveVideo
Undefined symbol: _kRTCMediaConstraintsValueFalse
Undefined symbol: _kRTCMediaConstraintsValueTrue
Linker command failed with exit code 1 (use -v to see invocation)

Here's what I'm using to build:

gn gen out/mac_x64 --args='target_os="mac" target_cpu="x64" is_component_build=false is_debug=false enable_stripping=true'
ninja -C out/mac_x64 mac_framework_objc

gn gen out/mac_arm64 --args='target_os="mac" target_cpu="arm64" is_component_build=false is_debug=false enable_stripping=true'
ninja -C out/mac_arm64 mac_framework_objc

Any help greatly appreciated!

Thanks!

Anthony

unread,
May 3, 2024, 1:39:59 AMMay 3
to discuss-webrtc
I'm also facing this issue and would greatly appreciate any help resolving it.

Anthony

unread,
Jun 27, 2024, 6:14:24 AMJun 27
to discuss-webrtc
This is still a problem in M126 and has been preventing me from using any version after M116 on macOS. Could someone who is knowledgeable about the build process please help resolve these "Undefined symbol" errors?

Khun V

unread,
Jun 27, 2024, 6:57:14 AMJun 27
to discuss...@googlegroups.com
Are you linking against WebRTC.framework? That's where RTC objc thingies usually live (I'm still on 115 though). That's what I get:

nm webrtc/src/out/WebRTC.framework/Versions/A/WebRTC | grep RTCAudioTrack


000000000018e18c t -[RTCAudioTrack .cxx_destruct]

000000000018dd48 t -[RTCAudioTrack initWithFactory:nativeTrack:type:]

000000000018dae4 t -[RTCAudioTrack initWithFactory:source:trackId:]

000000000018e10c t -[RTCAudioTrack nativeAudioTrack]

000000000018df7c t -[RTCAudioTrack source]

0000000000a194d8 S _OBJC_CLASS_$_RTCAudioTrack

0000000000a1aa6c s _OBJC_IVAR_$_RTCAudioTrack._source

0000000000a19500 S _OBJC_METACLASS_$_RTCAudioTrack

...


--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
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/4bb89abc-91de-46c8-8331-8b0cdbfa40dcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages