Bug 11929 - Native library linking problems
Summary: Native library linking problems
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-04-24 04:52 UTC by mrzond
Modified: 2013-04-24 18:39 UTC (History)
2 users (show)

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


Attachments
XCode and Xamarin projects example (3.67 MB, application/zip)
2013-04-24 04:53 UTC, mrzond
Details


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 INVALID

Description mrzond 2013-04-24 04:52:19 UTC
Greetings, 

I have a problem (not even sure that it is a bug for now) with linking native library to xamarin IOS project.

At the start i was getting error, described @ http://forums.xamarin.com/discussion/3381/native-binding-errorundefined-symbols-for-architecture-i386-for-mono-libs/p1.
But by somehow error has gone (some kind of a magic actually...), but another one has been occurred - 50 symbols duplicated for architecture i386. All errors relate to native library  pjsip. 
Same library links and runs absolutely normally with IPhone XCode application.

I have attached archive with example projects for Xamarin(monotouch folder) and Xcode(xcode folder). Both projects link to libpjsip.a located at the root folder.


Best Regards, Alex D


Xamarin info

=== Xamarin Studio ===

Version 4.0.4 (build 2)
Installation UUID: 40284f57-7841-42b3-9e46-6a1f61b38fda
Runtime:
	Mono 2.10.12 (mono-2-10/c9b270d)
	GTK 2.24.16
	GTK# (2.12.0.0)
	Package version: 210120000

=== Apple Developer Tools ===

Xcode 4.6 (2066)
Build 4H127

=== Xamarin.iOS ===

Version: 6.2.4.2 (Trial Edition)
Hash: c4f6316
Branch: 
Build date: 2013-22-04 18:55:23-0400

=== Xamarin.Android ===

Not Installed

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 400040002
Git revision: a8bf58d398a13bcc7595f5f85adae04865a834d4
Build date: 2013-04-17 16:35:47+0000
Xamarin addins: f24db65837464cb72995ce5e84fa62fb0069724c

=== Operating System ===

Mac OS X 10.8.2
Darwin Admins-Mac.local 12.2.0 Darwin Kernel Version 12.2.0
    Sat Aug 25 00:48:52 PDT 2012
    root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Comment 1 mrzond 2013-04-24 04:53:08 UTC
Created attachment 3862 [details]
XCode and Xamarin projects example
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-04-24 18:39:39 UTC
This is a problem with the native library, it really has duplicate symbols.

You can reproduce it in the xcode project by going to the project's Build Settings and:

* Disable "Dead Code Stripping"
* Adding "-all_load" to "Other Linker Flags"

You should contact the provider of the libpjsip.a library and have them fix it.