Build errors, wrong file location? LibrariesPlugins

Hi,

I’m getting an error in xcode when trying to build for IOS.

The error is “Apple Mach-O Linker error”

ld: warning: directory not found for option “/-L/Users/myusername/Desktop/MyPluginBuild/LibrariesPlugins/iOS”

The strange thing is that it appears to be looking for the lib “.a” library plugin file inside a folder that doesnt exist

/LibrariesPlugins/

When it should probably be

/Libraries/Plugins

Since this is the location of the files it is trying to build from.

Admittedly, I’m building the project in unity on a windows machine and then copying the files to build in xCode using a Mac. Could there be any problem here?

Cheers

This is a bug. It was indeed an incorrect location for “LibrariesPlugins” that xcode was looking in. There is a backslash instead of a forwardslash which caused the incorrect path in build settings

What was the fix?

Just encountered this bug as we finished migrating from Unity 4.6 to Unity 5.0.1

The fix:
Under Build Settings, under Search Paths, expand the Library Search Paths and swap the random backslash for a forward slash.

Hope Unity hotfixes this soon!

Is this in Xcode? The path is completely empty there.

Adding forward slash in Library Search Paths didn’t fix the issue.

I am getting the below error after adding forward slash

ld: 49 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I hope this will get resolved soon. I can’t use the Soomla store at all because of this.

Any luck with this?

Where should be fixed that? Im using Soomla as @Fluzing and can’t build on iOS.

Here is the code that fixes the Backslash issue, when you build for iOS from Unity Editor for Windows:
using UnityEditor;
using System.Collections;
using System.IO;

public class Build : MonoBehaviour {

[MenuItem (“File/Build iOS”)]
static void MyBuild(){
string[ ] lev = {“Assets/App2.unity”};
BuildPipeline.BuildPlayer(lev, “c:/myapp”, BuildTarget.iOS, BuildOptions.None);
string fpath = @“c:/myapp/Unity-iPhone.xcodeproj/project.pbxproj”;
string opath = @“c:/myapp/Unity-iPhone.xcodeproj/project.tmp”;
StreamWriter ofile = new StreamWriter(opath, false);
using(StreamReader sfile = new StreamReader(fpath, false) ) {
while( !sfile.EndOfStream ) {
string str = sfile.ReadLine();
int ind = str.IndexOf (“\\”);
if ( ind >= 0 ) str = str.Replace(“\\”,“/”);
ofile.WriteLine(str);
}
sfile.Close ();
}
ofile.Close ();
System.IO.File.Delete(fpath+“.old”);
System.IO.File.Move (fpath,fpath+“.old”);
System.IO.File.Delete(fpath);
System.IO.File.Move (opath,fpath);
System.IO.File.Delete(opath);
}
}

Hey Eugene,
I don’t understand what we should do, juste copy past your script in principal asset folder, replace “{“Assets/App2.unity”};” by my scene name and build ?

Thanks !

I create a Build.cs script under Scritps folder and I get this errors:

Assets/Scripts/Build.cs(11,91): error CS0117: UnityEditor.BuildTarget' does not contain a definition for iOS’

Assets/Scripts/Build.cs(11,31): error CS1502: The best overloaded method match for `UnityEditor.BuildPipeline.BuildPlayer(string[ ], string, UnityEditor.BuildTarget, UnityEditor.BuildOptions)’ has some invalid arguments

Assets/Scripts/Build.cs(11,31): error CS1503: Argument #3' cannot convert object’ expression to type `UnityEditor.BuildTarget’

UnauthorizedAccessException: Access to the path "" is denied. (this one shows a couple of times, even if Im running Unity as Administrator and is in the antivirus ignore list)

Can you explain a little more what it needs to be done? I think me and other users are a little confused!
Thanks!!

@DarkSlash The errors suggest that you’re using Unity 4.6. The workaround applies only for 5.x.

Could you please submit a bug report and attach your project to it. Please post the bug number here.

@naveen_pambi
Could you please paste full error output from the build log?

ANyon

Do you want the log WITH that solution applied or WITHOUT it? YEs, I’m using Unity 4.6

Without. Thanks :slight_smile:

  • Finished compile Library/ScriptAssemblies/Assembly-CSharp.dll
    Assets/Scripts/store.cs(16,21): warning CS0649: Field store.twitter' is never assigned to, and will always have its default value null’
    (Filename: Assets/Scripts/store.cs Line: 16)

  • starting compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll, for buildtarget 9

  • Finished compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll
    Reloading assemblies after finishing script compilation.
    Begin MonoManager ReloadAssembly
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\UnityEngine.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\UnityEditor.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\Unity.Locator.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Mono\lib\mono\2.0\I18N.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Mono\lib\mono\2.0\I18N.West.dll (this message is harmless)
    Registering custom dll’s …
    Non platform assembly: data-162E87E0 (this message is harmless)
    Non platform assembly: data-0B2AA188 (this message is harmless)
    Non platform assembly: data-170066B0 (this message is harmless)
    Register platform support module: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\androidplayer/UnityEditor.Android.Extensions.dll
    Register platform support module: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\iossupport/UnityEditor.iOS.Extensions.dll
    Register platform support module: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\wp8support/UnityEditor.WP8.Extensions.dll
    Register platform support module: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\metrosupport/UnityEditor.Metro.Extensions.dll
    Register platform support module: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\blackberryplayer/UnityEditor.BB10.Extensions.dll
    Registered in 2.133017 seconds.
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp-firstpass.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp-firstpass.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp-Editor-firstpass.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp-Editor-firstpass.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp-Editor.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-CSharp-Editor.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-UnityScript.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Library\ScriptAssemblies\Assembly-UnityScript.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\PackageManager\Unity\PackageManager\4.6.6\Unity.PackageManager.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\PackageManager\Unity\PackageManager\4.6.6\Unity.PackageManager.dll into Unity Child Domain
    Non platform assembly: C:\Program Files\Unity 4\Editor\Data\UnityExtensions\Unity\GUISystem\4.6.6\UnityEngine.UI.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\UnityExtensions\Unity\GUISystem\4.6.6\UnityEngine.UI.dll into Unity Child Domain
    Non platform assembly: C:\Program Files\Unity 4\Editor\Data\UnityExtensions\Unity\GUISystem\4.6.6\Editor\UnityEditor.UI.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\UnityExtensions\Unity\GUISystem\4.6.6\Editor\UnityEditor.UI.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Assets\Extensions\tk2d\Editor\tk2dExternal.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Assets\Extensions\tk2d\Editor\tk2dExternal.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Assets\Extensions\tk2d\Editor\tk2dSkin.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Assets\Extensions\tk2d\Editor\tk2dSkin.dll into Unity Child Domain
    Non platform assembly: \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Assets\Plugins\Facebook\Scripts\IFacebook.dll (this message is harmless)
    Loading \ROGUE\Users\David\Documents\Juegos\KrisisiOS\Assets\Plugins\Facebook\Scripts\IFacebook.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\UnityEditor.Graphs.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\Managed\UnityEditor.Graphs.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\androidplayer\UnityEditor.Android.Extensions.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\androidplayer\UnityEditor.Android.Extensions.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\iossupport\UnityEditor.iOS.Extensions.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\iossupport\UnityEditor.iOS.Extensions.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\wp8support\UnityEditor.WP8.Extensions.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\wp8support\UnityEditor.WP8.Extensions.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\metrosupport\UnityEditor.Metro.Extensions.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\metrosupport\UnityEditor.Metro.Extensions.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\blackberryplayer\UnityEditor.BB10.Extensions.dll (this message is harmless)
    Loading C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\blackberryplayer\UnityEditor.BB10.Extensions.dll into Unity Child Domain
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\Unity.DataContract.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Mono\lib\mono\2.0\System.Core.dll (this message is harmless)
    Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\Unity.IvyParser.dll (this message is harmless)
    Initializing Unity.PackageManager (PackageManager) v4.6.6 for Unity v4.6.6

Setting Android v4.6.6 for Unity v4.6.6f2 to C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\androidplayer

Setting BB10 v4.6.6 for Unity v4.6.6f2 to C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\blackberryplayer

Setting iPhone v4.6.6 for Unity v4.6.6f2 to C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\iossupport

Setting MetroPlayer v4.6.6 for Unity v4.6.6f2 to C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\metrosupport

Setting WP8Player v4.6.6 for Unity v4.6.6f2 to C:\Program Files\Unity 4\Editor\Data\PlaybackEngines\wp8support

Setting GUISystem v4.6.6 for Unity v4.6.6f2 to C:\Program Files\Unity 4\Editor\Data\UnityExtensions\Unity\GUISystem\4.6.6

Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\nunit.framework.dll (this message is harmless)
Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\Mono.Cecil.dll (this message is harmless)
Platform assembly: C:\Program Files\Unity 4\Editor\Data\Mono\lib\mono\2.0\UnityScript.dll (this message is harmless)
Platform assembly: C:\Program Files\Unity 4\Editor\Data\Managed\ICSharpCode.NRefactory.dll (this message is harmless)
Refresh: detecting if any assets need to be imported or removed … Platform assembly: C:\Program Files\Unity 4\Editor\Data\Mono\lib\mono\2.0\System.Xml.Linq.dll (this message is harmless)
Refresh: elapses 2.082144 seconds

----- Total AssetImport time: 0.086470s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]

----- Total AssetImport time: 0.047715s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]

Mono: successfully reloaded assembly

  • Completed reload, in 6.653 seconds
    Refresh: detecting if any assets need to be imported or removed … Refresh: elapses 2.241451 seconds

----- Total AssetImport time: 0.066069s, AssetImport time: 0.000001s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]

Refresh: detecting if any assets need to be imported or removed … Refresh: elapses 2.163058 seconds

----- Total AssetImport time: 0.064934s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]

Ugh, sorry for misleading. I thought you asked about whether the project to submit to a bug report should contain the workaround.

The question about the log was for different user. From you I’d like to see the project (attach it to the bug), as it will be hard to find the bug otherwise.

Where do I send you the project? Can’t send you private messages

Click Help->Report a bug in Unity and attach the project to the bug. Then post the number of the new bug here. Thanks a lot :slight_smile: