New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with 64-bit Builds and Xcode 5 GM #1352

Merged
merged 8 commits into from Sep 20, 2013

Conversation

Projects
None yet
@fabiopelosin
Member

fabiopelosin commented Sep 10, 2013

Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'armv7 armv7s' didn't contain all required architectures 'armv7 armv7s arm64'

I can try and update it myself, but in the future, Cocoapods should add the arm64 architecture to the pods when detected

@masterkain

This comment has been minimized.

masterkain commented Sep 10, 2013

👍

@holyprin

This comment has been minimized.

holyprin commented Sep 10, 2013

even updating it yourself doesn't seem to work. have all mine set fine and getting the same error.

@coneybeare

This comment has been minimized.

coneybeare commented Sep 10, 2013

Ah, perhaps somebody smarter than us will figure out what is really going on here then

@dcloud

This comment has been minimized.

dcloud commented Sep 10, 2013

🙀 I think this means I get to go home early.

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

If I recall correctly you need to clear the architectures and let Xcode handle them. I guess that now we know why we got that warning for the Pod targets. I implemented the fix in the past but I had to revert because Xcode 4 was failing the build.

@kreeger

This comment has been minimized.

kreeger commented Sep 10, 2013

Xcode actually gives me this warning when I attempt to archive, and then it outright fails with this.

ld: library not found for -lPods

Hoping it's related otherwise I have no idea what it'd be. My app's deployment target is 5.1 through 7.0.

@zeeshanlakhani

This comment has been minimized.

zeeshanlakhani commented Sep 10, 2013

👍

1 similar comment
@segiddins

This comment has been minimized.

Member

segiddins commented Sep 10, 2013

👍

@sirvine

This comment has been minimized.

sirvine commented Sep 10, 2013

👍 ...and yes, ld: library not found for -lPods is the Linker Error thrown, so its seems they are related.

@nrj

This comment has been minimized.

nrj commented Sep 10, 2013

If you open your Build Phases you'll also notice that the Pods.xcodeproj dependency is missing and Xcode won't let you add it due to it being rejected as an implicit dependency. Trying to figure out a workaround...

@kreeger

This comment has been minimized.

kreeger commented Sep 10, 2013

How kind of Apple to surprise us with a brand new architecture a week before they expect to go live with our apps!

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

So deleting the Architectures (ARCHS) build setting for all the targets of the Pods project fixed the issue for me. Can you confirm?

@andygeers

This comment has been minimized.

andygeers commented Sep 10, 2013

Can you clarify how you "delete the Architectures build settings"?

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

For clarity the selection is the following:
Pods (the project) -> Pods (the target) -> Build settings

This should be done for each target.

screen_shot_2013-09-11_at_00 13 32

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

@segiddins

This comment has been minimized.

Member

segiddins commented Sep 10, 2013

@irrationalfab I don't think it's redacted any more

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

@segiddins you're right 😄

@mikegabriel

This comment has been minimized.

mikegabriel commented Sep 10, 2013

Confirmed, updated cocoapod gem, deleted Architectures from each of the Pods and was able to Archive & Submit successfully.

@AliSoftware

This comment has been minimized.

Contributor

AliSoftware commented Sep 10, 2013

Confirmed here too.

Having the issue with cocoapods 0.24.0, but removing the ARCHS build setting in each target of the Pods project resolves it 👍

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

The only issue that I have with this is that breaks CocoaPods installations with Xcode 4. I am of the idea that we should release can however I would prefer to check with @alloy tomorrow.

@kreeger

This comment has been minimized.

kreeger commented Sep 10, 2013

@irrationalfab delivers yet again. You, sir, have saved my bacon.

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

@kreeger 🍻

@coveralls

This comment has been minimized.

coveralls commented Sep 10, 2013

Coverage Status

Coverage remained the same when pulling a4cfec2 on xcode-5-support into 31d5b99 on master.

@sirvine

This comment has been minimized.

sirvine commented Sep 10, 2013

As an aside: I was able to fix this by changing the Architecture settings to "Standard architectures (including 64-bit)", which is an option in the drop-down on Build Settings.

@holyprin

This comment has been minimized.

holyprin commented Sep 10, 2013

Errors gone after deleting but build still fails with no errors this time (gonna be fun to debug...). Awful nice of Apple to drop a new arch on us at the last minute.

@fabiopelosin

This comment has been minimized.

Member

fabiopelosin commented Sep 10, 2013

As an aside: I was able to fix this by changing the Architecture settings to "Standard architectures (including 64-bit)", which is an option in the drop-down on Build Settings.

@sirvine That is the default option, so clearing it is equivalent.

@holyprin Try cleaning the project (and ensure that you cleaned the archs for all the targets, and that you are not inhibiting warnings in the Podfile). Failure without errors is very suspicious.

@holyprin

This comment has been minimized.

holyprin commented Sep 10, 2013

I found it, seems it's an external library failing in the linker but didn't warn me. compiled libs always bite you in the butt on GM days...

@coneybeare

This comment has been minimized.

coneybeare commented Sep 10, 2013

Confirmed. This fixes the architecture problem. Still waiting on the patch for the cocoapods bundles with archive bug: #1329

@ppaulojr

This comment has been minimized.

ppaulojr commented Sep 20, 2013

@alloy
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/bundler/gems/Xcodeproj-d7bacd932526 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/bundler/gems/Xcodeproj-d7bacd932526/ext/xcodeproj/gem_make.out

An error occurred while installing xcodeproj (0.10.1), and Bundler cannot continue.
Make sure that gem install xcodeproj -v '0.10.1' succeeds before bundling.

And I did install the xcodeproj 0.10.1

The log file indicated has this

checking for st.h... no
xcodeproj currently requires the (ruby/)st.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
@AliSoftware

This comment has been minimized.

Contributor

AliSoftware commented Sep 20, 2013

I got Ruby 1.8 on my OSX 10.8 and I installed bundler and the HEAD version of CP without any issue, contrary to @ppaulojr who seems to have Ruby 2.0 on his… 10.9?

So maybe @ppaulojr 's problem is related to Ruby 2.0 (and maybe deserve a separated issue on GitHub)?

@kreeger

This comment has been minimized.

kreeger commented Sep 20, 2013

I've been able to run the latest builds of cocoapods and xcodeproj on my OS X 10.9 / Ruby 2.0 setup just fine, even on the latest xcode-5 support branches.

Then again, I'm using a Ruby 2.0.0 that's provided by rbenv. I'm pretty sure this is a separate issue anyway. It's not related to Xcode 5 support.

@alloy

This comment has been minimized.

Member

alloy commented Sep 20, 2013

@ppaulojr @AliSoftware @kreeger Yeah this is a OS X 10.9 + Xcode 5 issue. You need a Xcode developer preview that contains the 10.9 SDK and fix the headers as described in #1108 / https://gist.github.com/goshakkk/5763489.

@coveralls

This comment has been minimized.

coveralls commented Sep 20, 2013

Coverage Status

Coverage remained the same when pulling 0ac79ea on xcode-5-support into 50e19ae on master.

alloy added a commit that referenced this pull request Sep 20, 2013

Merge pull request #1352 from CocoaPods/xcode-5-support
Problems with 64-bit Builds and Xcode 5 GM

@alloy alloy merged commit 9374330 into master Sep 20, 2013

@coveralls

This comment has been minimized.

coveralls commented Sep 20, 2013

Coverage Status

Coverage remained the same when pulling 07b875d on xcode-5-support into 50e19ae on master.

@jxdwinter

This comment has been minimized.

jxdwinter commented Sep 24, 2013

+1, @irrationalfab Thank you, sir.

@zzz6519003

This comment has been minimized.

zzz6519003 commented Sep 26, 2013

thx!

@zakdances

This comment has been minimized.

zakdances commented Sep 27, 2013

I've set the Build Active Architecture Only to YES for Debug on all my targets and I'm still getting

Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'i386' didn't contain all required architectures 'x86_64'

Is there any other config changes that need to be made?

@AliSoftware

This comment has been minimized.

Contributor

AliSoftware commented Sep 27, 2013

@zakdances did you delete the ARCHS build setting (to reset it to its default) too (as explained in this comment and below)?

@zakdances

This comment has been minimized.

zakdances commented Sep 27, 2013

.@AliSoftware Yes, still having the same problem. Same error message. In fact, after deleting the build settings for all pods, there is 2 additional clang errors:

ProcessPCH /Users/zak/Library/Developer/Xcode/DerivedData/MyApp-gdktazrejoumvbdqiadqqxylohnw/Build/Intermediates/PrecompiledHeaders/Pods-AFNetworking-prefix-gkegbehrndllxmfwvcurqbomhzlx/Pods-AFNetworking-prefix.pch.pth Pods-AFNetworking-prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/zak/Zak/projects/libraries/MyApp/XCode/MyApp/Pods
setenv LANG en_US.US-ASCII

error: -fobjc-arc is not supported on platforms using the legacy runtime
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

and

ProcessPCH /Users/zak/Library/Developer/Xcode/DerivedData/MyApp-gdktazrejoumvbdzpadqqoycohnw/Build/Intermediates/PrecompiledHeaders/Pods-Archimedes-prefix-eyssgyncjzbigcdxxzgsdmdqdhxt/Pods-Archimedes-prefix.pch.pth Pods-Archimedes-prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/zak/Zak/projects/libraries/MyApp/XCode/MyApp/Pods
    setenv LANG en_US.US-ASCII

error: -fobjc-arc is not supported on platforms using the legacy runtime
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

What else can I try to fix all these errors?

@AliSoftware

This comment has been minimized.

Contributor

AliSoftware commented Sep 27, 2013

@zakdances Probably the same problem I'm having then here 😒

@zakdances

This comment has been minimized.

zakdances commented Sep 27, 2013

Even after rolling back to version 0.24.0 and 0.23.0 of Cocoapods, the same errors occur. Nothing will compile.

Is there a minimum OSX version or Xcode version that Cocoapods requires that could be an issue? How can I narrow down the cause these errors?

@zakdances

This comment has been minimized.

zakdances commented Sep 28, 2013

After manually settings the Architectures setting of all pods to 64-bit Intel, I was able to get all errors to disappear. I hope this helps anyone else seeing this issue.

@alexnordstrom

This comment has been minimized.

alexnordstrom commented Oct 1, 2013

I got this working by manually targeting only armv7 (removed armv7s) from ARCHS in command line build.

@milesmatthias

This comment has been minimized.

milesmatthias commented Oct 1, 2013

I'm still seeing this issue after trying all of the suggestions on this issue. Pods compiles and runs fine on the simulator, but doesn't run on the device.

@alloy

This comment has been minimized.

Member

alloy commented Oct 2, 2013

TO ALL STILL HAVING ISSUES

This ticket is getting too noisy. Please read the FAQ entry here that’s been extracted from the CHANGELOG.

If you had to preform more work, please create a new ticket and list the settings you needed to change.

@iosdev-republicofapps

This comment has been minimized.

iosdev-republicofapps commented Nov 20, 2013

Why build active architecture only for debug builds and thus require the extra Xcode setting in our projects? Why not just have Cocoapods build all architectures for debug like it does for all other configurations? I guess it's faster to build only for the active arch, but this seems complicated an introduces confusion and support issues for cocoapods.

Is there a compelling reason not to have cocoapods just build all architectures for all configurations, including debug?

Thanks!

@mattconnolly

This comment has been minimized.

mattconnolly commented Nov 20, 2013

Building for active architecture only is the default for new projects in Xcode 5.

@iosdev-republicofapps

This comment has been minimized.

iosdev-republicofapps commented Nov 20, 2013

OK, that's fair then. I'm using this in a project originally created in Xcode 4, so I guess that's why I had the issue then. But I imagine lots of others will have the same problem.

Thanks for letting me know.

@getaaron

This comment has been minimized.

getaaron commented Feb 18, 2014

@alloy Your FAQ link forwards to http://guides.cocoapods.org/using/faq.html, which doesn't address this issue.

@kylef

This comment has been minimized.

Contributor

kylef commented Feb 18, 2014

@getaaron This information should be available in the troubleshooting guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment