installation errors on rake #1

Closed
malkomalko opened this Issue May 3, 2012 · 45 comments

Comments

Projects
None yet
@malkomalko

please see gist: https://gist.github.com/794aa238835b9afe7583

after installing cocoapods and following the instructions, I added a few pods

when running rake, when it's trying to install it blows up with an error in the gist

@malkomalko

This comment has been minimized.

Show comment
Hide comment
@malkomalko

malkomalko May 3, 2012

what's interesting is, even after you comment out, or remove the dependency lines from app.pods, when you run a 'rake config' it still shows up in pods

what's interesting is, even after you comment out, or remove the dependency lines from app.pods, when you run a 'rake config' it still shows up in pods

@mattgreen

This comment has been minimized.

Show comment
Hide comment
@mattgreen

mattgreen May 4, 2012

I'm seeing something similar, but it occurs when I attempt using RestKit.

I'm seeing something similar, but it occurs when I attempt using RestKit.

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 4, 2012

Member

@mattgreen Be sure to require one of the RestKit ‘subspecs’ not just ‘RestKit’. See CocoaPods/CocoaPods#160

Member

alloy commented May 4, 2012

@mattgreen Be sure to require one of the RestKit ‘subspecs’ not just ‘RestKit’. See CocoaPods/CocoaPods#160

@mattgreen

This comment has been minimized.

Show comment
Hide comment
@mattgreen

mattgreen May 4, 2012

Yeah I figured that out by trial and error. :)

I still get this:
ERROR! Building vendor project ./vendor/ISO8601DateFormatter' failed to create at least one.a' library.

Yeah I figured that out by trial and error. :)

I still get this:
ERROR! Building vendor project ./vendor/ISO8601DateFormatter' failed to create at least one.a' library.

@malkomalko

This comment has been minimized.

Show comment
Hide comment
@malkomalko

malkomalko May 4, 2012

yah, same for me, it's kind've hit or miss

gonna see if I can take a look into it as well

yah, same for me, it's kind've hit or miss

gonna see if I can take a look into it as well

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 4, 2012

Member

it's kind've hit or miss

Is it, or is it not always with the same libraries?

Member

alloy commented May 4, 2012

it's kind've hit or miss

Is it, or is it not always with the same libraries?

@malkomalko

This comment has been minimized.

Show comment
Hide comment
@malkomalko

malkomalko May 4, 2012

let me do a step by step:

  • so right now for instance I have nothing in the app.pods configuration block.. in fact I just deleted it.
    after running rake config in my project I see that the pods configuration still looks something like this:

https://gist.github.com/42f5efdc09c6b7200a5e

so I'm not sure if that has any effect on any type of caching or if it's just a display bug

  • ok let's wipe out cached vendor folder
  • let's add back our config
    app.pods do
    dependency 'AFNetworking'
    end
  • run rake

➥ rake
Build ./build/iPhoneSimulator-5.1-Development
rake aborted!
can't convert Pathname into String

  • let's try removing the vendor dir and instead doing rake --config (this is where the wonkiness comes in)
    It works here! can't explain it. You see a lot of output lines but it properly launches app.
  • great let's run rake again.. nope same error as #4

let me do a step by step:

  • so right now for instance I have nothing in the app.pods configuration block.. in fact I just deleted it.
    after running rake config in my project I see that the pods configuration still looks something like this:

https://gist.github.com/42f5efdc09c6b7200a5e

so I'm not sure if that has any effect on any type of caching or if it's just a display bug

  • ok let's wipe out cached vendor folder
  • let's add back our config
    app.pods do
    dependency 'AFNetworking'
    end
  • run rake

➥ rake
Build ./build/iPhoneSimulator-5.1-Development
rake aborted!
can't convert Pathname into String

  • let's try removing the vendor dir and instead doing rake --config (this is where the wonkiness comes in)
    It works here! can't explain it. You see a lot of output lines but it properly launches app.
  • great let's run rake again.. nope same error as #4
@mattgreen

This comment has been minimized.

Show comment
Hide comment
@mattgreen

mattgreen May 4, 2012

I've never seen CocoaPods + Motion together install anything yet.

Is there a super-simple library I can try? Even JSONKit (as shown in the example) produces the same result. I just tried making a regular XCode project and using CocoaPods with RestKit (using all the subspecs) and it builds fine.

I've never seen CocoaPods + Motion together install anything yet.

Is there a super-simple library I can try? Even JSONKit (as shown in the example) produces the same result. I just tried making a regular XCode project and using CocoaPods with RestKit (using all the subspecs) and it builds fine.

@danlucraft

This comment has been minimized.

Show comment
Hide comment
@danlucraft

danlucraft May 4, 2012

There's a line in vendor.rb in the method build_static where this glob exists:

Dir.glob('*/**/*.o')

This doesn't seem to be finding all the object files in the directory tree (for ASIHTTPRequest and JSONKit at least). Replacing that glob with:

(Dir.glob('*/**/*.o') + Dir.glob("*.o") + Dir.glob("*/*.o")).uniq

made the build task find all the .o output files and build the .a library correctly.

The new problem is that the Cocoapod gem doesn't seem to be passing all of the .m files in to be built in the first place (for some reason it isn't building ASIHTTPRequest/Classes/ASIAuthenticationDialog.m in particular...)

There's a line in vendor.rb in the method build_static where this glob exists:

Dir.glob('*/**/*.o')

This doesn't seem to be finding all the object files in the directory tree (for ASIHTTPRequest and JSONKit at least). Replacing that glob with:

(Dir.glob('*/**/*.o') + Dir.glob("*.o") + Dir.glob("*/*.o")).uniq

made the build task find all the .o output files and build the .a library correctly.

The new problem is that the Cocoapod gem doesn't seem to be passing all of the .m files in to be built in the first place (for some reason it isn't building ASIHTTPRequest/Classes/ASIAuthenticationDialog.m in particular...)

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 4, 2012

Member

There's a line in vendor.rb in the method build_static where this glob exists:

Dir.glob('*/**/*.o')

This doesn't seem to be finding all the object files in the directory tree (for ASIHTTPRequest and JSONKit at least). Replacing that glob with:

(Dir.glob('*/**/*.o') + Dir.glob("*.o") + Dir.glob("*/*.o")).uniq

made the build task find all the .o output files and build the .a library correctly.

Good find! Will you submit a pull-request for that?

The new problem is that the Cocoapod gem doesn't seem to be passing all of the .m files in to be built in the first place (for some reason it isn't building ASIHTTPRequest/Classes/ASIAuthenticationDialog.m in particular...)

I think I know the problem, will look in a bit.

Member

alloy commented May 4, 2012

There's a line in vendor.rb in the method build_static where this glob exists:

Dir.glob('*/**/*.o')

This doesn't seem to be finding all the object files in the directory tree (for ASIHTTPRequest and JSONKit at least). Replacing that glob with:

(Dir.glob('*/**/*.o') + Dir.glob("*.o") + Dir.glob("*/*.o")).uniq

made the build task find all the .o output files and build the .a library correctly.

Good find! Will you submit a pull-request for that?

The new problem is that the Cocoapod gem doesn't seem to be passing all of the .m files in to be built in the first place (for some reason it isn't building ASIHTTPRequest/Classes/ASIAuthenticationDialog.m in particular...)

I think I know the problem, will look in a bit.

@danlucraft

This comment has been minimized.

Show comment
Hide comment
@danlucraft

danlucraft May 4, 2012

Good find! Will you submit a pull-request for that?

Will do.

I think I know the problem, will look in a bit.

Hacked in a different source file finder (*.m and */*.m) just to get this working, and it all built and I'm using JSONKit and ASIHTTPRequest happily now :)

Good find! Will you submit a pull-request for that?

Will do.

I think I know the problem, will look in a bit.

Hacked in a different source file finder (*.m and */*.m) just to get this working, and it all built and I'm using JSONKit and ASIHTTPRequest happily now :)

alloy added a commit that referenced this issue May 4, 2012

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 4, 2012

Member

@danlucraft

Good find! Will you submit a pull-request for that?

Will do.

Actually, I mistook the file that the problem is in for a file in this repo. vendor.rb is part of RubyMotion itself and thus needs to be fixed by @lrz who is going to do that as soon as possible.

Member

alloy commented May 4, 2012

@danlucraft

Good find! Will you submit a pull-request for that?

Will do.

Actually, I mistook the file that the problem is in for a file in this repo. vendor.rb is part of RubyMotion itself and thus needs to be fixed by @lrz who is going to do that as soon as possible.

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 4, 2012

Member

@danlucraft I’ve just pushed a fix for the other issue you found, thanks for the report!

Member

alloy commented May 4, 2012

@danlucraft I’ve just pushed a fix for the other issue you found, thanks for the report!

@malkomalko

This comment has been minimized.

Show comment
Hide comment
@malkomalko

malkomalko May 4, 2012

@danlucraft what vendor.rb file did you make changes to.. what is the file loc?

@danlucraft what vendor.rb file did you make changes to.. what is the file loc?

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 4, 2012

Member

/Library/RubyMotion/lib/motion/project/vendor.rb iirc

On 4 mei 2012, at 20:18, Robert Malkoreply@reply.github.com wrote:

@danlucraft what vendor.rb file did you make changes to.. what is the file loc?


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

Member

alloy commented May 4, 2012

/Library/RubyMotion/lib/motion/project/vendor.rb iirc

On 4 mei 2012, at 20:18, Robert Malkoreply@reply.github.com wrote:

@danlucraft what vendor.rb file did you make changes to.. what is the file loc?


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

@mrjjwright

This comment has been minimized.

Show comment
Hide comment
@mrjjwright

mrjjwright May 5, 2012

Where are we on this, has the fix been applied or should I manually put in a fix? @danlucraft I changed the line vendor.rb and JSONKit is building now but is there another line I should change somewhere?

Where are we on this, has the fix been applied or should I manually put in a fix? @danlucraft I changed the line vendor.rb and JSONKit is building now but is there another line I should change somewhere?

@eliaskg

This comment has been minimized.

Show comment
Hide comment
@eliaskg

eliaskg May 5, 2012

+1

Got the same problem with RestKit.

eliaskg commented May 5, 2012

+1

Got the same problem with RestKit.

@ntodd

This comment has been minimized.

Show comment
Hide comment
@ntodd

ntodd May 5, 2012

Same problem with GMGridView and AFNetworking. Oddly enough, rake --trace builds fine without the path error, but seems to fail to link the libraries properly.

ntodd commented May 5, 2012

Same problem with GMGridView and AFNetworking. Oddly enough, rake --trace builds fine without the path error, but seems to fail to link the libraries properly.

@leeadkins

This comment has been minimized.

Show comment
Hide comment
@leeadkins

leeadkins May 5, 2012

I'm seeing a similar issue as ntodd. A simple rake (using only AFNetworking) produces the same error as the original post:

Build ./build/iPhoneSimulator-5.1-Development
rake aborted!
can't convert Pathname into String

However, a rake --trace completes without error, loads the simulator, and AFNetworking works fine.

I'm seeing a similar issue as ntodd. A simple rake (using only AFNetworking) produces the same error as the original post:

Build ./build/iPhoneSimulator-5.1-Development
rake aborted!
can't convert Pathname into String

However, a rake --trace completes without error, loads the simulator, and AFNetworking works fine.

@supermarin

This comment has been minimized.

Show comment
Hide comment
@supermarin

supermarin May 5, 2012

+1 , with rake --trace works for me as well

+1 , with rake --trace works for me as well

@skellock

This comment has been minimized.

Show comment
Hide comment
@skellock

skellock May 6, 2012

To fix the "Pathname into String" issue temporarily, try this:

/Library/RubyMotion/lib/motion/project/vendor.rb

Change line 22 from:

  App.info 'Build', @path

To:

  App.info 'Build', @path.to_s

skellock commented May 6, 2012

To fix the "Pathname into String" issue temporarily, try this:

/Library/RubyMotion/lib/motion/project/vendor.rb

Change line 22 from:

  App.info 'Build', @path

To:

  App.info 'Build', @path.to_s
@supermarin

This comment has been minimized.

Show comment
Hide comment
@supermarin

supermarin May 6, 2012

Thanks! that worked

Thanks! that worked

@christian-schulze

This comment has been minimized.

Show comment
Hide comment
@christian-schulze

christian-schulze May 6, 2012

I was getting the same Pathname error whilst using JSONKit pod (RVM 1.13.0 and Ruby 1.9.3p125). Using system ruby (1.8.7) via a .rvmc file silenced the Pathname error. Hope this helps.

I was getting the same Pathname error whilst using JSONKit pod (RVM 1.13.0 and Ruby 1.9.3p125). Using system ruby (1.8.7) via a .rvmc file silenced the Pathname error. Hope this helps.

@dmarkow

This comment has been minimized.

Show comment
Hide comment
@dmarkow

dmarkow May 6, 2012

In vendor.rb, just using Dir.glob('**/*.o') fixed the problem for me.

dmarkow commented May 6, 2012

In vendor.rb, just using Dir.glob('**/*.o') fixed the problem for me.

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 6, 2012

Filed a support ticket via the motion support on this one as well, I'm not having any luck with the suggested fix of:

line 22: App.info 'Build', @path.to_s and then on line 77: Dir.glob('**/*.o') fixes.

Running RVM 1.8.6 & Ruby 1.9.2p290

Filed a support ticket via the motion support on this one as well, I'm not having any luck with the suggested fix of:

line 22: App.info 'Build', @path.to_s and then on line 77: Dir.glob('**/*.o') fixes.

Running RVM 1.8.6 & Ruby 1.9.2p290

@alistairholt

This comment has been minimized.

Show comment
Hide comment
@alistairholt

alistairholt May 6, 2012

I'm on 10.6.8 running rbenv and Ruby 1.9.3-p194 and also had these issues. Fixed for me with the changes to vendor.rb already mentioned:

Line 22: App.info 'Build', @path.to_s
Line 77: objs = Dir.glob('**/*.o')

I'm on 10.6.8 running rbenv and Ruby 1.9.3-p194 and also had these issues. Fixed for me with the changes to vendor.rb already mentioned:

Line 22: App.info 'Build', @path.to_s
Line 77: objs = Dir.glob('**/*.o')

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 6, 2012

@alistairholt Did you do anything other than just open the file, make those changes, save the file & then re-run rake from within your RubyMotion project dir?

@alistairholt Did you do anything other than just open the file, make those changes, save the file & then re-run rake from within your RubyMotion project dir?

@alistairholt

This comment has been minimized.

Show comment
Hide comment
@alistairholt

alistairholt May 6, 2012

@macfanatic nope, that was all I did to get it working. I have since made some other changes to vendor.rb due to and unrelated problem I encountered with --no-64-bit flags on Snow Leopard.

@macfanatic nope, that was all I did to get it working. I have since made some other changes to vendor.rb due to and unrelated problem I encountered with --no-64-bit flags on Snow Leopard.

@dmarkow

This comment has been minimized.

Show comment
Hide comment
@dmarkow

dmarkow May 6, 2012

@macfanatic after making those changes, what error do you get?

dmarkow commented May 6, 2012

@macfanatic after making those changes, what error do you get?

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 6, 2012

I want RestKit installed, but for the time being I'm working with just JSONKit.

So, after making those changes to vendor.rb & running rake, I get:

rake aborted!
No such file or directory - ./vendor/JSONKit

In which case, I go in and manually create ./vendor/JSONKit in my project & rerun rake, resulting in:

     Build ./build/iPhoneSimulator-5.0-Development
     Build ./vendor/JSONKit
    ERROR! Building vendor project `./vendor/JSONKit' failed to create at least one `.a' library.

My current Rakefile contains:

$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'

Motion::Project::App.setup do |app|

  # Use `rake config' to see complete project settings.
  app.name = 'xxxx'
  app.identifier = 'xxxxx'
  app.deployment_target = '5.0'
  app.device_family = :ipad
  app.frameworks += %w(CoreData CFNetwork Security MobileCoreServices SystemConfiguration QuartzCore)
  # app.libs << '/usr/lib/libxml2.dylib'
  app.interface_orientations = [:landscape_left, :landscape_right]

  app.pods do
    # dependency 'Reachability',      '~> 2.0.4'
    # dependency 'RestKit/Network'
    # dependency 'RestKit/UI'
    # dependency 'RestKit/ObjectMapping'
    # dependency 'RestKit/ObjectMapping/JSON'
    dependency 'JSONKit'
  end

end

I'm in the process up updating RVM to HEAD & upgrading to ruby 1.9.3-p125 this evening as well (just started after all this).

I want RestKit installed, but for the time being I'm working with just JSONKit.

So, after making those changes to vendor.rb & running rake, I get:

rake aborted!
No such file or directory - ./vendor/JSONKit

In which case, I go in and manually create ./vendor/JSONKit in my project & rerun rake, resulting in:

     Build ./build/iPhoneSimulator-5.0-Development
     Build ./vendor/JSONKit
    ERROR! Building vendor project `./vendor/JSONKit' failed to create at least one `.a' library.

My current Rakefile contains:

$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'

Motion::Project::App.setup do |app|

  # Use `rake config' to see complete project settings.
  app.name = 'xxxx'
  app.identifier = 'xxxxx'
  app.deployment_target = '5.0'
  app.device_family = :ipad
  app.frameworks += %w(CoreData CFNetwork Security MobileCoreServices SystemConfiguration QuartzCore)
  # app.libs << '/usr/lib/libxml2.dylib'
  app.interface_orientations = [:landscape_left, :landscape_right]

  app.pods do
    # dependency 'Reachability',      '~> 2.0.4'
    # dependency 'RestKit/Network'
    # dependency 'RestKit/UI'
    # dependency 'RestKit/ObjectMapping'
    # dependency 'RestKit/ObjectMapping/JSON'
    dependency 'JSONKit'
  end

end

I'm in the process up updating RVM to HEAD & upgrading to ruby 1.9.3-p125 this evening as well (just started after all this).

@lrz

This comment has been minimized.

Show comment
Hide comment
@lrz

lrz May 6, 2012

Member

I merged the changes in vendor.rb and they will appear in the next build (in a few hours hopefully). Thanks a lot guys for the detective work!

Member

lrz commented May 6, 2012

I merged the changes in vendor.rb and they will appear in the next build (in a few hours hopefully). Thanks a lot guys for the detective work!

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 6, 2012

And looking in ./vendor/JSONKit is interesting, as there isn't a single file in that directory.

And looking in ./vendor/JSONKit is interesting, as there isn't a single file in that directory.

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin May 6, 2012

Contributor

If you create the dir manually CocoaPods thinks that the pod is already installed and skips it (not final behavior, just a stopgap solution).

Contributor

fabiopelosin commented May 6, 2012

If you create the dir manually CocoaPods thinks that the pod is already installed and skips it (not final behavior, just a stopgap solution).

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 6, 2012

@irrationalfab Maybe just permission issues on the ./vendor directory then? I've tried opening it up to 0777 to no effect.

Currently I'm trying to get RestKit to install by placing the source in the ./vendor/RestKit directory & using the vendor_project command, as in:

  app.vendor_project('vendor/RestKit', :xcode, target: 'RestKit')

Appears that everything compiles just fine & the application launches, however when I go to use the class I get failed Objc stub errors:

Objective-C stub for message `post:params:delegate:' type `@@:@@@' not precompiled. Make sure you properly link with the framework or library that defines this message.

Seems like something isn't quite right in the linking phase, am I right?

@irrationalfab Maybe just permission issues on the ./vendor directory then? I've tried opening it up to 0777 to no effect.

Currently I'm trying to get RestKit to install by placing the source in the ./vendor/RestKit directory & using the vendor_project command, as in:

  app.vendor_project('vendor/RestKit', :xcode, target: 'RestKit')

Appears that everything compiles just fine & the application launches, however when I go to use the class I get failed Objc stub errors:

Objective-C stub for message `post:params:delegate:' type `@@:@@@' not precompiled. Make sure you properly link with the framework or library that defines this message.

Seems like something isn't quite right in the linking phase, am I right?

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin May 7, 2012

Contributor

Seems like something isn't quite right in the linking phase, am I right?

@macfanatic I can't comment on RubyMotion side as I haven't played enough with it... yet.

Regarding CocoaPods, I'm not aware of any issue that could result in not creating a Pod folder without raising an error. So my bet is in something like the permissions issues. When I have the chances to test the integration better I'll report back.

Contributor

fabiopelosin commented May 7, 2012

Seems like something isn't quite right in the linking phase, am I right?

@macfanatic I can't comment on RubyMotion side as I haven't played enough with it... yet.

Regarding CocoaPods, I'm not aware of any issue that could result in not creating a Pod folder without raising an error. So my bet is in something like the permissions issues. When I have the chances to test the integration better I'll report back.

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 7, 2012

@irrationalfab Does appear it was a permissions issue, as I tried setting all this up on my other Mac & had no issues getting the code downloaded when I ran rake. Now I'm fighting with FileMD5Hash compiler errors that RubyMotion doesn't appear to know how to handle.

Ie:

     Build ./build/iPhoneSimulator-5.1-Development
     Build ./vendor/FileMD5Hash
   Compile ./vendor/FileMD5Hash/Common/FileMD5Hash.c
In file included from Common/FileMD5Hash.c:26:
/Users/matt/Desktop/Projects/xxx/vendor/FileMD5Hash/Common/FileMD5Hash.h:44:1: error: unknown type name 'FILEMD5HASH_EXTERN'
FILEMD5HASH_EXTERN CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath, 
^
/Users/matt/Desktop/Projects/xxx/vendor/FileMD5Hash/Common/FileMD5Hash.h:44:31: error: expected ';' after top level declarator
FILEMD5HASH_EXTERN CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath, 
                              ^
                              ;
Common/FileMD5Hash.c:43:1: error: unknown type name 'CFStringRef'
CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath,
^
Common/FileMD5Hash.c:43:39: error: unknown type name 'CFStringRef'
CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath,
                                      ^
Common/FileMD5Hash.c:106:5: error: use of undeclared identifier 'result'
    result = CFStringCreateWithCString(kCFAllocatorDefault,
    ^
Common/FileMD5Hash.c:119:12: error: use of undeclared identifier 'result'
    return result;
           ^
6 errors generated.

@irrationalfab Does appear it was a permissions issue, as I tried setting all this up on my other Mac & had no issues getting the code downloaded when I ran rake. Now I'm fighting with FileMD5Hash compiler errors that RubyMotion doesn't appear to know how to handle.

Ie:

     Build ./build/iPhoneSimulator-5.1-Development
     Build ./vendor/FileMD5Hash
   Compile ./vendor/FileMD5Hash/Common/FileMD5Hash.c
In file included from Common/FileMD5Hash.c:26:
/Users/matt/Desktop/Projects/xxx/vendor/FileMD5Hash/Common/FileMD5Hash.h:44:1: error: unknown type name 'FILEMD5HASH_EXTERN'
FILEMD5HASH_EXTERN CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath, 
^
/Users/matt/Desktop/Projects/xxx/vendor/FileMD5Hash/Common/FileMD5Hash.h:44:31: error: expected ';' after top level declarator
FILEMD5HASH_EXTERN CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath, 
                              ^
                              ;
Common/FileMD5Hash.c:43:1: error: unknown type name 'CFStringRef'
CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath,
^
Common/FileMD5Hash.c:43:39: error: unknown type name 'CFStringRef'
CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath,
                                      ^
Common/FileMD5Hash.c:106:5: error: use of undeclared identifier 'result'
    result = CFStringCreateWithCString(kCFAllocatorDefault,
    ^
Common/FileMD5Hash.c:119:12: error: use of undeclared identifier 'result'
    return result;
           ^
6 errors generated.
@zigphroid

This comment has been minimized.

Show comment
Hide comment
@zigphroid

zigphroid May 7, 2012

@macfanatic working on this as well.. FILEMD5HASH_EXTERN is defined in FileMD5Hash_Prefix.pch

Looks like for some reason thats not being included while building? I was able to work around it by manually including it.
I added:
#include "FileMD5Hash_Prefix.pch"

to FileMD5Hash.h:30

Which successfully builds FileMD5Hash.

But then.. get ready to run into build errors in RestKit land..

@macfanatic working on this as well.. FILEMD5HASH_EXTERN is defined in FileMD5Hash_Prefix.pch

Looks like for some reason thats not being included while building? I was able to work around it by manually including it.
I added:
#include "FileMD5Hash_Prefix.pch"

to FileMD5Hash.h:30

Which successfully builds FileMD5Hash.

But then.. get ready to run into build errors in RestKit land..

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 7, 2012

Yep, I get the following errors after making that suggested change:

     Build ./build/iPhoneSimulator-5.1-Development
     Build ./vendor/FileMD5Hash
   Compile ./vendor/FileMD5Hash/Common/FileMD5Hash.c
     Build ./vendor/LibComponentLogging-Core
   Compile ./vendor/LibComponentLogging-Core/lcl.m
     Build ./vendor/LibComponentLogging-NSLog
   Compile ./vendor/LibComponentLogging-NSLog/LCLNSLog.m
/Applications/Xcode.app/Contents/Developer/usr/bin/ranlib: file: libLibComponentLogging-NSLog.a(LCLNSLog.m.o) has no symbols
     Build ./vendor/NSData+Base64
   Compile ./vendor/NSData+Base64/NSData+Base64.m
     Build ./vendor/RestKit
   Compile ./vendor/RestKit/Code/Network/NSData+RKAdditions.m
   Compile ./vendor/RestKit/Code/Network/NSDictionary+RKRequestSerialization.m
   Compile ./vendor/RestKit/Code/Network/NSObject+URLEncoding.m
   Compile ./vendor/RestKit/Code/Network/RKClient.m
In file included from Code/Network/RKClient.m:21:
In file included from /Users/matt/Desktop/Projects/xxx/vendor/RestKit/Code/Network/RKClient.h:22:
In file included from /Users/matt/Desktop/Projects/xxx/vendor/RestKit/Code/Network/RKRequest.h:26:
/Users/matt/Desktop/Projects/xxx/vendor/RestKit/Code/CoreData/CoreData.h:22:9: fatal error: 'ObjectMapping.h' file not found
#import "ObjectMapping.h"
        ^
1 error generated.
rake aborted!

Looks like prefix.pch files aren't being considered in the build process?

Yep, I get the following errors after making that suggested change:

     Build ./build/iPhoneSimulator-5.1-Development
     Build ./vendor/FileMD5Hash
   Compile ./vendor/FileMD5Hash/Common/FileMD5Hash.c
     Build ./vendor/LibComponentLogging-Core
   Compile ./vendor/LibComponentLogging-Core/lcl.m
     Build ./vendor/LibComponentLogging-NSLog
   Compile ./vendor/LibComponentLogging-NSLog/LCLNSLog.m
/Applications/Xcode.app/Contents/Developer/usr/bin/ranlib: file: libLibComponentLogging-NSLog.a(LCLNSLog.m.o) has no symbols
     Build ./vendor/NSData+Base64
   Compile ./vendor/NSData+Base64/NSData+Base64.m
     Build ./vendor/RestKit
   Compile ./vendor/RestKit/Code/Network/NSData+RKAdditions.m
   Compile ./vendor/RestKit/Code/Network/NSDictionary+RKRequestSerialization.m
   Compile ./vendor/RestKit/Code/Network/NSObject+URLEncoding.m
   Compile ./vendor/RestKit/Code/Network/RKClient.m
In file included from Code/Network/RKClient.m:21:
In file included from /Users/matt/Desktop/Projects/xxx/vendor/RestKit/Code/Network/RKClient.h:22:
In file included from /Users/matt/Desktop/Projects/xxx/vendor/RestKit/Code/Network/RKRequest.h:26:
/Users/matt/Desktop/Projects/xxx/vendor/RestKit/Code/CoreData/CoreData.h:22:9: fatal error: 'ObjectMapping.h' file not found
#import "ObjectMapping.h"
        ^
1 error generated.
rake aborted!

Looks like prefix.pch files aren't being considered in the build process?

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 7, 2012

Member

@macfanatic That’s correct, currently they aren't. In the next release (not the upcoming one) we're going to change the way motion-cocoapods uses CocoaPods to make it work exactly like CocoaPods normally does, which will fix these issues.

Member

alloy commented May 7, 2012

@macfanatic That’s correct, currently they aren't. In the next release (not the upcoming one) we're going to change the way motion-cocoapods uses CocoaPods to make it work exactly like CocoaPods normally does, which will fix these issues.

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 7, 2012

@alloy Out of curiosity, when do you expect the release that fixes these issues to be available? We're evaluating RubyMotion to use at the start of an iPad project and this appears to be the last big issue preventing us from going down this path.

If it's going to be awhile out, not going to fit in our deadline :)

Thanks!

@alloy Out of curiosity, when do you expect the release that fixes these issues to be available? We're evaluating RubyMotion to use at the start of an iPad project and this appears to be the last big issue preventing us from going down this path.

If it's going to be awhile out, not going to fit in our deadline :)

Thanks!

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 7, 2012

Member

All of the original issues described in this ticket are fixed in RubyMotion 1.2 and the just released motion-cocoapods 1.0.1 gem. I will create a new ticket regarding the other issue.

Member

alloy commented May 7, 2012

All of the original issues described in this ticket are fixed in RubyMotion 1.2 and the just released motion-cocoapods 1.0.1 gem. I will create a new ticket regarding the other issue.

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy May 7, 2012

Member

@macfanatic We will work on it on Friday. It will most likely be easy enough, but I can’t promise anything yet.

Having said that, you should be probably be able to use CocoaPods as normal (i.e. add a Podfile), but without integrating it into App.xcodeproj (by omitting it from pod install) and add the resulting Pods.xcodeproj as a normal ‘Xcode vendor’. This is essentially what the next version will do :)

HTH.

Member

alloy commented May 7, 2012

@macfanatic We will work on it on Friday. It will most likely be easy enough, but I can’t promise anything yet.

Having said that, you should be probably be able to use CocoaPods as normal (i.e. add a Podfile), but without integrating it into App.xcodeproj (by omitting it from pod install) and add the resulting Pods.xcodeproj as a normal ‘Xcode vendor’. This is essentially what the next version will do :)

HTH.

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 7, 2012

@alloy - Here's what I tried, per your previous suggestion:

  • mate Podfile (contents below)
  • pod install
  • edited the Rakefile to vendor the Pods.xcodeproj project (contents below)

Podfile

platform :ios
dependency 'RestKit/Network'
dependency 'RestKit/UI'
dependency 'RestKit/ObjectMapping/CoreData'
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'

Motion::Project::App.setup do |app|

  # Use `rake config' to see complete project settings.
  app.name = 'xxx'
  app.deployment_target = '5.1'
  app.device_family = :ipad
  app.frameworks += %w(CoreData CFNetwork Security MobileCoreServices SystemConfiguration QuartzCore)
  app.interface_orientations = [:landscape_left, :landscape_right]

  app.vendor_project('Pods', :xcode, target: 'Pods')

  app.pods do
    # dependency 'RestKit/Network'
    # dependency 'RestKit/UI'
    # dependency 'RestKit/ObjectMapping'
    # dependency 'RestKit/ObjectMapping/JSON'
  end

end

Everything builds, but I end up with the following error:

** BUILD SUCCEEDED **

   Compile ./app/app_delegate.rb
   Compile ./app/authentication_center.rb
   Compile ./app/consignment_navigation_view_controller.rb
   Compile ./app/consignors_view_controller.rb
   Compile ./app/login_view_controller.rb
   Compile ./app/infographic_view_controller.rb
   Compile ./app/main_navigation_view_controller.rb
    Create ./build/iPhoneSimulator-5.1-Development/xxx.app
      Link ./build/iPhoneSimulator-5.1-Development/xxx.app/xxx
    Create ./build/iPhoneSimulator-5.1-Development/xxx.app/Info.plist
    Create ./build/iPhoneSimulator-5.1-Development/xxx.app/PkgInfo
      Copy ./resources/infographic.png
    Create ./build/iPhoneSimulator-5.1-Development/xxx.dSYM
  Simulate ./build/iPhoneSimulator-5.1-Development/xxx.app
(main)>> 2012-05-07 14:21:01.568 xxx[31991:fb03] Splitview controller <UISplitViewController: 0x8e5bd30> is expected to have a master view controller before its used!
(main)>> Objective-C stub for message `post:params:delegate:' type `@@:@@@' not precompiled. Make sure you properly link with the framework or library that defines this message.
((null))>> rake aborted!

This appears to the same error if I just download the RestKit source project & slap that in the ./vendor directory & let motion-cocoapods have at it.

@alloy - Here's what I tried, per your previous suggestion:

  • mate Podfile (contents below)
  • pod install
  • edited the Rakefile to vendor the Pods.xcodeproj project (contents below)

Podfile

platform :ios
dependency 'RestKit/Network'
dependency 'RestKit/UI'
dependency 'RestKit/ObjectMapping/CoreData'
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'

Motion::Project::App.setup do |app|

  # Use `rake config' to see complete project settings.
  app.name = 'xxx'
  app.deployment_target = '5.1'
  app.device_family = :ipad
  app.frameworks += %w(CoreData CFNetwork Security MobileCoreServices SystemConfiguration QuartzCore)
  app.interface_orientations = [:landscape_left, :landscape_right]

  app.vendor_project('Pods', :xcode, target: 'Pods')

  app.pods do
    # dependency 'RestKit/Network'
    # dependency 'RestKit/UI'
    # dependency 'RestKit/ObjectMapping'
    # dependency 'RestKit/ObjectMapping/JSON'
  end

end

Everything builds, but I end up with the following error:

** BUILD SUCCEEDED **

   Compile ./app/app_delegate.rb
   Compile ./app/authentication_center.rb
   Compile ./app/consignment_navigation_view_controller.rb
   Compile ./app/consignors_view_controller.rb
   Compile ./app/login_view_controller.rb
   Compile ./app/infographic_view_controller.rb
   Compile ./app/main_navigation_view_controller.rb
    Create ./build/iPhoneSimulator-5.1-Development/xxx.app
      Link ./build/iPhoneSimulator-5.1-Development/xxx.app/xxx
    Create ./build/iPhoneSimulator-5.1-Development/xxx.app/Info.plist
    Create ./build/iPhoneSimulator-5.1-Development/xxx.app/PkgInfo
      Copy ./resources/infographic.png
    Create ./build/iPhoneSimulator-5.1-Development/xxx.dSYM
  Simulate ./build/iPhoneSimulator-5.1-Development/xxx.app
(main)>> 2012-05-07 14:21:01.568 xxx[31991:fb03] Splitview controller <UISplitViewController: 0x8e5bd30> is expected to have a master view controller before its used!
(main)>> Objective-C stub for message `post:params:delegate:' type `@@:@@@' not precompiled. Make sure you properly link with the framework or library that defines this message.
((null))>> rake aborted!

This appears to the same error if I just download the RestKit source project & slap that in the ./vendor directory & let motion-cocoapods have at it.

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic May 7, 2012

@alloy The strange this is I can play around in the IRB-ish prompt via RubyMotion to my heart's content if I just use the RestKit classes & methods myself. However, the moment I access some code that was compiled using RestKit it fails with the Objective-C stub for message 'xxxx' type@@:@@@' not precompiled` error.

@alloy The strange this is I can play around in the IRB-ish prompt via RubyMotion to my heart's content if I just use the RestKit classes & methods myself. However, the moment I access some code that was compiled using RestKit it fails with the Objective-C stub for message 'xxxx' type@@:@@@' not precompiled` error.

@ntodd

This comment has been minimized.

Show comment
Hide comment
@ntodd

ntodd May 7, 2012

FWIW, I also have gotten the ... not precompiled. message on AFNetworking (on the UIImage category) and even several times on UIKit calls...

Considering we're completely on a different problem from the original path error, this might belong in a new issue.

ntodd commented May 7, 2012

FWIW, I also have gotten the ... not precompiled. message on AFNetworking (on the UIImage category) and even several times on UIKit calls...

Considering we're completely on a different problem from the original path error, this might belong in a new issue.

@padi padi referenced this issue in yestoall/PaperFold-pod-DEMO Oct 22, 2012

Closed

rake simulator fails #1

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