Jump to content

Symbol errors with MobileVLCKit when trying to compile from source


deepseth
Go to solution Solved by deepseth,

Recommended Posts

deepseth

After hopefully correctly identifying the all the relevant dependencies (Connect-SDK, +core +firetv +AmazonFling +google-cast +google sdk +mobilevlckit +shelljs +glob? etc) and resolving some Luke-specific framework search paths I've finally managed to get XCode to compile the project.

 

..only to have it fail linking. Was getting a bunch of symbol errors for the firetv and cast when trying to deploy to simulator, and (wrongly) guessed that the bits that I have are compiled for arm only. Having switched deployment target to my phone and I'm still getting loads of symbol errors, but looks like they're primarily limited to MobileVLCKit.

 

Per http://stackoverflow.com/questions/18959691/ios7-only-stdlibc-linking-issue/19250215#19250215, I've tried changing the C++ Standard Library to use libstdc++, but no joy.

 

 

Getting absolutely loads of symbol errors for MobileVLCKit, including some below. Any pointers to getting past this? (I'm aware of the two path fails but they don't seem relevant to the symbol errors I'm getting from MobileVLCKit)

 

Thanks,

deeps

Ld /Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Products/Debug-iphoneos/Emby.app/Emby normal arm64
    cd /Users/deeps/Documents/Emby/Emby.Mobile/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=9.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -L/Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Products/Debug-iphoneos -L/Users/deeps/Documents/Emby/Emby.Mobile/platforms/ios/Emby/Plugins/org.apache.cordova.speech.speechrecognition -F/Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Products/Debug-iphoneos -FEmby/Plugins/com.telerik.plugins.wkwebview -FEmby/Plugins/cordova-plugin-webserver -F/Users/deeps/Documents/Emby/Emby.Mobile/platforms/ios/Emby/Plugins/cordova-plugin-webserver -F/Users/luke/MediaBrowser.Mobile/plugins/cordova-plugin-webserver/src/ios -F/Users/deeps/Documents/Emby/Connect-SDK-iOS-1.4 -F/Users/deeps/Documents/Emby/Emby.Mobile/platforms/ios/Emby/Plugins/org.nypr.cordova.vlcplugin/VLCKit/build -filelist /Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Intermediates/Emby.build/Debug-iphoneos/Emby.build/Objects-normal/arm64/Emby.LinkFileList -miphoneos-version-min=9.1 -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -lz -fobjc-arc -fobjc-link-runtime -stdlib=libstdc++ -framework MediaPlayer -framework MobileVLCKit -framework MediaAccessibility -framework AssetsLibrary /Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Products/Debug-iphoneos/libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework Security -framework CFNetwork -framework GoogleCast -licucore /Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Products/Debug-iphoneos/libConnectSDK.a -framework SystemConfiguration -framework GCDWebServer -weak_framework Social -weak_framework MessageUI -weak_framework AudioToolbox -framework CoreText -framework QuartzCore -framework OpenGLES -lstdc++.6.0.9 -lbz2 -liconv -weak_framework ImageIO -framework CoreLocation -framework WebKit -framework StoreKit -Xlinker -dependency_info -Xlinker /Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Intermediates/Emby.build/Debug-iphoneos/Emby.build/Objects-normal/arm64/Emby_dependency_info.dat -o /Users/deeps/Library/Developer/Xcode/DerivedData/Emby-dvyqmlvkosxqshfjmlplbvxgldij/Build/Products/Debug-iphoneos/Emby.app/Emby

ld: warning: directory not found for option '-L/Users/deeps/Documents/Emby/Emby.Mobile/platforms/ios/Emby/Plugins/org.apache.cordova.speech.speechrecognition'
ld: warning: directory not found for option '-F/Users/luke/MediaBrowser.Mobile/plugins/cordova-plugin-webserver/src/ios'
Undefined symbols for architecture arm64:
  "std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      libebml::CRTError::CRTError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in MobileVLCKit(StdIOCallback.o)
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(void const*)", referenced from:
      libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o)
      libebml::IOCallback::readFully(void*, unsigned long) in MobileVLCKit(IOCallback.o)
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(long long)", referenced from:
      dash::mpd::Representation::contextualize(unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, adaptative::playlist::BaseSegmentTemplate const*) const in MobileVLCKit(lt1-libadaptative_plugin_la-Representation.o)
...
  "std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:
      construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in GoogleCast(audio_modem_decoder.o)
      construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_istringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in MobileVLCKit(libadaptative_plugin_la-Tags.o)
  "std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sync()", referenced from:
      vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in GoogleCast(audio_modem_decoder.o)
  "std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
      LogMessage::~LogMessage() in GoogleCast(audio_modem_decoder.o)
      std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in GoogleCast(audio_modem_decoder.o)
      non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in GoogleCast(audio_modem_decoder.o)
      non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in GoogleCast(audio_modem_decoder.o)
      std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in GoogleCast(audio_modem_decoder.o)
      non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in GoogleCast(audio_modem_decoder.o)
      non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in GoogleCast(audio_modem_decoder.o)
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 notices only

Edited by deepseth
Link to comment
Share on other sites

deepseth

Nevermind, have worked out what I'm doing wrong here, have resolved that and running into new problems, but making progress at least.

Link to comment
Share on other sites

deepseth

Narrowed down to:

Undefined symbols for architecture x86_64:
  "_VTDecompressionSessionCreate", referenced from:
      _StartVideoToolbox in MobileVLCKit(videotoolbox.o)
  "_VTDecompressionSessionDecodeFrame", referenced from:
      _DecodeBlock in MobileVLCKit(videotoolbox.o)
  "_VTDecompressionSessionInvalidate", referenced from:
      _OpenDecoder in MobileVLCKit(videotoolbox.o)
      _CloseDecoder in MobileVLCKit(videotoolbox.o)
      _DecodeBlock in MobileVLCKit(videotoolbox.o)
  "_VTDecompressionSessionWaitForAsynchronousFrames", referenced from:
      _OpenDecoder in MobileVLCKit(videotoolbox.o)
      _CloseDecoder in MobileVLCKit(videotoolbox.o)

Luke, if you're reading this and fancy sharing which version of MobileVLCKit you're using to get this to build...  :wub:

Link to comment
Share on other sites

deepseth

Looks like 20150406-0541 has no symbol problems, and removing -ObjC removes the duplicate symbol issues.

 

Simulator starts! Starts to load Emby.app! And then crashes and burns

        int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
* Thread 1: signal SIGABRT

2015-11-02 11:33:09.019 Emby[14917:263891] -[__NSArrayI cdv_JSONString]: unrecognized selector sent to instance 0x7f9128c6d190

2015-11-02 11:33:09.036 Emby[14917:263891] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI cdv_JSONString]: unrecognized selector sent to instance 0x7f9128c6d190'

*** First throw call stack:

(

0   CoreFoundation                      0x0000000111811f45 __exceptionPreprocess + 165

1   libobjc.A.dylib                     0x0000000116185deb objc_exception_throw + 48

2   CoreFoundation                      0x000000011181a56d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205

3   CoreFoundation                      0x0000000111767eea ___forwarding___ + 970

4   CoreFoundation                      0x0000000111767a98 _CF_forwarding_prep_0 + 120

5   Emby                                0x00000001102dfe11 -[CDVPluginResult argumentsAsJSON] + 337

6   Emby                                0x00000001102f3b3d -[CDVCommandDelegateImpl sendPluginResult:callbackId:] + 365

7   Emby                                0x000000010f62994e -[CDVStatusBar updateIsVisible:] + 190

8   Emby                                0x000000010f629a30 -[CDVStatusBar _ready:] + 192

9   Emby                                0x00000001102f2dfa -[CDVCommandQueue execute:] + 874

10  Emby                                0x000000010f7607ef -[MyMainViewController userContentController:didReceiveScriptMessage:] + 303

11  WebKit                              0x0000000115934591 _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyERNS0_13WebFrameProxyERKNS0_18SecurityOriginDataERN7WebCore21SerializedScriptValueE + 217

12  WebKit                              0x00000001158df94f _ZN6WebKit29WebUserContentControllerProxy14didPostMessageERN3IPC10ConnectionEyyRKNS_18SecurityOriginDataEyRKNS1_13DataReferenceE + 221

13  WebKit                              0x00000001158e1644 _ZN3IPC13handleMessageIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyEMS5_FvRNS_10ConnectionEyyRKNS4_18SecurityOriginDataEyRKNS_13DataReferenceEEEEvS7_RNS_14MessageDecoderEPT0_T1_ + 142

14  WebKit                              0x000000011574083d _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_14MessageDecoderE + 113

15  WebKit                              0x00000001158c2fec _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 24

16  WebKit                              0x00000001156ff136 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_14MessageDecoderENS1_14default_deleteIS3_EEEE + 102

17  WebKit                              0x00000001157013fe _ZN3IPC10Connection18dispatchOneMessageEv + 114

18  JavaScriptCore                      0x000000011c5d1af5 _ZN3WTF7RunLoop11performWorkEv + 437

19  JavaScriptCore                      0x000000011c5d21d2 _ZN3WTF7RunLoop11performWorkEPv + 34

20  CoreFoundation                      0x000000011173e011 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

21  CoreFoundation                      0x0000000111733f3c __CFRunLoopDoSources0 + 556

22  CoreFoundation                      0x00000001117333f3 __CFRunLoopRun + 867

23  CoreFoundation                      0x0000000111732e08 CFRunLoopRunSpecific + 488

24  GraphicsServices                    0x00000001176c0ad2 GSEventRunModal + 161

25  UIKit                               0x0000000111bbe30d UIApplicationMain + 171

26  Emby                                0x000000010f595641 main + 65

27  libdyld.dylib                       0x000000011671a92d start + 1

28  ???                                 0x0000000000000001 0x0 + 1

)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb)

So close, yet still so far :(

Edited by deepseth
Link to comment
Share on other sites

I went through all of your troubles a month or so ago.  I even somehow resolved the app crash, but I simply get a blank black screen and nothing happens when I load the app.

Link to comment
Share on other sites

deepseth

I got so excited when I got a popup about a reply to this thread, but alas :(

 

Narrowed it down to this specific error, but cannot for the life of me work out why it's not working:

 

2015-11-02 11:33:09.019 Emby[14917:263891] -[__NSArrayI cdv_JSONString]: unrecognized selector sent to instance 0x7f9128c6d190

2015-11-02 11:33:09.036 Emby[14917:263891] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI cdv_JSONString]: unrecognized selector sent to instance 0x7f9128c6d190'

 

Have tried a number of things but can't get past that. Everything I can see suggests the category is implemented correctly and there's no reason why it shouldn't work. Heck, even XCode is able to recognise the definition correctly. Completely out of ideas at this point :(

Link to comment
Share on other sites

deepseth

Digging deeper, looks like the removal of -ObjC to resolve the duplicate symbols was the wrong approach.

 

Further, looks like all the duplicate symbols are between the Connect-SDK-iOS and cordova-plugin-webserver for GCDWebServer.framework.

 

 

Given that cordova-plugin-webserver is included in the Emby.Mobile repo, while Connect-SDK-iOS is linked to build (by default) from /Users/luke/Connect-SDK-iOS-1.4, I'm guessing Luke has made some changes to that, ie, adding a libconnectsdk prefix of sorts to the symbols for GCDWebServer, or linking them all together some how.

 

 

Luke, any chance you can chime in?

Link to comment
Share on other sites

  • Solution
deepseth

omg, finally. Wont post any more screenshots as I'm assuming Luke's asked people not to until it gets released, but umg, finally loaded.

 

14 hours of effort to get that to compile. Luke, expect some PRs from me soon to make this easier for more people in future!

 

5637cb4be0ebd_ScreenShot20151102at204409

Link to comment
Share on other sites

Deihmos

I wish I could get this done but there are no instructions on the github. I tried before to compile it with Xcode but failed.

Edited by Deihmos
Link to comment
Share on other sites

I got the app running late yesterday as well.  Is there not a way to do the in app purchase at this point?  Is it not enabled server side yet?

 

My problem with the blank screen appears to be that I was disabling the custom Emby GCDWebServer modules in favor of the ConnectSDK ones to avoid the duplicate symbol errors.  After disabling the ConnectSDK GCDWebServer stuff and allowing the Emby ones to compile I am in business.

Edited by tigrao
Link to comment
Share on other sites

deepseth

Heh, I guess we had similar logic being that Emby depends on ConnectSDK, not the other way around, both Emby and ConnectSDK needs GCDWebServer, so disabling Emby's GCDWebServer seemed to make the most sense.

 

Fortunately for me, that worked.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...