Bug 34381 - HockeyApp component: native linking failed if Deployment Target is 6.0
Summary: HockeyApp component: native linking failed if Deployment Target is 6.0
Status: RESOLVED FIXED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jon Dick
URL:
Depends on:
Blocks:
 
Reported: 2015-09-29 05:18 UTC by artur.drobinskiy
Modified: 2016-05-16 14:31 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description artur.drobinskiy 2015-09-29 05:18:26 UTC
I download the latest version of HockeyApp component (3.8.2.0) from Components Store. I open Sample app and compile it just fine. But if I switch Deployment Target in that sample app to 6.0 linking fails (in the sample deployment target is 7.0).


Below is the output:

Undefined symbols for architecture arm64:
    "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
        void std::__1::vector<void ()(BITCrashUncaughtCXXExceptionInfo const), std::__1::allocator<void ()(BITCrashUncaughtCXXExceptionInfo const*)> >::__push_back_slow_path<void ( const&)(BITCrashUncaughtCXXExceptionInfo const*)>(void ( const&&&)(BITCrashUncaughtCXXExceptionInfo const)) in HockeySDK.a(BITCrashCXXExceptionHandler.o)
    "std::exception_ptr::exception_ptr(std::exception_ptr const&)", referenced from:
        BITCrashUncaughtCXXTerminateHandler() in HockeySDK.a(BITCrashCXXExceptionHandler.o)
    "std::exception_ptr::~exception_ptr()", referenced from:
        BITCrashUncaughtCXXTerminateHandler() in HockeySDK.a(BITCrashCXXExceptionHandler.o)
    "std::current_exception()", referenced from:
        BITCrashUncaughtCXXTerminateHandler() in HockeySDK.a(BITCrashCXXExceptionHandler.o)
    "std::rethrow_exception(std::exception_ptr)", referenced from:
        BITCrashUncaughtCXXTerminateHandler() in HockeySDK.a(BITCrashCXXExceptionHandler.o)
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::__1::__vector_base_common<true>::__throw_length_error() const. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::exception_ptr::exception_ptr(std::exception_ptr const&). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::exception_ptr::~exception_ptr(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::current_exception(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::rethrow_exception(std::exception_ptr). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5202: Native linking failed. Please review the build log.
 Task "MTouch" execution -- FAILED
Comment 1 YuraS 2015-10-05 13:09:36 UTC
Try pass the -cxx flag in your additional mtouch arguments and add -lc++ to gcc_flags
Comment 2 Bill Holmes 2015-10-05 14:12:28 UTC
Adding the following to the Additional mtouch arguments of the app project appears to fix the issue.

-cxx -gcc_flags "-lc++"
Comment 3 Jon Dick 2015-10-05 14:24:39 UTC
This will be fixed in the HockeyApp iOS component v3.8.2.1 release which is pending approval now in the component store.
Comment 4 artur.drobinskiy 2015-10-09 01:34:32 UTC
It's been 5 days since the last comment and there's still v3.8.2.0 in Component Store.
I expected review times to be around few days, is everything ok?
Comment 5 Jon Dick 2015-10-09 09:24:18 UTC
There was an issue with the version that was submitted.  It's been corrected and resubmitted, it should be live within a couple of days now.

Sorry for the trouble.
Comment 6 Jon Dick 2015-10-09 09:26:00 UTC
Also, I should add, the new version of the component only adds the mtouch args to the sample apps, the actual library itself is unchanged, so go ahead and use 3.8.2.0 and just add these args to your app's mtouch args (project settings -> iOS Build -> Additional mtouch arguments):

-cxx -gcc_flags "-lc++"

Unfortunately there's no way to specify these in the binding/library itself, and each app implementing the library that wants to target iOS 6.0 will need to add these arguments to their app project manually.
Comment 7 Ray Kelly 2016-05-16 14:31:29 UTC
Is this really fixed?  I am still getting the error.

		
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::__1::__vector_base_common<true>::__throw_length_error() const. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::exception_ptr::exception_ptr(std::exception_ptr const&). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::exception_ptr::~exception_ptr(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::current_exception(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::rethrow_exception(std::exception_ptr). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5202: Native linking failed. Please review the build log.

I get this after adding HockeyApp