SparkyNZ
SparkyNZ

Reputation: 6676

Xcode: Cannot parse the debug map for .. is a directory

I'm trying to link my iPhone simulator project and I'm getting the following error at link time:

(null): error: cannot parse the debug map for "/Users/admin/Library/Developer/Xcode/DerivedData/TrainTracks-agvvryrtufplkxecblncwedcelck/Build/Products/Debug-iphonesimulator/TrainTracks.app/TrainTracks": Is a directory

Here's the linker output:

GenerateDSYMFile /Users/admin/Library/Developer/Xcode/DerivedData/TrainTracks-agvvryrtufplkxecblncwedcelck/Build/Products/Debug-iphonesimulator/TrainTracks.app.dSYM /Users/admin/Library/Developer/Xcode/DerivedData/TrainTracks-agvvryrtufplkxecblncwedcelck/Build/Products/Debug-iphonesimulator/TrainTracks.app/TrainTracks
    cd /Work/TrainTracks/TrainTracks
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/admin/Library/Developer/Xcode/DerivedData/TrainTracks-agvvryrtufplkxecblncwedcelck/Build/Products/Debug-iphonesimulator/TrainTracks.app/TrainTracks -o /Users/admin/Library/Developer/Xcode/DerivedData/TrainTracks-agvvryrtufplkxecblncwedcelck/Build/Products/Debug-iphonesimulator/TrainTracks.app.dSYM

error: cannot parse the debug map for "/Users/admin/Library/Developer/Xcode/DerivedData/TrainTracks-agvvryrtufplkxecblncwedcelck/Build/Products/Debug-iphonesimulator/TrainTracks.app/TrainTracks": Is a directory

What would cause this problem?

I started off with a Game template (Xcode 7.2.1) and deleted the main story board and AppDelegate.* files since this is an SDL cross-platform project.

Upvotes: 14

Views: 16517

Answers (8)

Geet
Geet

Reputation: 2437

In My case I had to delete my entire repository and clone again, nothing else worked, after fresh cloning, I ran a pod install and it worked.

Upvotes: 0

llama591
llama591

Reputation: 473

If you are using CocoaPods, and you get this error after changing the name of your Target, click on your target, go to the General tab, scroll down to "Linked Frameworks and Libraries" and then delete the following library:

libPods-YourOldTargetName.a

Upvotes: 3

nalexn
nalexn

Reputation: 10811

In my case, this same error showed up because one of the frameworks used in the app was compiled without Bitcode, so I had to turn off Bitcode for the entire project.

enter image description here

Upvotes: 1

Will Larche
Will Larche

Reputation: 3149

For me, it was because I changed my target name which made a new cocoa pods .a library but didn't remove the other from linking.

Upvotes: 0

Gabriel Jensen
Gabriel Jensen

Reputation: 4122

In my case, I had made a duplicate of one of my .m files in the finder to keep as reference, and somehow (most likely my error) it was added to the project explorer. The real error was duplicate definitions since the class appeared twice. Removing the "ClassNameHere_copy.m" fixed the issue.

Upvotes: 0

Stefan S
Stefan S

Reputation: 741

I ran into this problem trying to run my tests, and it was because my test target required the use of one of the pods I had in my Podfile. To fix it I just added my test target to the Podfile and included the relevant pods, as per the following pattern:

workspace 'myproject.xcworkspace'
platform :ios, '8.0'

use_frameworks!

def shared_pods
    pod 'RealmSwift', '~> 2.8'
end

project 'myproject.xcodeproj'

target :MyProject do
    project 'myproject.xcodeproj'
    shared_pods
end

target :MyProjectTests do
    project 'myproject.xcodeproj'
    shared_pods
end

Upvotes: 1

Tom Andersen
Tom Andersen

Reputation: 7200

For me this error was the inclusion of the same .m file twice in the project. Happened while moving some files around. Quit Xcode, clean and it told me the file in a linker error.

Upvotes: 2

SparkyNZ
SparkyNZ

Reputation: 6676

This problem was caused by a second inclusion of a TrainTracks folder in my project. I already had a yellow TrainTracks group with all of my source but for some reason Xcode was also showing a blue TrackTracks folder as well. This has a duplicate info.plist and other files. I removed the blue folder reference and the project now builds successfully.

Upvotes: 12

Related Questions