Build Error on iOS build

207 views
Skip to first unread message

jinun.pe...@gmail.com

unread,
May 26, 2016, 12:00:59 AM5/26/16
to Siaqodb - NoSQL embedded database for .NET
Hi,

In this(https://groups.google.com/forum/#!topic/siaqodb/ohcdFBxBkus) thread, I learned about DLLs are different between platforms.

And when I added DLL for iOS and build, got this message:

SystemException: Duplicate native method found : mdb_env_open. Please check your source carefully.
  at UnityEditor.MonoAOTRegistration.ExtractNativeMethodsFromTypes (ICollection`1 types, System.Collections.ArrayList res) [0x00072] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/MonoInternalCallGenerator.cs:27
  at UnityEditor.MonoAOTRegistration.BuildNativeMethodList (Mono.Cecil.AssemblyDefinition[] assemblies) [0x0002d] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/MonoInternalCallGenerator.cs:49
  at UnityEditor.MonoAOTRegistration.WriteCPlusPlusFileForStaticAOTModuleRegistration (BuildTarget buildTarget, System.String file, CrossCompileOptions crossCompileOptions, Boolean advancedLic, System.String targetDevice, Boolean strippin
g, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.AssemblyReferenceChecker checker) [0x00021] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/MonoInternalCallGenerator.cs:87
  at UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPa
ckage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) [0x00000] in <filename unknown>:0
  at UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) [0x00000] in <filename unknown>:0
  at UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualD
ownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) [0x000c5] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions, Boolean, UInt32&)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, BuildTarget, BuildOptions, UInt32&) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/BuildPipelineBindings.gen.cs:201)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/BuildPipelineBindings.gen.cs:148)
iOSBuilder:PerformiOSDebugBuild() (at Assets/Editor/iOSBuilder.cs:65)


I tried to change DLL to net35(backward compatible 4.0), the build succeeds and make provisioning sign error.

I wonder what did I wrong.

Thanks.

Siaqodb Support

unread,
May 26, 2016, 2:27:33 AM5/26/16
to Siaqodb - NoSQL embedded database for .NET, jinun.pe...@gmail.com
When you build for iOS you will have to remove the MacOSX assemblies from /Assets folder, so it remains only dlls+native files for the platform you are building. 

We are aware that this is not the best experience (since you have to remove/add always those dlls) and we are working to improve this.

Cristi

Jinun Park (박진언)

unread,
May 26, 2016, 11:43:04 AM5/26/16
to Siaqodb Support, Siaqodb - NoSQL embedded database for .NET
Ok, thanks for the clarification. 

And can you notice this on manual?

2016년 5월 26일 (목) 오후 3:27, Siaqodb Support <off...@siaqodb.com>님이 작성:

jinun.pe...@gmail.com

unread,
May 26, 2016, 1:10:11 PM5/26/16
to Siaqodb - NoSQL embedded database for .NET, off...@siaqodb.com, jinun.pe...@gmail.com
I got same error after remove another platform's dlls and native files.

2016년 5월 27일 금요일 오전 12시 43분 4초 UTC+9, Jinun Park (박진언) 님의 말:
Message has been deleted

Siaqodb Support

unread,
May 27, 2016, 2:51:04 AM5/27/16
to Siaqodb - NoSQL embedded database for .NET, jinun.pe...@gmail.com
Jinun,
Can you send us a small repro project that simulate the issue?
Tx!

Jinun Park (박진언)

unread,
May 28, 2016, 2:56:02 AM5/28/16
to Siaqodb Support, Siaqodb - NoSQL embedded database for .NET
Yes, I will.

2016년 5월 27일 (금) 오후 3:51, Siaqodb Support <off...@siaqodb.com>님이 작성:

Jinun Park (박진언)

unread,
May 30, 2016, 2:14:15 AM5/30/16
to Siaqodb Support, Siaqodb - NoSQL embedded database for .NET
I tried to reproduce in another project and failed, so I make code that searches all of the methods from all assemblies in the project.

and I get this log:

Method name duplicate:mdb_env_open, type:FileName:/Plugins/Siaqodb/Siaqodb.dll_TypeName:LightningDB.Native.FallbackLibraryFacade
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
Logger:Error(String, Object, Object) (at Assets/02_Scripts/Common/Logger.cs:97)
BuilderUtil:CheckAssembly() (at Assets/Editor/BuilderUtil.cs:29)

(Filename: Assets/02_Scripts/Common/Logger.cs Line: 97)

Method name duplicate:mdb_env_open, type:FileName:/Plugins/Siaqodb/Siaqodb.dll_TypeName:LightningDB.Native.FallbackLibraryFacade
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
Logger:Error(String, Object, Object) (at Assets/02_Scripts/Common/Logger.cs:97)
BuilderUtil:CheckAssembly() (at Assets/Editor/BuilderUtil.cs:29)

(Filename: Assets/02_Scripts/Common/Logger.cs Line: 97)

Method name duplicate:mdb_del, type:FileName:/Plugins/Siaqodb/Siaqodb.dll_TypeName:LightningDB.Native.FallbackLibraryFacade
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
Logger:Error(String, Object, Object) (at Assets/02_Scripts/Common/Logger.cs:97)
BuilderUtil:CheckAssembly() (at Assets/Editor/BuilderUtil.cs:29)

(Filename: Assets/02_Scripts/Common/Logger.cs Line: 97)

Method name duplicate:mdb_del, type:FileName:/Plugins/Siaqodb/Siaqodb.dll_TypeName:LightningDB.Native.FallbackLibraryFacade
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
Logger:Error(String, Object, Object) (at Assets/02_Scripts/Common/Logger.cs:97)
BuilderUtil:CheckAssembly() (at Assets/Editor/BuilderUtil.cs:29)

(Filename: Assets/02_Scripts/Common/Logger.cs Line: 97)

There is two method that has the same name in same Assembly.

2016년 5월 28일 (토) 오후 3:55, Jinun Park (박진언) <jinun.pe...@gmail.com>님이 작성:

Siaqodb Support

unread,
May 30, 2016, 5:00:49 AM5/30/16
to Siaqodb - NoSQL embedded database for .NET, jinun.pe...@gmail.com
Jinun,
We did this:
1.Download SiaqodbUnity3D.zip from siaqodb.com
2.Unzip the folder
3.Copy all files from SiaqodbUnity3D/ios/ folder (and subfolders): liblmdb-arm64.a,liblmdb-armv7.a, liblmdb-armv7s.a,liblmdb.a and Siaqodb.dll to SiaqodbUnityDemo/Assets/Siaqodb folder
4.Open in Unity version 5.2.2f1 SiaqodbUnityDemo project, change the build to iOS and then 'Build and Run'
5.Open the generated project in XCode and 'Build'-> everything compiles fine.

If still problems, can you send us a repro Unity project?

Jinun Park (박진언)

unread,
May 30, 2016, 5:10:18 AM5/30/16
to Siaqodb Support, Siaqodb - NoSQL embedded database for .NET
Thanks for try reproduce.

I found the wrong place, It's about Scripting backend.

Example project using IL2CPP, but we are using mono2x.

If you change scripting backend(File > build settings > configuration > scripting backend) to mono2x, you can see the error that I've seen.

Can we use Siaqodb in iOS with mono2x?



2016년 5월 30일 (월) 오후 6:00, Siaqodb Support <off...@siaqodb.com>님이 작성:

Siaqodb Support

unread,
May 30, 2016, 6:28:01 AM5/30/16
to Siaqodb - NoSQL embedded database for .NET, jinun.pe...@gmail.com
Indeed Jinun, you were right, there was a problem with Mono2x on iOS, it seems AOT compiler does not like method overloading.

We fixed the issue, please download again the setup from our website and replace Siaqodb.dll from your Assets folder with the new one from /binaries/ios folder.

Let us know if you have any other questions.
Cristi

Jinun Park (박진언)

unread,
May 30, 2016, 6:50:52 AM5/30/16
to Siaqodb Support, Siaqodb - NoSQL embedded database for .NET
Thanks for the quick response. I'll download again and install.

Thanks,
Jinun

2016년 5월 30일 (월) 오후 7:28, Siaqodb Support <off...@siaqodb.com>님이 작성:

Jinun Park (박진언)

unread,
May 30, 2016, 10:20:27 AM5/30/16
to Siaqodb Support, Siaqodb - NoSQL embedded database for .NET
It works! Thank you for find and fix error. :)

2016년 5월 30일 (월) 오후 7:50, Jinun Park (박진언) <jinun.pe...@gmail.com>님이 작성:
Reply all
Reply to author
Forward
0 new messages