Lots of warnings when building with Xcode 7 with 3rd party libraries

I am getting a large number of warnings when compiling my project in Xcode 7 GM (bitcode is NOT enabled) in regards to third party static libraries. Xcode is complaining about "No such file or directory" or "Could not resolve external type". All of this used to work perfectly, the only changes made were an updated version of the library and the use of Xcode 7 GM.


This seems to be happening with many other people as well, as it can be seen here: http://sensiblecocoa.com/community/topic/2344-warnings-with-stv-500-and-xcode-7-beta-5/


Here is a sample list of warnings:


(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Foundation-3DFYNEBRQSXST.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Foundation-3DFYNEBRQSXST.pcm: No object file for requested architecture

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/ObjectiveC-1RQA2RIXJIE19.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/ObjectiveC-1RQA2RIXJIE19.pcm: No object file for requested architecture

(null): warning: Could not resolve external type c:objc(cs)NSString

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Social-N94D31PLFESQ.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Social-N94D31PLFESQ.pcm: No object file for requested architecture

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Accounts-V2GNZG08D26T.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Accounts-V2GNZG08D26T.pcm: No object file for requested architecture

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/CoreLocation-2RB9TGORWT0YQ.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/CoreLocation-2RB9TGORWT0YQ.pcm: No object file for requested architecture

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/UIKit-1V5UHAPTOD24G.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/UIKit-1V5UHAPTOD24G.pcm: No object file for requested architecture

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/CoreGraphics-N94D31PLFESQ.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/CoreGraphics-N94D31PLFESQ.pcm: No object file for requested architecture

(null): warning: Could not resolve external type c:objc(cs)NSObject

(null): warning: Could not resolve external type c:objc(cs)ACAccountStore

(null): warning: Could not resolve external type c:objc(cs)NSMutableArray

(null): warning: Could not resolve external type c:objc(cs)NSError

(null): warning: Could not resolve external type c:objc(cs)NSURL

(null): warning: Could not resolve external type c:objc(cs)NSURLRequest

(null): warning: Could not resolve external type c:objc(cs)NSURLResponse

(null): warning: Could not resolve external type c:objc(cs)NSData

(null): warning: Could not resolve external type c:objc(cs)NSDictionary

(null): warning: Could not resolve external type c:objc(cs)ACAccountType

(null): warning: Could not resolve external type c:objc(cs)NSMutableDictionary

(null): warning: Could not resolve external type c:objc(cs)ACAccount

(null): warning: Could not resolve external type c:objc(cs)NSNotification

(null): warning: Could not resolve external type c:objc(cs)NSPredicate

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/SystemConfiguration-354UAJE49HRJF.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/SystemConfiguration-354UAJE49HRJF.pcm: No object file for requested architecture

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Darwin-38I6DLZ5IH61J.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/Darwin-38I6DLZ5IH61J.pcm: No object file for requested architecture

(null): warning: Could not resolve external type c:objc(cs)NSNumber

(null): warning: Could not resolve external type c:objc(cs)NSArray

(null): warning: Could not resolve external type c:objc(cs)NSDate

(null): warning: Could not resolve external type c:objc(cs)UIApplication

(null): warning: Could not resolve external type c:objc(cs)UIDevice

(null): warning: Could not resolve external type c:objc(cs)NSLocale

(null): warning: Could not resolve external type c:objc(cs)NSBundle

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/MachO-1BMJAO5Q3NM3O.pcm: No such file or directory

(null): warning: /var/folders/p4/z7zy68r92hd3p5ry5g2v3k_8rlwzzr/C/org.llvm.clang.dalmo/ModuleCache/1TXZDLI9N2EMV/MachO-1BMJAO5Q3NM3O.pcm: No object file for requested architecture

Accepted Reply

The solution that finally worked for me was a combination of the partial solutions pointed out by BrettThePark and Adrian Prantl (big thanks).


  • Precompile Prefix (GCC_PRECOMPILE_PREFIX_HEADER) = NO
  • Debug Information Format (DEBUG_INFORMATION_FORMAT) = DWARF with dSYM
  • Enabled Modules (C and Objective-C) (CLANG_ENABLE_MODULES) = NO


After that the warnings no longer appear and all else behaves as expected.

Replies

Can not set "Enable Modules = NO" because some dependecies use "@import Foundation;" in header files. Still waiting solutions. Thanks...

This did not resolve my problem.


Also, an unanswered stack overflow post referencing this one. http://stackoverflow.com/questions/33029490/xcode-7-warnings-with-google-signin-lib-when-building-project/33113198#33113198

I think different libraries have different issues but here's what I discovered for my scenario:


It seems dSYM was having trouble with parentheses in my project folder path name. Once I renamed the project folder and removed the parentheses, the warnings went away. i.e. the original project folder name was "My Project (test)". After taking out the parentheses it compiled without warnings (even after a full clean).


Maybe this information will help someone else.

We're also publishing a library and having this problem. I've set GCC_PRECOMPILE_PREFIX_HEADER=NO but I still have the issue. Did you change any of the other settings mentioned in this thread? Or was just that one change enough to eliminate the problem for you?

Worked fine for me. Thank you.

See https://twitter.com/veekoon/status/668097439224737793 for the messages I've just recieved.

Worked Like Charm.

Thank You.

For me the fix was (after long long trials and errors);


CLANG_ENABLE_MODULES = NO;

CLANG_ENABLE_MODULE_DEBUGGING = NO;

I needed auto generated dSYM functionality (for archive) and CLANG_ENABLE_MODULES.
Didn't find good solution so created my own. Just ignore output from dsymutil


cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
sudo mv dsymutil dsymutil_org
sudo nano dsymutil
#file content
#!/bin/bash
$0_org "$@" 2> /dev/null
sudo chmod +x dsymutil

Took forever to find this solution. Works like a charm.

Can I ask what the ramifactions are of changing this setting, if any?

thank you, works great.