Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'No rule to process file … for architecture i386' when building with Xcode bot

I set up continuous integration for my iOS XCode project, but I keep getting lots of warnings when the Xcode bot builds my project. When I build (for running, testing or archiving), I get no warnings.

I think this has something to do with my project setup. I have an 'inner' project in my main project, containing a library that I need. I'm building both projects for the i386 architecture so it can be run in the simulator (so the Xcode bot can run tests).

The exact warning is below. I get this warning for every .m file in my inner project.

Warning: no rule to process file '[…]/CDICMessage.m' of type sourcecode.c.objc for architecture i386

Most Google results on this warning are for .h files that are added to 'compile sources' by mistake, but my .m files should be in there, obviously.

Again, this warning only shows up on the Xcode server, local builds are fine. The build is ok otherwise, the tests succeed and an archive is built. The biggest problem is that the heap of warnings would drown out any other warnings the project might spawn.

like image 677
Bob Vork Avatar asked Jul 02 '14 12:07

Bob Vork


2 Answers

I was having this issue too, but under slightly different circumstances. With the inclusion of native Cocoa Touch Frameworks in iOS 8 I wanted to dump the use of an old, albeit, awesome hack to create iOS frameworks. In so doing, I started getting this exact same warning ... TONS of them! I resolved them by removing i386 and x86_64 from "Valid Architectures" in the Target's Build Settings.

I had added both of these architectures in the "Architectures" section AND in the "Valid Architectures" Build Setting, as I wanted to ensure that these architectures where both available to me when I ran lipo to create a universal (yup, Apple still isn't giving us a way to do this near as I can tell)

By REMOVING the i386 and x86_64 architectures from "Architectures" AND from "Valid Architectures". AND setting "Build Active Architecture Only" to "NO" for BOTH Debug AND Release. I was able to get the desired results without the loads of "No rule to process..." warnings that I was getting on my .m files.

Hope this helps!

like image 198
kodmunki Avatar answered Nov 07 '22 09:11

kodmunki


I am having a similar problem, though in my case it's with several .c files (and a single .m file). warning: no rule to process file '[...]/ioapi.c' of type sourcecode.c.c for architecture x86_64

Now, obviously, I do need the .c files and the .m file to be compiled.

Clearly this isn't limited to .m files. If anyone has ideas for diagnostics to figure out more of the problem I would be happy to carry them out.

like image 2
jbcarpen Avatar answered Nov 07 '22 09:11

jbcarpen