34

Note: getting this on Xcode 4.3.2? Check out the answer to this question.

Note: creating a symbolic link to use the 4.2 lib seems to work fine

cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1\ \(8C148\)/Symbols/
sudo ln -s ../../4.2\ \(8C134\)/Symbols/Developer

After upgrading from 4.2.0 (beta, I believe) to 4.2.1, the libXcodeDebuggerSupport.dylib file is missing, which results in:

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).

which I guess isn't good. Looking at the directory in question I note:

.../DeviceSupport/4.2 (8C134)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib

but

.../DeviceSupport/4.2.1 (8C148)/Symbols/System/
.../DeviceSupport/4.2.1 (8C148)/Symbols/usr/

the above two dirs make up all the content in the 4.2.1 folder. No "Developer" folder. Checking the /usr/ dir there, I find no libXcodeDebuggerSupport.dylib file in the lib dir either, so ln -s'ing isn't an option.

Worth mentioning: after the upgrade, I plugged the iPad in and had to click "Use for development" in Xcode organizer. Doing so, I got a message about symbols missing for that version, and Xcode proceeded to generate such, then failed. I restored the iPad and did "Use for development" again, and nothing about missing symbols appeared...

Update: deletion of /Developer and reinstallation of Xcode from scratch does not fix this issue.

Update 2: I just realized that after the reinstall of Xcode,

.../DeviceSupport/4.2 (8C134)/Symbols

is now a symbolic link,

lrwxr-xr-x  1 root  admin        36 Dec  3 17:17 Symbols -> ../../Developer/SDKs/iPhoneOS4.2.sdk

And the directory in question has the appropriate files. Maybe this is simply a matter of linking the 4.2.1 dir in the same fashion? I'll try that and see if Xcode freaks out. If someone who has this file could provide a md5 sum that would be splendid. This is what it says for me:

$ md5 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2\ \(8C134\)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib 
MD5 (/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2 (8C134)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib) 
    = 08f93a0a2e3b03feaae732691f112688

If the MD5 sum is identical to the output of

$ md5 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1\ \(8C148\)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib 

then we're all set.

Community
  • 1
  • 1
Kalle
  • 13,186
  • 7
  • 61
  • 76
  • when I do the 'sudo ln ...' I get a 'Too many levels of symbolic links' error. While I understand what this means, I have no idea of how to deal with it! Suggestions? – Steve Reed Sr Apr 18 '11 at 01:56
  • From which directory are you doing this? (tyoe 'pwd') Can you paste the actual full command in a comment including from where you're executing it? – Kalle Apr 18 '11 at 12:06

7 Answers7

29

What I just did to solve this problem was:

cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols

and created the symlink was missing:

ln -s ../../4.2\ \(8C134\)/Symbols/Developer/ Developer

It solves my problem.

Trinca
  • 1,606
  • 1
  • 15
  • 17
  • Been waiting for people to confirm whether the MD5 sum matches before I do that, but okay. Trying it now ... – Kalle Dec 16 '10 at 16:15
  • 1
    This seems to be working okay, actually. Wary of suggesting others do this but so far, it's the only solution until someone comes up with something, or Apple fixes their blunder. – Kalle Dec 18 '10 at 17:06
  • Considering other answer by NP Compete ("doesn't use 4.2.1 at all"), it sounds like the dylib is actually interchangeable. Accepting this answer. – Kalle Dec 22 '10 at 06:31
  • I followed this advice with trepidation. It seems to have worked for me. – westsider Dec 22 '10 at 20:50
  • When I am running the above command with my device id I am getting the message "ln: Developer: Permission denied". What should I do? – Abhinav Jan 29 '11 at 21:12
  • I've tried the above fix and am also getting "Permission denied". – hkatz Feb 03 '11 at 18:48
  • Just kidding... I tried a bunch of different things and it i still doing it. I get a EXC_Bad_Access thing at the bottom of xcode... wtf – tallen11 Feb 05 '11 at 21:19
  • 1
    I'm getting "Permission denied".. anyone know who to fix this? – elcool Feb 08 '11 at 06:34
  • 1
    You need to use 'sudo'. Try the two commands at the top of the question (not this answer), as they should work for anyone. – Kalle Feb 10 '11 at 13:07
  • @Kalie, @elcool, The one at the top didn't work for me. I got a message about the syntax being wrong, referring specifically to the first '('. But this one did the trick! – Eric Brotto Feb 19 '11 at 18:55
  • @Eric Brotto: oops, yeah, odd since I copied those straight from commandline, but escapes were missing. Fixed. – Kalle Mar 16 '11 at 20:53
1

If you do not have anything to lose, just dump the whole Developer folder (or Developer4.2 or however you call it). Reinstall from scratch with the official release of iOS 4.2 SDK - "Xcode 3.2.5 and iOS SDK 4.2". I did that and found everything gets installed under 4.2 (8C134) only, and does not use 4.2.1 at all.

NP Compete
  • 2,369
  • 2
  • 16
  • 15
  • It didn't do it. Can you please confirm that you don't get this anymore? – Ali Dec 03 '10 at 15:59
  • I haven't had the time to do this (I'm afraid of the whole key generation stuff that might come after), but I will try to get to it in a few days. – Kalle Dec 03 '10 at 16:02
  • 2
    Ended up doing this now -- nope, doesn't work. The fresh Xcode install wants to create symbol stuff for the iPad, which it starts doing for awhile and then finishes, but the above dir is empty at the end. – Kalle Dec 03 '10 at 18:55
  • I used xcode_3.2.5_and_ios_sdk_4.2_final.dmg - the latest downloaded from Apple, and the dylib gets installed under 4.2. Which one did you use? – NP Compete Dec 06 '10 at 11:42
  • Exactly the same file that I used. (Sorry for late response btw) – Kalle Dec 09 '10 at 16:05
1

I do not have enough points to comment to the accepted answer. Trinca's solution works for me.

Only one addition though: I got a permission denied in Xterm when I tried to execute the ln command.

just had to enter

sudo xterm and enter my admin password for the system and repeat the process in the new terminal.

I am wondering how many people out there are re-installing Xcode because of this issue. It is definitely a huge waste of time, if people went ahead with re-installation without checking for a better solution. Apple has to keep enough reviewers for sdk runtime checks, and not just for our apps :).

SheshPai
  • 319
  • 4
  • 7
  • I updated the solution at the top of the answer (not the accepted solution) with a 'sudo' before the ln line. – Kalle Jan 07 '11 at 12:31
0

Trashing the folder does not properly uninstall Xcode.

Here are the steps to uninstall Xcode from the PDF readme distributed with the installer:

Uninstalling Xcode Developer Tools

To uninstall Xcode developer tools on the boot volume along with the directory, from a Terminal window type:

$ sudo <Xcode>/Library/uninstall-devtools -mode=all

To remove the underlying developer content on the boot volume, but leave the directory and supporting files untouched, from a Terminal window type:

$ sudo <Xcode>/Library/uninstall-devtools --mode=systemsupport

To just remove the UNIX development support on the boot volume, but leave the directory and supporting files untouched, from a Terminal window type:

$ sudo <Xcode>/Library/uninstall-devtools --mode=unixdev

Finally, to just uninstall the directory you can simply drag it to the trash, or from a Terminal window type:

$ sudo <Xcode>/Library/uninstall-devtools --mode=xcodedir

NOTE: The uninstaller that ships with previous versions of the Xcode developer tools will not clean everything off of your system properly. You should use the one installed with these Xcode developer tools.

My gut feeling tells me that this process will properly nuke/replace dylibs like the one that is causing you trouble. At the very least, all trying this will cost you is time.


Shaggy Frog
  • 27,575
  • 16
  • 91
  • 128
  • I'm pretty sure the above instructions are there so that you WON'T have to delete anything other than Xcode. I mean, how often do you delete the entire "/Applications" directory just to get rid of an application that's being troublesome? Regardless though if I run out of things to try, I'll give it a shot. – Kalle Dec 04 '10 at 15:43
0

Do you have the image in ~/Library/iTunes/iPhone Software Updates you could add that to the xcode organizer and get the symbols from there maybe.

I had this issue as well and this did not work for me:

  • Quit XCode
  • Delete the folder /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1\ (8C148)
  • Plug in your iPhone
  • Bring up the organizer. It should ask you to collect the symbols from your phone.
  • Wait while it collects and processes the symbols off your phone.
Tom Belote
  • 590
  • 3
  • 8
  • I did in fact have the software image in ~/Library/iTunes/iPad Software Updates (note iPad, not iPhone), and it was in fact missing in Organizer, and I could add it fine, but not sure how to pull symbols out of it. Right clicking gives "Delete" and "Reveal in Finder" as only two options. – Kalle Dec 04 '10 at 15:46
0

To resolve this issue, I simply copied the the following directories to the /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols directory:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib/info/
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/Developer/

Once copied over, debugging on the device works normally and no more error messages in the console are received.

Hopefully this helps others that are struggling with debugging on 4.2.1 devices. Happy Holidays!

0

What I did was just navigate over to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/Symbols/ and just drop the whole Developer folder into /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/

Worked! :)

canzhiye
  • 1,185
  • 1
  • 7
  • 5