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

Unable to build the framework #115

Closed
jorlow opened this issue Mar 26, 2014 · 22 comments
Closed

Unable to build the framework #115

jorlow opened this issue Mar 26, 2014 · 22 comments

Comments

@jorlow
Copy link

jorlow commented Mar 26, 2014

I have a fresh checkout of the source, an up to date cocoapods, ran "pod install", and then tried to build the "Analytics.framework" scheme and got the following error.

fatal error: lipo: fat input file (/Users/jorlow/src/segment-io/DerivedData/Analytics/Build/Products/Release/libAnalytics.a) does not contain the specified architecture (x86_64) to thin it to

Any idea what's going on or how I can fix it? I saw this with both Xcode 5 and 5.1

@reinpk
Copy link
Contributor

reinpk commented Mar 26, 2014

I think you'll need to set the Pod project to build for arm64, for some reason the pod project that gets created isn't set by default to build for all architectures. If that's not the issue feel free to re-open :)

@reinpk reinpk closed this as completed Mar 26, 2014
@jorlow
Copy link
Author

jorlow commented Mar 31, 2014

I tried a bunch of things and had a couple co-workers give it a shot too (who are wiser in the ways of cocoapods and xcode). We weren't able to get it working though. Any advice, guidance would be really nice.

@jorlow
Copy link
Author

jorlow commented Mar 31, 2014

I can't figure out how to re-open though.

@reinpk reinpk reopened this Mar 31, 2014
@reinpk
Copy link
Contributor

reinpk commented Mar 31, 2014

will try to look into this week!

@jorlow
Copy link
Author

jorlow commented Mar 31, 2014

Thanks a lot! For what it's worth, I had two others try this on their computer and fail but then a third (with a similar set up to the rest of us) tried and had no problem. So I'm not sure what's going on. But let me know if there's any info I can provide to help!

@reinpk
Copy link
Contributor

reinpk commented Mar 31, 2014

haha oh fun :D ok i'll commandeer someone's computer this week and try it out, did you compare versions or anything? that would be super helpful, thanks man!

@jorlow
Copy link
Author

jorlow commented Mar 31, 2014

What things should we look at besides xcode version and cococapods version?

@reinpk
Copy link
Contributor

reinpk commented Mar 31, 2014

that's probably good!

@jkoppel
Copy link

jkoppel commented Mar 31, 2014

I'm getting this too. I thought I was okay because the "Analytics" scheme built fine, but the "Analytics.framework" scheme is failing with the same error.

@realf
Copy link

realf commented Apr 4, 2014

The same issue here

@realf
Copy link

realf commented Apr 4, 2014

This is what helped to me
https://gist.github.com/realf/9972233

@jorlow
Copy link
Author

jorlow commented Apr 6, 2014

Thanks a lot @realf !

That got me closer, but now I'm seeing this: "lipo: can't open input file: /Users/jorlow/src/segment-io/DerivedData/Analytics/Build/Products/Release/libAnalytics-x86_64-clean.a (No such file or directory)"

@realf
Copy link

realf commented Apr 6, 2014

@jorlow Try to remove it in a framework build phase:

## Create a fat lib from the now cleaned up thin libs and place inside framework
lipo -output "${PRODUCT_PATH}/Versions/A/Analytics" -create \
    "${SYMROOT}/Release/libAnalytics-i386-clean.a" \
    "${SYMROOT}/Release/libAnalytics-armv7-clean.a" \
    "${SYMROOT}/Release/libAnalytics-armv7s-clean.a" \
    "${SYMROOT}/Release/libAnalytics-arm64-clean.a" \
    "${SYMROOT}/Release/libAnalytics-x86_64-clean.a"

@jorlow
Copy link
Author

jorlow commented Apr 6, 2014

Sorry @realf I don't quite understand what you mean.

@realf
Copy link

realf commented Apr 6, 2014

@jorlow
https://gist.github.com/realf/10011777
Here is a gist. Copy and paste it to the build phase "Build Framework" of Analytics.framework

@jorlow
Copy link
Author

jorlow commented Apr 6, 2014

It finally built after I did that and deleted "${SRCROOT}/Pods/Mixpanel/Mixpanel/*.xib". Thanks a lot!

@reinpk
Copy link
Contributor

reinpk commented Apr 6, 2014

this is pretty odd, x86_64 is the architecture required to run the simulator on a 64-bit Mac. Do you have a 32-bit Mac that you're developing on?

@jorlow
Copy link
Author

jorlow commented Apr 6, 2014

Mavericks with latest gen mac book pro + Xcode 5.0. Definitely 64bit.

$ xcodebuild -version
Xcode 5.0.2
Build version 5A3005

$ pod --version
0.29.0

$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

@reinpk
Copy link
Contributor

reinpk commented Apr 12, 2014

have you tried testing the built framework in a simulator demo app? i tried making the suggested changes here locally, and while it also builds successfully for me, a simulator demo app now fails to build with the following error:

ld: warning: missing required architecture x86_64 in file /analytics-ios/Examples/DirectIncludeExample/Analytics.framework/Analytics (4 slices)

when I add back the x86_64 slice then the demo app builds happily for the simulator.

this makes sense since the simulator needs an x86_64 slice. i'm not sure how to debug the framework build issue that all you guys are seeing :/ but for the main repo and framework build script we definitely need to keep that slice in.

i'd love to resolve this since it seems to be a blocker on contributions to the SDK, but not sure how to replicate, sorry!

@reinpk reinpk closed this as completed Apr 12, 2014
@realf
Copy link

realf commented Apr 14, 2014

Well, another blocking thing was Localytics. We had to remove its provider to be able to build the framework.

@reinpk reinpk reopened this Apr 21, 2014
@travisjeffery
Copy link
Contributor

i was recently chatting with someone who had this problem and this was the solution for them

@f2prateek
Copy link
Contributor

Closing, feel free to reopen if you're still encountering issues.

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

No branches or pull requests

6 participants