Cocoapods 0.26.1 build fails for device #1450

Closed
johnryan opened this Issue Oct 8, 2013 · 21 comments

Comments

Projects
None yet
5 participants

johnryan commented Oct 8, 2013

After upgrading to 0.26.1 my project build fails when building for device with lots of arm64 errors and "Could not build module" errors. Builds fine in the simulator.

Owner

fabiopelosin commented Oct 8, 2013

Do you have modules enabled in you project? What happens if you enable them (via the build setting)?

johnryan commented Oct 8, 2013

Modules were not enabled, but enabling didn't fix it. Still getting Invalid deployment target and Could not build module errors...modules it can't build include UIKit and Darwin

johnryan commented Oct 8, 2013

i also tried Disabling modules on the generated Pods project. That got rid of the unable to build modules errors, but still have the Invalid deployment target on a few of the pods.

johnryan commented Oct 9, 2013

I was able to resolve this error by turning off build modules in the pod project, and change all the architectures of the static libraries to "Standard" from "Standard (including 64 bit)"

Owner

fabiopelosin commented Oct 9, 2013

@johnryan The architecture issue is confirmed. It would be also interesting to understand if the modules issue is still present with that fix and the exact error message.

johnryan commented Oct 9, 2013

@irrationalfab The other fix is actually unnecessary after changing the architecture. Works fine with modules re-enabled.

Owner

fabiopelosin commented Oct 9, 2013

👍

This issue still persists in 0.26.2 Had to change the architectures for all the static libraries. Not sure if this is getting fixed later, or if the previous fix didn't take. Thanks.

Owner

fabiopelosin commented Oct 10, 2013

Can you post a screen shots which shows the architectures of you target?

Attached, thanks.

screen shot 2013-10-10 at 2 29 46 pm

Owner

fabiopelosin commented Oct 10, 2013

Can you post the full line?

The full line for which row? That screenshot shows all the info for those rows.

Owner

fabiopelosin commented Oct 11, 2013

I wanted all the columns to see where the settings where set (bold values). Never mind, though I discovered where the bug is!

awesome, thanks.

Hi, how this is fixed? after upgrade Cocoapods to 0.26.2, I get errors like this (on one of my dependency):

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: Could not build module 'Darwin'

Owner

fabiopelosin commented Oct 14, 2013

It has been fixed in master.


Sent from Mailbox for iPad

On Mon, Oct 14, 2013 at 12:03 PM, Marcin Krzyzanowski
notifications@github.com wrote:

Hi, how this is fixed? after upgrade Cocoapods to 0.26.2, I get errors like this (on one of my dependency):

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: Could not build module 'Darwin'

Reply to this email directly or view it on GitHub:
#1450 (comment)

I'm using cocoapods 0.28.0 and I'm still getting the Could not build module 'Darwin'compilation error when archiving. I can fix it by disabling modules on the pod project and changing the architectures for all the static libraries but the fix is reverted everytime we do pod update.

Is there anything special I need to do with the project or the podfile? I'm targeting iOS with deployment target 5.0.

platform :ios, "5.0"

Is there anyway to set CLANG_ENABLE_MODULES = NO on the Pods project from the podfile?

Hmm, I found out a way to fix this.

In our main project we had actually had no value for ARCHS and it defaulted to arm7, arm7s. We also had no value for CLANG_ENABLE_MODULES and it defaulted to NO. Explicitly setting these to ARCHS = $(ARCHS_STANDARD) (this makes the property bold in xcode) and CLANG_ENABLE_MODULES=NO made pod update pick up on these values and explicitly set them on the pod projects. Otherwise cocoapods seemed to default to including arm64 and enabling modules which broke everything.

wtmoose referenced this issue in SwiftKickMobile/TLLayoutTransitioning Mar 23, 2014

Closed

Examples not building #4

k06a commented Feb 9, 2015

Just set CLANG_ENABLE_MODULES = NO and got error in this file:

#import <Foundation/Foundation.h>

...

typedef BOOL            jboolean;
        ^^ 
        J2ObjC_common.h:68:9: Unknown type name 'BOOL'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment