WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

M118 Undefined symbols:_OBJC_CLASS_$_RTCEAGLVideoView

Open cinRiggers opened this issue 2 years ago • 47 comments

use M117 or M118,project will call the error

ld: warning: Could not find or use auto-linked framework 'AudioUnit': framework 'AudioUnit' not found ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found ld: Undefined symbols: OBJC_CLASS$_RTCEAGLVideoView, referenced from: in SipCoreCenter.o clang: error: linker command failed with exit code 1 (use -v to see invocation)

cinRiggers avatar Oct 17 '23 09:10 cinRiggers

Same problem here, I am stuck at version M116 because of this error

ddallabenetta avatar Oct 19 '23 06:10 ddallabenetta

Hey. Thanks for reporting. Can you also share what device/arc were you using when getting this error?

I had no errors on a x86_64 simulator and an iPad device

stasel avatar Oct 23 '23 09:10 stasel

Reference

To be precise,the issue occurs when your product contains The following code and it not related to device/arc. My device is iphone15 plus.

You can try run your project with this code inside: [[RTCEAGLVideoView alloc] initWithFrame:localView.bounds];

cinRiggers avatar Oct 23 '23 09:10 cinRiggers

First thank you for your attention to this issue.

To be precise,the issue occurs when your product contains The following code and it not related to device/arc. My device is iphone15 plus.

You can try run your project with this code inside: [[RTCEAGLVideoView alloc] initWithFrame:localView.bounds];

在 2023年10月23日 @.***> 写道:

Hey. Thanks for reporting. Can you also share what device/arc were you using when getting this error? I had no errors on a x86_64 simulator and an iPad device — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

cinRiggers avatar Oct 23 '23 09:10 cinRiggers

Same problem for me on M1 Mac running app on simulator dyld[60652]: Symbol not found: _OBJC_CLASS_$_RTCEAGLVideoView Referenced from: <CCF49511-9C57-351E-A939-90CF1AA51CD5> /Users/XXX/Library/Developer/CoreSimulator/Devices/EFD7C5CE-9D2D-4CE9-8B1F-54EF0C7F1BCF/data/Containers/Bundle/Application/17B6A96C-1B93-4643-B4D9-5F2E57FECD4D/myApp.app/Frameworks/MVWebRTCInterface.framework/MVWebRTCInterface Expected in: <4C4C4413-5555-3144-A171-F77BC8033BEF> /Users/XXX/Library/Developer/CoreSimulator/Devices/EFD7C5CE-9D2D-4CE9-8B1F-54EF0C7F1BCF/data/Containers/Bundle/Application/17B6A96C-1B93-4643-B4D9-5F2E57FECD4D/myApp.app/Frameworks/WebRTC.framework/WebRTC

dmi3j avatar Oct 25 '23 13:10 dmi3j

The issue is still present in version 119.0.6045.41 of WebRTC. Seems like the versions after M116 are missing the RTCEAGLVideoView.o.

In M116: image image

In the latest versions: image

Manraj45 avatar Oct 26 '23 13:10 Manraj45

Yes,it is still in version M120 Beta. Seems the official using RTCMTLVideoView instead of RTCEAGLVideoView.I don’t know it’s bug or not.

cinRiggers avatar Oct 27 '23 07:10 cinRiggers

@cinRiggers I didn't find any documentation stating that they deprecated RTCEAGLVideoView. It would be nice if we have had an official confirmation before starting to replace RTCEAGLVideoView with RTCMTLVideoView.

Manraj45 avatar Oct 27 '23 12:10 Manraj45

So the best solution right now is using below M116 version? I really can't finger out other solutions. Crying...

cinRiggers avatar Oct 30 '23 01:10 cinRiggers

So the best solution right now is using below M116 version? I really can't finger out other solutions. Crying...

在 2023年10月27日 20:18,Manraj @.***> 写道:

@cinRiggers I didn't find any documentation stating that they deprecated RTCEAGLVideoView. It would be nice if we have had an official confirmation before starting to replace RTCEAGLVideoView with RTCMTLVideoView. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

cinRiggers avatar Oct 30 '23 01:10 cinRiggers

@cinRiggers I created a ticket in the WebRTC forum, we can follow this ticket for now to see if there is any update: https://bugs.chromium.org/p/webrtc/issues/detail?id=15655

Manraj45 avatar Nov 14 '23 17:11 Manraj45

I'm also getting this error with RTCMTLNSVideoView on macOS with M117 and later.

DePasqualeOrg avatar Dec 23 '23 23:12 DePasqualeOrg

Has anyone with Apple Silicon enabled Rosetta support in Xcode?

adozenlines avatar Dec 25 '23 04:12 adozenlines

This error is because these views are UIKit-based views and will be absent from a native macOS build because they are not AppKit-based views. If you're targeting macOS, your best bet will be to use macCatalyst to use UIKit views in an AppKit environment.

open class RTCEAGLVideoView : UIView, RTCVideoRenderer {

    
    weak open var delegate: RTCVideoViewDelegate?

    
    public init(frame: CGRect, shader: RTCVideoViewShading)

    
    public init(coder aDecoder: NSCoder, shader: RTCVideoViewShading)

    
    /** @abstract Wrapped RTCVideoRotation, or nil.
     */
    open var rotationOverride: NSValue?
}

adozenlines avatar Dec 25 '23 17:12 adozenlines

But RTCMTLNSVideoView is not a UIKit view, right? This view works natively on macOS for me with M116, but not with later versions of the WebRTC package.

DePasqualeOrg avatar Dec 25 '23 17:12 DePasqualeOrg

I am still facing this issue on version M117 and later, and I run on a M1 Pro MacBook, have you guys found a solution yet ? I don't see any suggestions to this on the webRTC bugs page too "https://bugs.chromium.org/p/webrtc/issues/detail?id=15655" . Kindly let me know if you have a work around to this!

ragul-m46 avatar Jan 03 '24 10:01 ragul-m46

I posted a bug report too, but got this response a few hours ago:

We do not support unofficial libraries/packages/forks of webrtc.

It sounds like the problem might be the way this package is being built. Can someone familiar with the build process check if RTCEAGLVideoView and RTCMTLNSVideoView are included during the build?

DePasqualeOrg avatar Jan 03 '24 14:01 DePasqualeOrg

Hey @DePasqualeOrg , I checked the files during the build, looks like both RTCEAGLVideoView and RTCMTLNSVideoView are available, but I have no clue why we get this undefined symbols issue..., I have been stuck with this for the past one month now..., I very badly want to push to the M120 version, but I am stuck at M116! Somebody please help me with this...Crying already...I also tried building the RTCEAGLVideoView manually, but still came back to the same issue....

ragul-m46 avatar Jan 06 '24 20:01 ragul-m46

@stasel I also tried your generated frameworks for comparison.., till M116 it works fine, but on M117 and later versions I am getting the same undefined symbol issue using your framework, can you share your thoughts on this please...

Device information: MacBook M1 Pro - Sonoma 14.1.1 iPhone 12 Pro - iOS 16.3.1 Xcode 15

ragul-m46 avatar Jan 06 '24 20:01 ragul-m46

Yooo guys! I did find a work around to this, leave me a message with the version that you are trying to build, I can help you with the fix..! This issue occurs because the OpenGL ui objc doesn't get added to the dependencies properly during the build process, the fix is quite simple and straight forward, let me know if you need my help!

ragul-m46 avatar Jan 08 '24 13:01 ragul-m46

@ragul-m46, could you share more details on the fix? Would this also fix the issue with RTCMTLNSVideoView?

DePasqualeOrg avatar Jan 08 '24 13:01 DePasqualeOrg

@ragul-m46 Could you post the workaround for version 120.0.6099.119 (Basically the latest stable build). Thanks

Manraj45 avatar Jan 08 '24 13:01 Manraj45

Hey @DePasqualeOrg , I am not sure if this would fix the issue on Metal renderer, cause the issue I was facing was with OpenGL

ragul-m46 avatar Jan 09 '24 09:01 ragul-m46

Hey @Manraj45, try comparing the Build.gn file at src/sdk between M120 and M116 or older, you will find the problem, it should be missing the OpenGL UI ObjC dependency., add it to that to fix the issue..

ragul-m46 avatar Jan 09 '24 09:01 ragul-m46

Given that these two issues occurred around the same time, I think it's likely that changes in the build script that happened after M116 are also affecting RTCMTLNSVideoView.

DePasqualeOrg avatar Jan 09 '24 12:01 DePasqualeOrg

Hi everyone, apologies for the late response. Unfortunately I don't have a lot of capacity to work on this project :( Thanks everyone for your input. It looks indeed that the sdk/BUILD.gn got changed and may caused the issue.

I haven't changed the build script for a while. I also tend to not touch any sources or build files unless I really have to.

Looking a the file I have noticed a flag:

          if (rtc_ios_macos_use_opengl_rendering) {
            deps += [ ":opengl_objc" ]
          }

Maybe we can try to include this build flag to add opengl back? I can try to create a new build and share it here if anyone interested to test.

Edit: It looks like this flag is on by default. So I am not quite sure how to fix the issue. Any suggestions?

stasel avatar Feb 05 '24 22:02 stasel

Yes @stasel, this was the exact fix I used to solve the issue! I think it's time to close this issue! There is a small change, the variable name has been changed as OpenGL does not support macOS now, it should be as follows: if (rtc_ios_use_opengl_rendering) { deps += [ ":opengl_objc" ] }

ragul-m46 avatar Feb 06 '24 09:02 ragul-m46

Can someone familiar with the build script check to see why RTCMTLNSVideoView for macOS is also not included after M116? Is there another flag that needs to be set?

DePasqualeOrg avatar Feb 06 '24 11:02 DePasqualeOrg

It appears that the rtc_ios_use_opengl_rendering flag is on by default. Turning it on explicitly doesn't seems to make any difference.

In my iOS example code, I am using RTCMTLVideoView instead of RTCEAGLVideoView and everything compiles and works alright.

stasel avatar Feb 28 '24 21:02 stasel

@stasel, the "undefined symbols" error only happens for me when building a native macOS app. I noticed that your example app is configured with "Designed for iPad" on macOS, so it's essentially running the iOS version on Mac.

DePasqualeOrg avatar Feb 29 '24 08:02 DePasqualeOrg