Skip to content

Comment - Can't build framework using rakefile #14

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

Closed
avnerbarr opened this issue Aug 14, 2015 · 8 comments
Closed

Comment - Can't build framework using rakefile #14

avnerbarr opened this issue Aug 14, 2015 · 8 comments
Labels
type:docs Only change in the docs or README

Comments

@avnerbarr
Copy link

Did
git clone --recursive https://github.com/ParsePlatform/Parse-SDK-iOS-OSX.git

from root directory tried running rake command

/Parse-SDK-iOS-OSX : rake package:deployment
rake aborted!
cannot load such file -- naturally

I guess I need to install the "Gemfile" (? )

Tried :

gem install bundler

and then:

bundle install

and then got errors:

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

@nlutsenko
Copy link
Contributor

Hmm. It looks like something is preventing you from installing the gem itself, which looks to be unrelated to how our build scripts work, but rather to your local gem environment.
Our CI via Travis actually includes this step on every build, and it doesn't seem to be failing.

@nlutsenko nlutsenko self-assigned this Aug 14, 2015
@richardjrossiii
Copy link
Contributor

I was able to repro this locally on OS X 10.11. The issue is that in El Capitan, the header iconv.h was moved from /usr/include/iconv.h to $XCODE_DIR/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/iconv.h...

Simple way to solve it, create a symlink from the new path to the old path, e.g.:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/iconv.h /usr/include/iconv.h

Then re-run bundle install.

@lzwjava
Copy link

lzwjava commented Aug 15, 2015

@avnerbarr It's Chinese Great Fire Wall problem .It says,

Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/gems/thread_safe-0.3.5.gem)
An error occurred while installing thread_safe (0.3.5), and Bundler cannot continue.
Make sure that `gem install thread_safe -v '0.3.5'` succeeds before bundling.

Then I configure the proxy. It fixed the problem.

Also, you can try

    bundle config mirror.https://rubygems.org https://ruby.taobao.org

use another mirror which is not blocked in china.

See rapid7/metasploit-framework#5187

@prettyponygirl
Copy link

Yep this doesn't work, tried a bunch of times, this is the error I'm getting, and NO it's not the Great Firewall, I'm in the USA. Here's the error code:

first off, I'm running Yosemite, all up to date, everything is up to date, latest version of all Apple software. Perhaps this is a Ruby version or Rake version problem? I don't know, I've been searching all day for answers. I refuse to use Cocoa Pods, and my hope is that perhaps you can just rebuild it quickly on your end and push that build, prebuild would save everyone time and allow those who enjoy NOT using Pods to use Parse, thank you sir!

rake aborted!
Don't know how to build task 'package:deployment'
.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task_manager.rb:62:in []' .rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:149:ininvoke_task'
.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in block (2 levels) in top_level' .rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:ineach'
.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in block in top_level' .rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:115:inrun_with_threads'
.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:100:in top_level' .rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:78:inblock in run'
.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in standard_exception_handling' .rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:inrun'
.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake:33:in <top (required)>' .rvm/gems/ruby-2.2.1/bin/rake:23:inload'
.rvm/gems/ruby-2.2.1/bin/rake:23:in <main>' .rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:ineval'
.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `

'

just deleted .rvm folder and reinstalled, and just installed ruby 2.2.2, this is the result,

hug:Parse-SDK-iOS-OSX ghrd$ rake package:deployment --trace
rake aborted!

Don't know how to build task 'package:deployment'
.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task_manager.rb:62:in []' .rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:149:ininvoke_task'
.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in block (2 levels) in top_level' .rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:106:ineach'
.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in block in top_level' .rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:115:inrun_with_threads'
.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:100:in top_level' .rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:78:inblock in run'
.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in standard_exception_handling' .rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:75:inrun'
.rvm/rubies/ruby-2.2.2/bin/rake:33:in `

'

here's my gemfile.lock

after running bundle install, here's my gemfile.lock

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.3)
i18n (> 0.7)
json (
> 1.7, >= 1.7.7)
minitest (> 5.1)
thread_safe (
> 0.3, >= 0.3.4)
tzinfo (> 1.1)
claide (0.9.1)
clamp (0.6.5)
cocoapods (0.38.2)
activesupport (>= 3.2.15)
claide (
> 0.9.1)
cocoapods-core (= 0.38.2)
cocoapods-downloader (> 0.9.1)
cocoapods-plugins (
> 0.4.2)
cocoapods-stats (> 0.5.3)
cocoapods-trunk (
> 0.6.1)
cocoapods-try (> 0.4.5)
colored (
> 1.2)
escape (> 0.0.4)
molinillo (
> 0.3.1)
nap (> 0.8)
xcodeproj (
> 0.26.3)
cocoapods-core (0.38.2)
activesupport (>= 3.2.15)
fuzzy_match (> 2.0.4)
nap (
> 0.8.0)
cocoapods-downloader (0.9.1)
cocoapods-plugins (0.4.2)
nap
cocoapods-stats (0.5.3)
nap (> 0.8)
cocoapods-trunk (0.6.1)
nap (>= 0.8)
netrc (= 0.7.8)
cocoapods-try (0.4.5)
colored (1.2)
escape (0.0.4)
fuzzy_match (2.0.4)
i18n (0.7.0)
json (1.8.3)
mini_portile (0.6.2)
minitest (5.8.0)
molinillo (0.3.1)
nap (0.8.0)
naturally (1.3.2)
netrc (0.7.8)
nokogiri (1.6.6.2)
mini_portile (
> 0.6.0)
plist (3.1.0)
rake (10.4.2)
slather (1.8.1)
clamp (> 0.6)
nokogiri (
> 1.6.3)
xcodeproj (> 0.26.2)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (
> 0.1)
xcodeproj (0.26.3)
activesupport (>= 3)
claide (> 0.9.1)
colored (
> 1.2)
xcpretty (0.1.11)

PLATFORMS
ruby

DEPENDENCIES
cocoapods
naturally (~> 1.3.2)
plist
rake
slather
xcodeproj
xcpretty

BUNDLED WITH
1.10.6

@ghost
Copy link

ghost commented Aug 17, 2015

Here's some info that may help, or it may not help, either way, this is what I've managed to extract so far from the rake building process:

My set up, ruby 2.2.2 with rvm, my Gemfile.lock looks exaclty like the post above me and I'm on a late release 2014 Mac Book Pro, I'm up to date on everything using Yosemite, no updates pending. I deleted and reinstalled Home Brew and RVM just to make sure I wasn't going insane when I couldn't build the library using the RakeFile. So, with that said, I then did the following:

First off, I cloned the Repo using this:

git clone --recursive https://github.com/ParsePlatform/Parse-SDK-iOS-OSX.git

then the following steps produced the large error mess in the Pastebin I've attached to this message:

$ cd Parse-SDK-iOS-OSX
$ gem install bundler
$ gem update
$ bundle install
$ rake -T -A

rake build:ios # Build iOS framework
rake build:osx # Build OS X framework
rake package:frameworks[version] # Build and package all frameworks for the release
rake package:prepare #
rake package:starters[version] # Build and package all starter projects for the release
rake test:deployment # Run Deployment Tests
rake test:ios # Run iOS Tests
rake test:osx # Run OS X Tests
rake test:podspecs # Run Podspec Lint
rake test:starters # Run Starter Project Tests

NO listing for "package:deployment", but that's fine, so I went wild west and derived the "best guess" based on what I saw, back to terminal:

$ rake package:prepare //why not give it a shot, perhaps I have to prepare something?

**nothing happened with the above command, but I didn't get shut down, so that is a good sign*

$ rake package:frameworks[aRandomNumber] //I'm guessing here, so I picked 1.1 as a solid number just to see what happened//

AFTER my handy guess work of putting in "1.1" the following happened:

▸ Cleaning Parse/Parse-iOS [Release]
▸ Cleaning Bolts/Bolts [Release]
▸ Building Bolts/Bolts [Release]
▸ Processing iOS-Info.plist
▸ Copying BFWebViewAppLinkResolver.h
▸ Copying BFAppLinkNavigation.h
▸ Copying BFTask.h
▸ Copying BFAppLinkReturnToRefererController.h
▸ Copying BFAppLinkResolving.h
▸ Copying BFAppLinkReturnToRefererView.h
▸ Copying BFExecutor.h
▸ Copying BFTaskCompletionSource.h
▸ Copying BFCancellationTokenSource.h
▸ Copying BFAppLinkTarget.h
▸ Copying BoltsVersion.h
▸ Copying BFAppLink.h
▸ Copying BFMeasurementEvent.h
▸ Copying BFURL.h
▸ Copying BFCancellationTokenRegistration.h
▸ Copying Bolts.h
▸ Copying BFCancellationToken.h
▸ Precompiling Bolts/Bolts-Prefix.pch
▸ Precompiling Bolts/Bolts-Prefix.pch
▸ Compiling BFAppLinkTarget.m
▸ Compiling BFCancellationTokenRegistration.m
▸ Compiling BFTaskCompletionSource.m
▸ Compiling BFCancellationToken.m
▸ Compiling BFAppLinkReturnToRefererView.m
▸ Compiling BFAppLinkReturnToRefererController.m
▸ Compiling BFWebViewAppLinkResolver.m
▸ Compiling BFTask.m
▸ Compiling Bolts.m
▸ Compiling BFAppLink.m
▸ Compiling BFExecutor.m
▸ Compiling BFURL.m
▸ Compiling BFCancellationTokenSource.m
▸ Compiling BFAppLinkNavigation.m
▸ Compiling BFMeasurementEvent.m
▸ Compiling BFAppLinkTarget.m
▸ Compiling BFCancellationTokenRegistration.m
▸ Compiling BFTaskCompletionSource.m
▸ Compiling BFCancellationToken.m
▸ Compiling BFAppLinkReturnToRefererView.m
▸ Compiling BFAppLinkReturnToRefererController.m
▸ Compiling BFWebViewAppLinkResolver.m
▸ Compiling BFTask.m
▸ Compiling Bolts.m
▸ Compiling BFAppLink.m
▸ Compiling BFExecutor.m
▸ Compiling BFURL.m
▸ Compiling BFCancellationTokenSource.m
▸ Compiling BFAppLinkNavigation.m
▸ Compiling BFMeasurementEvent.m
▸ Touching Bolts.framework
▸ Cleaning Bolts/Bolts [Release]
▸ Building Bolts/Bolts [Release]
▸ Processing iOS-Info.plist
▸ Copying BFWebViewAppLinkResolver.h
▸ Copying BFAppLinkNavigation.h
▸ Copying BFTask.h
▸ Copying BFAppLinkReturnToRefererController.h
▸ Copying BFAppLinkResolving.h
▸ Copying BFAppLinkReturnToRefererView.h
▸ Copying BFExecutor.h
▸ Copying BFTaskCompletionSource.h
▸ Copying BFCancellationTokenSource.h
▸ Copying BFAppLinkTarget.h
▸ Copying BoltsVersion.h
▸ Copying BFAppLink.h
▸ Copying BFMeasurementEvent.h
▸ Copying BFURL.h
▸ Copying BFCancellationTokenRegistration.h
▸ Copying Bolts.h
▸ Copying BFCancellationToken.h
▸ Precompiling Bolts/Bolts-Prefix.pch
▸ Precompiling Bolts/Bolts-Prefix.pch
▸ Precompiling Bolts/Bolts-Prefix.pch
▸ Compiling BFAppLinkTarget.m
▸ Compiling BFCancellationTokenRegistration.m
▸ Compiling BFTaskCompletionSource.m
▸ Compiling BFCancellationToken.m
▸ Compiling BFAppLinkReturnToRefererView.m
▸ Compiling BFAppLinkReturnToRefererController.m
▸ Compiling BFWebViewAppLinkResolver.m
▸ Compiling BFTask.m
▸ Compiling Bolts.m
▸ Compiling BFAppLink.m
▸ Compiling BFExecutor.m
▸ Compiling BFURL.m
▸ Compiling BFCancellationTokenSource.m
▸ Compiling BFAppLinkNavigation.m
▸ Compiling BFMeasurementEvent.m
▸ Compiling BFAppLinkTarget.m
▸ Compiling BFCancellationTokenRegistration.m
▸ Compiling BFTaskCompletionSource.m
▸ Compiling BFCancellationToken.m
▸ Compiling BFAppLinkReturnToRefererView.m
▸ Compiling BFAppLinkReturnToRefererController.m
▸ Compiling BFWebViewAppLinkResolver.m
▸ Compiling BFTask.m
▸ Compiling Bolts.m
▸ Compiling BFAppLink.m
▸ Compiling BFExecutor.m
▸ Compiling BFURL.m
▸ Compiling BFCancellationTokenSource.m
▸ Compiling BFAppLinkNavigation.m
▸ Compiling BFMeasurementEvent.m
▸ Compiling BFAppLinkTarget.m
▸ Compiling BFCancellationTokenRegistration.m
▸ Compiling BFTaskCompletionSource.m
▸ Compiling BFCancellationToken.m
▸ Compiling BFAppLinkReturnToRefererView.m
▸ Compiling BFAppLinkReturnToRefererController.m
▸ Compiling BFWebViewAppLinkResolver.m
▸ Compiling BFTask.m
▸ Compiling Bolts.m
▸ Compiling BFAppLink.m
▸ Compiling BFExecutor.m
▸ Compiling BFURL.m
▸ Compiling BFCancellationTokenSource.m
▸ Compiling BFAppLinkNavigation.m
▸ Compiling BFMeasurementEvent.m
▸ Touching Bolts.framework
▸ Cleaning Bolts/MacBolts [Release]
▸ Building Bolts/MacBolts [Release]
▸ Processing Mac-Info.plist
▸ Precompiling Bolts/Bolts-Prefix.pch
▸ Compiling BFTaskCompletionSource.m
▸ Compiling BFTask.m
▸ Compiling Bolts.m
▸ Compiling BFCancellationTokenRegistration.m
▸ Compiling BFCancellationTokenSource.m
▸ Compiling BFExecutor.m
▸ Compiling BFCancellationToken.m
▸ Copying BFCancellationTokenRegistration.h
▸ Copying BFTask.h
▸ Copying BFCancellationTokenSource.h
▸ Copying BFExecutor.h
▸ Copying BFTaskCompletionSource.h
▸ Copying BoltsVersion.h
▸ Copying Bolts.h
▸ Copying BFCancellationToken.h
▸ Touching Bolts.framework
▸ Building Parse/Parse-iOS [Release]
▸ Processing Framework.plist
▸ Running script 'Generate Localizable Strings'
▸ Compiling PFWeakValue.m
▸ Compiling PFCommandURLRequestConstructor.m

I was feeling pretty good about myself, but THEN, the following nightmare happened:

http://pastebin.com/fGtsG3mt

That's a lot nasty errors, so, I looked in the build folder and I found this:

This is a screenshot of the Parse 1.7.5 build to my new "I'm just playing with rake commands build" and here's the comparison. I've not tried to run with this library since it had a lot errors due to my not so successful guess work:

asd

So, anyway, I zipped up this entire folder and did this:

$ git clone --recursive https://github.com/ParsePlatform/Parse-SDK-iOS-OSX.git
$ cd Parse-SDK-iOS-OSX
$ gem install bundler
$ gem update
$ bundle install
$ rake -T -A

rake build:ios # Build iOS framework
rake build:osx # Build OS X framework
rake package:frameworks[version] # Build and package all frameworks for the release
rake package:prepare #
rake package:starters[version] # Build and package all starter projects for the release
rake test:deployment # Run Deployment Tests
rake test:ios # Run iOS Tests
rake test:osx # Run OS X Tests
rake test:podspecs # Run Podspec Lint
rake test:starters # Run Starter Project Tests
$ rake package:prepare
$ rake rake build:ios //because I'm just needing this for IOS

and BOOM, here's the output:
No errors, no mess, just a bunch of happy messages saying things like "copying", "cleaning", "processing", "precompiling", etc.

Here's the very long output:
http://pastebin.com/w5tCzS3D

So, this looks like the build MAY have worked, right? Well, I'd say that I feel confident that the build worked, but the truth is that my knowledge of Ruby is building just a simple web site, and as such, my knowledge of Ruby is at the level of ZERO knowledge at all, but it looks like I may have a good start, so here's the final screenshot, but I'll need a "hell yeah" or a "you f*&cked up bad" before I'll know if this is what I'm supposed to be seeing.

Screenshot of Ruby experiment:

asdfasd

Oh yeah, there's more to this screenshot, but it looks the same as the iphonesimulator release and is named "Release-ios-iphoneos"

Thanks a billion, you are doing a good service!

...

Continuation, after all of that, I just did the same thing as above again, but I just called to these two items:

$ rake package:prepare
$ rake rake package:frameworks

I didn't put any numbers in the "frameworks" brakects, I just left it blank, and here's the log, no errors, the script built a zipped archive named "Parse-OSX.zip", and looks like it may have done what it was suppose to do, I'll wait for you to decide if this method works, but here's the screen shot:

af

And here's the log:

http://pastebin.com/drYXtYSf

Again, thanks for everything you do, let me know if you need any other information to help you out!

@nlutsenko
Copy link
Contributor

@larceneaux, this is mind-blowingly amazing repro. The best one I've seen in my life!
Thank you so much!

I think we have a wrong statement on the read me - the one you are looking for is definetly 'rake package:frameworks'. It should produce 2 archives inside 'build/release' folder.

Will dive deep into this tomorrow and will update this issue on my findings.

@nlutsenko nlutsenko added type:docs Only change in the docs or README and removed needs repro labels Aug 17, 2015
@ghost
Copy link

ghost commented Aug 17, 2015

No problem, I'm anal about getting stuff to work, again, thanks for everything!

@ghost
Copy link

ghost commented Aug 17, 2015

Also, one last quick thing, I just tested it, and it works, here's the layout in Xcode, it compiled AND ran on the simulator with a "You're all set with Parse" message after a quick "clean" and everything is linking perfectly:

untitled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs Only change in the docs or README
Projects
None yet
Development

No branches or pull requests

5 participants