Search Unity

Xcode build failed - Assertion failed: (memberIndex != 0), function makeObjectFileForMember

Discussion in 'iOS and tvOS' started by DPoli, Nov 2, 2015.

  1. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Greetings,

    I get this error every time I try to build my project in Xcode 7.1 with Unity 5.1.4+ versions:

    Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /Library/Caches/com.apple.xbs/Sources/ld64_PONDEROSA/ld64-253.6/src/ld/parsers/archive_file.cpp, line 355.
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    If I build the Unity project on Unity 5.1.3 it builds fine on Xcode, but any version higher than that I get the above error.

    I have tried to clear the cache as someone suggested in a forum post, but the error still happens.

    Any help will be appreciated...
     
  2. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    BUMP
     
  3. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    BUMP
     
  4. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Could you please submit a bug report with a reproduction project so that we can look into the problem? Thanks
     
  5. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Thanks for the reply.

    I have since tried it in a friend's Mac, and the xcode project builds fine. So the problem is in my xcode/Mac. I know this isn't really the right forum to ask this, but does anyone know what could cause this error while building in xcode?
     
  6. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    It might be that Xcode command line tools are old. Could you try updating them?
     
  7. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    I have reinstalled Xcode to version 7.1.1, I have installed OSX El Capitan, the command line tools version is the same as the Xcode.

    The error is at linking time while building the project in Xcode:

    Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /Library/Caches/com.apple.xbs/Sources/ld64_PONDEROSA/ld64-253.6/src/ld/parsers/archive_file.cpp, line 355.
    0 0x10c6237e2 __assert_rtn + 144
    1 0x10c660ece archive::File<arm64>::makeObjectFileForMember(archive::File<arm64>::Entry const*) const + 1138
    2 0x10c66087c archive::File<arm64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 122
    3 0x10c676f09 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 265
    4 0x10c68024c ld::tool::Resolver::resolveUndefines() + 160
    5 0x10c6825ab ld::tool::Resolver::resolve() + 79
    6 0x10c624500 main + 812


    This only happens in my Mac AND with projects done with Unity 5.1.4 and later versions. And it happens with every project, even with a mostly empty test project...

    If I use Unity 5.1.3 I can build the Xcode project just fine.

    I'm really lost here.... I'm used to Windows so my experience with Mac and Xcode is very limited.
     
  8. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Could you submit a bug report with attached project?
     
  9. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Done, case number 745779. But I can't see what can be done if this only happens in my system.
     
  10. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Thanks, we're investigating.
     
  11. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Meanwhile I have formatted my Mac Mini and the issue was resolved... No idea what caused it though.
     
  12. xcreed_jp

    xcreed_jp

    Joined:
    Aug 20, 2015
    Posts:
    1
    I got exactly same error on Unity 5.3.2f, Xcode 7.1.1.
    I tried to clean cache, reboot, but not worked.
    Two days after, I worked around this!

    This happened when Unity settings are below.
    • Release build
    • Development build unchecked

    So I worked around only to do below
    • Debug build on Unity
    • change to Release on Xcode
     
  13. ankitgoel

    ankitgoel

    Joined:
    Jan 3, 2013
    Posts:
    9
    I am getting the exact same error while making a build for tvOS, and the work around mentioned above isn't working.

    I really don't wanna format my mac, can anyone help ??
     
  14. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    You could try to remove various caches that Xcode uses. First start with this directory:

    /Users/<your user name>/Library/Developer/Xcode/DerivedData/

    And if that does not help, try removing this one:

    /Users/<your user name>/Library/Developer/Xcode/

    Note that Library is a hidden folder, you either need to remove the directory via Terminal or enable the hidden file display option in Finder.