Xcode 5 crashes when open external project

    Sep 19 2013 | 7:17 am
    Hi all,
    Xcode 5 is released today, so I tried to build example projects in SDK 6.1.3.
    But, Xcode crashes always when I try to open any projects.
    Someone has same issue or any solutions?
    Here, I'll attach the crash log.

    • Sep 19 2013 | 1:35 pm
      I haven't tested on 10.8 but that looks like the same crash I've with the sea lion. For now you will have to keep using Xcode 4.x.
    • Sep 29 2013 | 2:31 am
      It seems to me that the C74_SYM_LINKER_FLAGS variable in the xcodeconfig gets XCode 5 crashed. Could it be that the maximum length of this config variables changed? There is a lot of data in this variable, I wonder if this could be organized somehow more efficiently ("Flags to enforce some build-time checks for the symbols used while not actually performing a hard link").
    • Sep 30 2013 | 8:59 pm
      That's correct. We'll look into it.
    • Oct 02 2013 | 9:59 pm
      Any word on this? I seem to be having the same issue (same info in crash log), Xcode 5, external project...
    • Oct 03 2013 | 12:31 pm
      The simplest way around the Problem that works for me is to build the project without the additional linker flags (remove them from the configuration), and write the missing links from the error log into the C74_SYM_LINKER_FLAGS configuration variable. Depending on your setup you will need to remove the contents of C74_SYM_LINKER_FLAGS in the MaxMSP SDK distribution. I have my own xcconfig file that overwrites the one from the SDK (specifically this variable).
    • Oct 16 2013 | 5:40 pm
      Has anybody managed to build a Max/MSP example project with Xcode 5?
      I did remove C74_SYM_LINKER_FLAGS and now I can open a project without crashing, however I cannot build it. I keep getting this linker error:
      Undefined symbols for architecture x86_64:
      "_object_method_imp", referenced from:
      _main in myobject.o
      Has anybody already encountered this issue?
      I am on MacOS 10.8.5 using Max/MSP SDK 6.1.3
      - Luigi
    • Oct 16 2013 | 7:53 pm
      We have an update SDK coming up soon. In the meantime, if you put the flags in a text file and set the C74_SYM_LINKER_FLAGS to point to that file, you should be able to open Xcode without crashing and even building ;-)
    • Oct 18 2013 | 7:31 am
      Thanks for your reply Emmanuel,
      I did what you suggested. The project opens but it still doesn't compile.
      Now the linker cannot find all of the functions specified in the file as flags.
      If you have a .xcodeproj file that you can post, that could be of help.
      Otherwise I will wait for the release of the new SDK.
      Thanks again for your help
      - Luigi
    • Oct 18 2013 | 4:10 pm
      You should be able to set the compiler to use Apple LLVM 5.0 and probably mess with the deployment target (you can't build for 10.6 for instance).
    • Oct 18 2013 | 9:38 pm
      Hey Luigi,
      in the solution I suggested in #266925, you will have to write the missing linker flags (which are reported in the error log after building) into the C74_SYM_LINKER_FLAGS variable, i.e. like this:
      C74_SYM_LINKER_FLAGS = -Wl,-U,_atom_getfloat,-U,_atom_getlong,-U,_atom_getsym,-U,_atom_setfloat,-U,_atom_setlong,-U,_atom_setsym and so on
      basically you type -U,[name of the symbol that should be linked to],
      In the attached xcconfig-file you see another example in the last few lines. Don't just copy the file, it's customized and might not work for your project :)
    • Oct 18 2013 | 9:44 pm
      For security reasons, I'm not allowed to upload an xcconfig-file... The interesting part of this file looks like this:
      C74_SYM_LINKER_FLAGS = -Wl,-U,_atom_getfloat,-U,_atom_getlong,-U,_atom_getsym,-U,_atom_setfloat,-U,_atom_setlong,-U,_atom_setsym,-U,_class_addmethod,-U,_class_new,-U,_class_register,-U,_defer,-U,_error,-U,_gensym,-U,_listout,-U,_locatefile_extended,-U,_object_alloc,-U,_object_error,-U,_object_free,-U,_object_method,-U,_object_post,-U,_object_warn,-U,_open_dialog,-U,_outlet_anything,-U,_outlet_list,-U,_path_toabsolutesystempath,-U,_path_topathname,-U,_qelem_free,-U,_qelem_new,-U,_qelem_set,-U,_systhread_create,-U,_systhread_exit,-U,_systhread_join,-U,_systhread_mutex_free,-U,_systhread_mutex_lock,-U,_systhread_mutex_new,-U,_systhread_mutex_unlock,-U,_object_method_imp
    • Oct 21 2013 | 12:57 am
      ok, changing the deployment target to 10.8 and adding the missing linker flags did the trick.
      Now the project opens and compiles perfectly. Thank you EJ and CSAudioDesign for your help.
      - Luigi
    • Oct 28 2013 | 9:28 pm
      SDK update for Xcode 5 compatibility is now available:
      - .. --
    • Nov 07 2013 | 5:13 am
      I've updated to the new SDK and although I can now open my older projects without crashing, I can no longer build my projects. I changed my user-defined C74_SYM_LINKER_FLAGS build setting to point to the c74_linker_flags.txt file (my project is an obj-c framework that is "wrapped" by a max external), but Xcode (v5.0.1) complains that the "file was built for unsupported file format"… I don't imagine this should be particularly hard to fix, but I'm a bit stumped. Other than the linker flags build setting, nothing else should have changed in the project, which worked fine in Xcode 4.6.3.
      ld: warning: ignoring file /Users/jbmaxwell/Documents/xcode/rubato_git/MusiCog_(optimized)/MusiCog/../../MaxSDK-6.1.1/c74support/max-includes/c74_linker_flags.txt, file was built for unsupported file format ( 0x27 0x2D 0x57 0x6C 0x2C 0x2D 0x55 0x2C 0x5F 0x61 0x64 0x64 0x62 0x61 0x6E 0x67 ) which is not the architecture being linked (x86_64): /Users/jbmaxwell/Documents/xcode/rubato_git/MusiCog_(optimized)/MusiCog/../../MaxSDK-6.1.1/c74support/max-includes/c74_linker_flags.txt
      Undefined symbols for architecture x86_64:
      "_object_method_imp", referenced from:
      -[mcMusiCogController logToMax:] in mcMusiCogController.o
      -[mcMusiCogController sendOutputEvent] in mcMusiCogController.o
      -[mcMusiCogController finishBang] in mcMusiCogController.o
      ld: symbol(s) not found for architecture x86_64
      It seems to think I'm trying to link to 32-bit max, but I can't understand why...
      Any thoughts appreciated.
    • Nov 07 2013 | 2:28 pm
      If I remember correctly this made somehow the difference in my tests:
      C74_SYM_LINKER_FLAGS = @$(C74SUPPORT)/max-includes/c74_linker_flags.txt
      Remember to include the @ character before the dollar sign or you will see that error...
      - Luigi
    • Nov 07 2013 | 6:08 pm
      Ah, thanks Luigi. That got me much closer (my framework now compiles!).
      However, I'm now getting errors trying to build the external: 'MacTypes.h' file not found.
      I've seen the various threads on this, and it seemed to be related to older Carbon stuff, and was purported to be solved by building with the 10.7 base SDK. I didn't have that option in my Xcode 5 install, so I copied over the one from Xcode 4.6.3. It does show up in Xcode, and I can select it, but the build error remains! (Well, that's not entirely true; the error shifted slightly from 'Files.h' not found to 'MacTypes.h' not found… ugh…)
      Any idea what else I might try?
    • Nov 07 2013 | 6:57 pm
      Ugh… okay, I've descended to new levels of hackishness and copied my FlatCarbon folder (from 10.7 sdk) into max-includes. It compiles, and the external works, but any thoughts about avoiding this kind of ugliness in future would still be appreciated.