Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Build errors, wrong file location? LibrariesPlugins

Discussion in 'iOS and tvOS' started by djnewty, May 7, 2015.

  1. djnewty

    djnewty

    Joined:
    Apr 7, 2015
    Posts:
    40
    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
     
  2. djnewty

    djnewty

    Joined:
    Apr 7, 2015
    Posts:
    40
    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
     
  3. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    What was the fix?
     
  4. Benzor

    Benzor

    Joined:
    Dec 29, 2013
    Posts:
    12
    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!
     
  5. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    Is this in Xcode? The path is completely empty there.
     
  6. naveen_pambi

    naveen_pambi

    Joined:
    Jan 21, 2014
    Posts:
    9
    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)
     
    Last edited: Jun 17, 2015
  7. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    I hope this will get resolved soon. I can't use the Soomla store at all because of this.
     
  8. agilelensalex

    agilelensalex

    Joined:
    Apr 7, 2014
    Posts:
    24
    Any luck with this?
     
  9. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    Where should be fixed that? Im using Soomla as @Fluzing and can't build on iOS.
     
  10. eugene-bartosh

    eugene-bartosh

    Joined:
    Jan 13, 2013
    Posts:
    3
    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);
    }
    }
     
  11. gladddos

    gladddos

    Joined:
    Feb 6, 2014
    Posts:
    167
    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 !
     
  12. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    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!!
     
  13. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    @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.
     
  14. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    @naveen_pambi
    Could you please paste full error output from the build log?
     
  15. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    ANyon
    Do you want the log WITH that solution applied or WITHOUT it? YEs, I'm using Unity 4.6
     
  16. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Without. Thanks :)
     
  17. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    - 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]
     
  18. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    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.
     
  19. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    Where do I send you the project? Can't send you private messages
     
  20. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    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 :)
     
  21. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    Case 708784 :)
     
  22. artur-leao

    artur-leao

    Joined:
    Feb 3, 2015
    Posts:
    66
    This bug still persists in 5.3.6f1