Search Unity

Linker command failed with exit code 1

Discussion in 'iOS and tvOS' started by Mr-Tsunami, Nov 20, 2015.

  1. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    I've just updated to latest XCode Version 7.1.1 (7B1005) and Unity 5.2.3f1 and my project cannot be built anymore. I'm building for simulator so I selected "Simulator SDK" in Unity build settings. "Device SDK" works fine, but I need to test it on simulators.

    The error is:

    ld: in /Users/alex/Desktop/Ka226_18-11-2015/ka226/Libraries/libiPhone-lib.a(GeoRingBuffer.o), building for iOS simulator, but linking in object file built for OSX, for architecture x86_64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    I've tried googling some solutions but nothing helps. Also I'm not using any plugins, just plain unity project. Who knows how to solve the problem?
     
    Last edited: Nov 20, 2015
  2. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
  3. namine

    namine

    Joined:
    Mar 1, 2013
    Posts:
    21
    I'm having the same problem, and just saw this in latest release note :
    • (740343) - iOS: Fixed simulator support on Xcode 7.1.
     
  4. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    Thanks for pointing this out. But looks like it's not actually fixed. I'm using latest 5.2.3f1 and the linker error persists. Also tried downgrading to 5.2.2p4. Same problem.
     
    georgepiva likes this.
  5. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    Bingo! 5.2.2p3 solves the issue. What a wonderful friday night
     
    ramand likes this.
  6. georgepiva

    georgepiva

    Joined:
    Dec 16, 2013
    Posts:
    13
    I'm having the same problem using version 5.2.2p4.
    As a workaround I have just downgraded to Unity 5.2.2p3 and the build is now succeeding. Thanks @Mr.Tsunami!
     
    Last edited: Nov 25, 2015
  7. Laumania

    Laumania

    Joined:
    Jun 27, 2012
    Posts:
    103
    I have the same, will try 5.2.2p3

     
  8. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    All simulator linker issues have been fixed in 5.2.3p2 (5.2.2p4 had another regression).
     
  9. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    277
    try to off Enable Bitcode and it will work but mhh have some the same bugg that a empty scene have about 200mb ??
    When i build the archive ??
    The normal folder have 40mb but its big dont now why but its big for nothing.
     
  10. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    The archived projects will have larger size due to additional bitcode information, but this is harmless. Bitcode information size is ignored during app size limit calculations during App Store submission.
     
  11. Gayton

    Gayton

    Joined:
    Dec 9, 2015
    Posts:
    3
    I'm still seeing this with Unity 5.3.0f4 and Xcode 7.1 (7B91b). Using otool from the command line, you can see that libiPhone-lib.a still has some code marked as built for MacOSX. It would be nice if there is a way to set a linker flag in xcode that relaxes the assertion, but I have not found any.
     
  12. adrianadrian

    adrianadrian

    Joined:
    Mar 8, 2015
    Posts:
    6
    Any fix for this? Having the same problem on unity 5.3.0f4 and xcode 7.2
     
  13. mitchallen

    mitchallen

    Joined:
    Oct 11, 2015
    Posts:
    1
    I'm seeing this too (Xcode 7.2 (7C68), Unity 5.4.0f4 Personal):
    ... Libraries/libiPhone-lib.a(apicontext.o), building for iOS simulator, but linking in object file built for OSX, for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
     
  14. chadvonnau

    chadvonnau

    Joined:
    Dec 14, 2015
    Posts:
    1
    I'm seeing the same error as mitchallen with Xcode 7.2 (7C68) / Unity 5.3.0f4 Personal, and cannot build for the Simulator. I tried setting ENABLE_BITCODE to both YES and NO, but it doesn't make a difference.
     
  15. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    111
    Same here. Unity 5.3.0f4. XCode 7.2.
    I noticed in XCode that the target's base SDK is iphonesimulator (SDK not found) and architecture was i386.
    Switched to Base SDK of most recent (iOS 9.2) and Architectures to standard (these are the settings I'd have in a native app). Bitcode was off by default.
    Builds OK, but the app crashes with Symbol not found:
    Really need a fix on this! Or at least a workaround.

    EDIT:
    They closed issue https://issuetracker.unity3d.com/issues/ios-linker-error-on-ios-simulator-build
    in 5.2.3f1, I've submitted a new bug, but not sure how long they take to show on issue tracker. Will try to update here as I find information.
     
    Last edited: Dec 17, 2015
  16. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    The fix will be released in Unity 5.3.1.
     
  17. PacketPaul

    PacketPaul

    Joined:
    Dec 7, 2015
    Posts:
    3
    Great! How long until 5.3.1 is released?
     
  18. talgif

    talgif

    Joined:
    Dec 11, 2012
    Posts:
    3
    I'm still seeing this error in Unity 5.3.1
     
  19. enger305

    enger305

    Joined:
    May 7, 2014
    Posts:
    4
    :( same problem, first time build for ios
     
  20. shmomo

    shmomo

    Joined:
    Oct 11, 2011
    Posts:
    118
    I'm seeing this error in Unity 5.3.1p1
     
  21. Wallywest

    Wallywest

    Joined:
    Jun 5, 2013
    Posts:
    2
    Same here under 5.3.1p1 and Xcode 7.2 (7C68)
     
  22. jiglesiasf

    jiglesiasf

    Joined:
    Jan 11, 2016
    Posts:
    4
    Some here for 5.2.3f1 :( Any help???
     
  23. binhminh07

    binhminh07

    Joined:
    Dec 3, 2015
    Posts:
    1
    with xcode 7.2 and unity 5.3.1 , only on iphone 4s , i got this error
    dyld: Symbol not found: _gEnableStylusTouch

    Referenced from: /var/mobile/Applications/

    Anybody can help me?It run ok with iphone 5, 6, 6 plus
     
    roundham likes this.
  24. JuanAntonio

    JuanAntonio

    Joined:
    Jan 4, 2013
    Posts:
    7
    I have the same problem when i use a project with google cardboard plugins, i have Unity 5.3.1 and Xcode 7.2 i am trying on iphone6 Plus emulator but i have this error, if i change in Unity -> File -> Build -> Player Settings -> Scripting Backend to IL2CCP i have a error _createRoom. If create other project with only a cube, it is run perfectly. Can be a problem with google cardboard plugins?. Thanks and luck.
     
  25. _Paulius

    _Paulius

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    160
    This has been fixed in 5.3.1p2 and I can no longer reproduce the error with Xcode 7.2.
     
  26. claudioEvoca

    claudioEvoca

    Joined:
    Aug 26, 2012
    Posts:
    8
    Same problem with 5.3.2f1 and 7.2.1 with google cardboard.
     
  27. claudioEvoca

    claudioEvoca

    Joined:
    Aug 26, 2012
    Posts:
    8
    At the moment I can compile Cardboard 0.6 in this way:
    Unity 5.2.2f1
    Xcode 7.1.1
    the problem is to send the app to the phone, in my phone there is 9+ iOS and Xcode 7.1.1 can't recognize it.
    I build an archive and I transfer to the iphone with adhoc way. It works.
    In conclusion where is the problem?: Cardboard 0.6?Unity5.3.2f1?Xcode7.2.1?
     
  28. _Paulius

    _Paulius

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    160
    This seems to be a different bug. Could you submit a bug report with a repro project and send me the bug id (or just post it there)?
     
  29. claudioEvoca

    claudioEvoca

    Joined:
    Aug 26, 2012
    Posts:
    8
    Thanks _Paulius,
    this is the bug id:
    768301
     
  30. claudioEvoca

    claudioEvoca

    Joined:
    Aug 26, 2012
    Posts:
    8
    A little step ahead:
    Unity 5.3.2f1 can create an iOS project with Cardboard 0.6 without problems.
    At the moment I can compile it only with Xcode 7.1.1, Xcode 7.2.1 gives errors like: linker command failed with exit code.1.
    It seems that the problem is between the libraries of Cardboard 0.6 and Xcode 7.2.1. passing through Unity.
    Can a Unity guy inform the google Cardboard developer team of that?
    Thanks,
    Claudio
     
  31. ElBuho

    ElBuho

    Joined:
    Mar 9, 2015
    Posts:
    30
    I've the same problem, but with the apicontext.o library. I'm using Unity 5.3.3f1 and xCode 7.2 (7C68); and I'm not using Cardboard. Plese, solve this issue, please please ;)
     
  32. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    Which platform and scripting backend you see this issue on?

    I could not reproduce this issue either on iOS il2cpp/mono or tvOS on 5.3.3p2. Could you please check whether updating helps?
     
  33. kolmich

    kolmich

    Joined:
    Apr 27, 2009
    Posts:
    147
    Getting linker command failed with exit code 1 on the build server.
    Target: IOS il2cpp
    Unity 5.4.3f1
    XCode 7.3 (build server)


    9816: [xcode] ld: framework not found EveryplayCore
    9817: [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
    9818: [xcode] Ld build/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/tagtoolunity normal armv7
    9819: [xcode] cd /BUILD_PATH/omai.tagtool-2016.default-ios/temp.m7cKXg
    9820: [xcode] export IPHONEOS_DEPLOYMENT_TARGET=8.1

    Building on my local machine using xcode 8 works fine...
    I also have the latest everyplay version.

    Can you tell me if i can do something or do i have to wait for a fix?
    Thank you very much!
     
  34. austinmeow

    austinmeow

    Joined:
    Dec 9, 2016
    Posts:
    1
    +1

    I am seeing this in:

    Unity 5.5.0f3
    XCode Version 8.2 (8C38)
     
  35. MonkeyPuzzle

    MonkeyPuzzle

    Joined:
    Jan 17, 2016
    Posts:
    70
    Also seeing linker errors with Unity 5.5.0f3 and xCode Version 8.2 (8C38)

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I have tried one of everything, but still can not seem to get this working.

    Thanks!
     
  36. FatGamesStudio

    FatGamesStudio

    Joined:
    Jun 28, 2015
    Posts:
    2
    I agree with austinmeow, i have the error in
    Unity 5.5.0f3
    Xcode Version 8.2
     
  37. superchop

    superchop

    Joined:
    Apr 27, 2011
    Posts:
    60
    I get this same issue building locally with:
    Unity 5.5.0f3
    Xcode Version 8.2.1 (8C1002)
     
  38. cstlmode

    cstlmode

    Joined:
    Dec 2, 2014
    Posts:
    88
    i'm getting this too ,
    unity 5.5.3
    Xcode version 8.3.2
    please help
     
  39. VRoxygen

    VRoxygen

    Joined:
    May 10, 2015
    Posts:
    6
    I am building on 5.6.2
    Xcode 8.3.3

    Getting the error:
    Apple Mach-O Linker (Id) Error
    Linker command failed with exit code 1 (use -v to see invocation)

    Did anyone know how to fix it? Bitcode is set to NO
    What else should I possibly add/ remove to make it work?

    Hope someone did figure it out. Please help! Thank you!
     
  40. VRoxygen

    VRoxygen

    Joined:
    May 10, 2015
    Posts:
    6
    I have the same issue. Did you find out how to fix it? Do you mind sharing what you did? Can't find any solutions. Thank you!
     
  41. cstlmode

    cstlmode

    Joined:
    Dec 2, 2014
    Posts:
    88
    @VRoxygen hello ,
    i have just fixed mine after 2 days of struggle , i have tried everything on the forum nothing works , until i found out a thread saying that this was caused by Unity ads plugin , and yeah that was the answer
    i desactivate the integrated unity ads service offered by unity ,delete anything about unity ads on plugin folder , then i downloaded unity ads from the store, installed it , and voila no more of that annoying error
    hope this helps
     
  42. VRoxygen

    VRoxygen

    Joined:
    May 10, 2015
    Posts:
    6
    Thank you very much! Though for now it didn't seem to work for me... What files did you delete? I didn't see any ads related plugins in my Plugin folder. So I installed Unity ads from the Asset store, but still getting this error. Will try to find out what could possibly go wrong.
     
  43. cstlmode

    cstlmode

    Joined:
    Dec 2, 2014
    Posts:
    88
    i can"t remember exactly ,look for a folder called UnityAds on your unity project , that's the one to delete
    just make sure to not use the unity ads integrated in unity ,so deactivate unity ads in services , and use unity ads from the store ,
    if this doesn't work too, try to delete all your plugins that you're using and reinstall them ,
    hope it works this time
     
    VRoxygen likes this.
  44. VRoxygen

    VRoxygen

    Joined:
    May 10, 2015
    Posts:
    6
    Thank you @cstlmode ! I don't have such folder initially and services are deactivated, ads only appear if install them from the asset store. Will try to delete everything, fingers crossed.
     
  45. Grillbrick

    Grillbrick

    Joined:
    Jul 17, 2015
    Posts:
    9
    I am seeing this same error on Unity 2018.2.14f1 (latest) and Xcode 10.0 (10A255) (also Latest). I'm not sure what caused this error to start popping up, perhaps it is the latest version of Xcode, but I would really like to be able to build my projects again. Any input would be useful. Here is my Xcode log for anyone who knows how to read it.
     

    Attached Files:

    • log.zip
      File size:
      19.7 KB
      Views:
      48
  46. lmartellmc

    lmartellmc

    Joined:
    Aug 3, 2018
    Posts:
    4
    Same here... Unity 2018.2.14f1 but using XCode 10.1
     
  47. chumomo

    chumomo

    Joined:
    Jun 30, 2017
    Posts:
    1
    Same error with Unity 2018.2.14f1. I think it's a xCode problem\
     
  48. cuiBono

    cuiBono

    Joined:
    Jun 20, 2018
    Posts:
    3
    had this problem, turned out I just didn't have enough space in my hard drive... so make sure you do :)
     
    toad02 likes this.
  49. SMGX

    SMGX

    Joined:
    Jul 4, 2015
    Posts:
    7
  50. smiletastekittens

    smiletastekittens

    Joined:
    Jul 25, 2018
    Posts:
    1
    I encountered this issue when trying to build for Simulator. It was fixed with the following option:

    1) Edit -> Project Settings -> Player
    2) Select the iOS tab
    3) Expand Other Settings Menu
    4) Locate "Target SDK" option
    5) Select Simulator SDK

    Hope this helps!