This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 49220 - MTOUCH: error MT5209: Native linking error: file not found: -lsqlite3
Summary: MTOUCH: error MT5209: Native linking error: file not found: -lsqlite3
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild (show other bugs)
Version: XI 10.4 (C9)
Hardware: Macintosh Mac OS
: --- major
Target Milestone: (C9)
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-12-07 13:45 UTC by Alain
Modified: 2017-01-02 11:57 UTC (History)
5 users (show)

See Also:
Tags:
Is this bug a regression?: Yes
Last known good build: C8


Attachments
Response (1.20 MB, text/rtf)
2016-12-08 08:44 UTC, Alain
Details

Description Alain 2016-12-07 13:45:02 UTC
Hi,

I compile my project with the ALPHA version of Xamarin.IOS 10.4 and I have the following message.

I do not understand why ?

With the stable version and BETA, no problem at compilation

Alain



/Users/MacROGISTER/Projects/MedinectIOSMACOS/MedinectIOS/MedinectIOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->

	MTOUCH:  warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
	MTOUCH:  warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker

Errors:

/Users/MacROGISTER/Projects/MedinectIOSMACOS/MedinectIOS/MedinectIOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->

	MTOUCH: error MT5209: Native linking error: file not found: -lsqlite3
	MTOUCH: error MT5202: Native linking failed. Please review the build log.

	 57 Warning(s)
	 2 Error(s)

Time Elapsed 00:00:06.9777010
Comment 1 Alex Soto 2016-12-08 06:59:02 UTC
Hello Alain, could you provide us the exact version that you are using?

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).
Comment 2 Alex Soto 2016-12-08 07:03:22 UTC
Also please include your full build logs with high verbosity enabled by adding -v -v -v -v to your additional mtouch arguments in your project build settings.
Comment 3 Alain 2016-12-08 08:44:36 UTC
Created attachment 18819 [details]
Response

=== Visual Studio for Mac Preview ===

Version Preview 2 (7.0 build 560)
Installation UUID: 33ce5dd8-aa23-4f2b-a40a-5eb2235cff8d
Runtime:
	Mono 4.8.0 (mono-4.8.0-branch/5e1b0a0) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000374

=== NuGet ===

Version : 4.0.0.2098

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.1 (11544)
Build 8B62

=== Xamarin.iOS ===

Version: 10.4.0.33 (Visual Studio Enterprise)
Hash: d93ae7e
Branch: master
Build date: 2016-12-01 11:06:35-0500

=== Xamarin.Android ===

Version: 7.1.0.13 (Visual Studio Enterprise)
Android SDK: /Users/MacROGISTER/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.0.0.303 (Visual Studio Enterprise)

=== Build Information ===

Release ID: 700000560
Git revision: 21714a71933f78242fea5b184a64f78bd5b11560
Build date: 2016-12-05 11:02:52-05
Xamarin addins: 6ef9b840f7003f55bc17782a901086305e96d290
Build lane: monodevelop-vNext-preview

=== Operating System ===

Mac OS X 10.12.1
Darwin imac-de-alain.appl-lan.be 16.1.0 Darwin Kernel Version 16.1.0
    Thu Oct 13 21:26:57 PDT 2016
    root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-12-08 11:40:37 UTC
I think I know what's happening here, we end up passing this to the native linker:

    -force_load -lsqlite3

which is wrong (-force_load should not be passed).
Comment 5 Alain 2016-12-08 11:45:38 UTC
Ok, and I do what for it to work.

I have to wait for a correction on your part?
Comment 6 Rolf Bjarne Kvinge [MSFT] 2016-12-08 11:47:19 UTC
@Alain, we have to fix it; in the meantime you can downgrade to the current stable version.
Comment 7 Alain 2016-12-08 11:49:30 UTC
OK, I know that! As I said, it works with BETA and stable.

So to use the ALPHA, I have to wait for a correction?
Comment 8 Rolf Bjarne Kvinge [MSFT] 2016-12-08 11:54:56 UTC
Correct, to use the alpha you have to wait until we fix it.
Comment 9 Alain 2016-12-08 11:58:06 UTC
OK, thanks
Comment 10 Rolf Bjarne Kvinge [MSFT] 2016-12-08 12:28:15 UTC
PR: https://github.com/xamarin/xamarin-macios/pull/1313
Comment 12 Saurabh 2016-12-27 07:11:33 UTC
I am unable to reproduce this Issue with XI 10.4.0.33. my template getiing deployed and launched successfully on simulator and devices in both configuration release and debug.

@Rolf, Could you please provide me some steps so that I can reproduce and verify it at my end?
Comment 13 Rolf Bjarne Kvinge [MSFT] 2017-01-02 07:36:19 UTC
@Saurabh, you should be able to reproduce this using the test code from the fix: https://github.com/xamarin/xamarin-macios/commit/8de0d43799b8b9d89c13add5ee1c57a9725843a2#diff-80c0ede08d66e5466ded7c0db6e978bfR2181
Comment 14 Alain 2017-01-02 08:24:47 UTC
with the new ALPHA version, I don't have this problem.

Alain
Comment 15 Mohit Kheterpal 2017-01-02 11:57:18 UTC
Thanks Alain for verifying this issue.

As per comment 14, this issue has been fixed for Alain.

Hence, closing this issue by marking it as Verified.

Note You need to log in before you can comment on or make changes to this bug.