Skip to content
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
Merged

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

merged 8 commits into from
Sep 20, 2013

Conversation

fabiopelosin
Copy link
Member

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
Copy link

👍

@holyprin
Copy link

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

@coneybeare
Copy link
Author

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

@dcloud
Copy link

dcloud commented Sep 10, 2013

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

@fabiopelosin
Copy link
Member

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
Copy link

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
Copy link

👍

1 similar comment
@segiddins
Copy link
Member

👍

@sirvine
Copy link

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
Copy link

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
Copy link

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
Copy link
Member

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

@andygeers
Copy link

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

@fabiopelosin
Copy link
Member

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
Copy link
Member

@segiddins
Copy link
Member

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

@fabiopelosin
Copy link
Member

@segiddins you're right 😄

@mikegabriel
Copy link

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

@AliSoftware
Copy link
Contributor

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
Copy link
Member

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
Copy link

kreeger commented Sep 10, 2013

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

@fabiopelosin
Copy link
Member

@kreeger 🍻

@coveralls
Copy link

Coverage Status

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

@sirvine
Copy link

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
Copy link

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
Copy link
Member

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
Copy link

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
Copy link
Author

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

@ppaulojr
Copy link

@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
Copy link
Contributor

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
Copy link

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
Copy link
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
Copy link

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
Problems with 64-bit Builds and Xcode 5 GM
@alloy alloy merged commit 9374330 into master Sep 20, 2013
@coveralls
Copy link

Coverage Status

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

@jxdwinter
Copy link

+1, @irrationalfab Thank you, sir.

@zzz6519003
Copy link

thx!

@zakdances
Copy link

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
Copy link
Contributor

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

@zakdances
Copy link

.@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
Copy link
Contributor

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

@zakdances
Copy link

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
Copy link

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
Copy link

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

@milesmatthias
Copy link

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
Copy link
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
Copy link

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
Copy link

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

@iosdev-republicofapps
Copy link

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
Copy link

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

@kylef
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.