Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't map file, errno=22 for architecture x86_64

I'm having a compilation issue

Ld /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug/RemoteDesktop.app/Contents/MacOS/RemoteDesktop normal x86_64
    cd /Users/ppdeveloper/Desktop/app/RemoteDesktop
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    /Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug -F/Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug -filelist /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Intermediates/RemoteDesktop.build/Debug/RemoteDesktop.build/Objects-normal/x86_64/RemoteDesktop.LinkFileList -mmacosx-version-min=10.5 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -framework Cocoa -framework Foundation -framework AppKit /Users/ppdeveloper/Desktop/app/RemoteDesktop/RemoteDesktop/include -fobjc-link-runtime -framework Foundation -framework CoreData -framework AppKit -framework CoreFoundation -lz -framework Cocoa -o /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug/RemoteDesktop.app/Contents/MacOS/RemoteDesktop

ld: **can't map file, errno=22 for architecture x86_64**

clang: error: **linker command failed with exit code 1 (use -v to see invocation)**
like image 425
kunalg Avatar asked May 08 '13 08:05

kunalg


1 Answers

I have no idea where the item /Users/ppdeveloper/Desktop/app/RemoteDesktop/RemoteDesktop/include comes from in your compile/link options, but it looks like a directory, so it’s probably missing a preceeding -I to state that you search in this directory.

If the linker tries to load this directory as a file, it sees an EINVAL aka errno 22.

like image 149
Petesh Avatar answered Sep 28 '22 06:09

Petesh