bengfarrell / buddycopspreso

ForwardJS Presentation - Polymer + Atom-Shell: HTML 5 Buddy Cops
0 stars 0 forks source link

Build instructions don't seem to work #2

Open aldeka opened 9 years ago

aldeka commented 9 years ago

After the talk yesterday, I cloned this repo in order to experiment with atom-shell. Installed Atom afresh, ran bower install with no problems. But apm install fails with the following log:

manzanita:buddycopspreso karenr$ apm install
Installing modules ✗
> genericnodeaddon@0.0.1 install /Users/karenr/Code/buddycopspreso/node_modules/genericnodeaddon
> node-gyp rebuild

  CXX(target) Release/obj.target/bigmaths/src/bigmaths.o

npm WARN package.json buddycopspreso@0.0.1 No repository field.
npm WARN package.json poshery@0.1.0 No description
npm WARN package.json poshery@0.1.0 No repository field.
In file included from ../src/bigmaths.cpp:3:
../../nan/nan.h:67:21: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
typedef v8::String::ExternalAsciiStringResource
        ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ExternalStringResource
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/deps/v8/include/v8.h:1936:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bigmaths.cpp:3:
In file included from ../../nan/nan.h:74:
../../nan/nan_new.h:164:26: error: class member cannot be redeclared
  static inline return_t New(NanExternalOneByteStringResource * value);
                         ^
../../nan/nan_new.h:163:26: note: previous declaration is here
  static inline return_t New(v8::String::ExternalStringResource * value);
                         ^
In file included from ../src/bigmaths.cpp:3:
In file included from ../../nan/nan.h:74:
In file included from ../../nan/nan_new.h:190:
../../nan/nan_implementation_12_inl.h:222:22: error: redefinition of 'New'
Factory<v8::String>::New(NanExternalOneByteStringResource * value) {
                     ^
../../nan/nan_implementation_12_inl.h:217:22: note: previous definition is here
Factory<v8::String>::New(v8::String::ExternalStringResource * value) {
                     ^
In file included from ../src/bigmaths.cpp:3:
In file included from ../../nan/nan.h:74:
../../nan/nan_new.h:319:1: error: redefinition of 'NanNew'
NanNew(NanExternalOneByteStringResource * value) {
^
../../nan/nan_new.h:313:1: note: previous definition is here
NanNew(v8::String::ExternalStringResource * value) {
^
In file included from ../src/bigmaths.cpp:3:
../../nan/nan.h:1790:17: error: no member named 'GetExternalAsciiStringResource' in 'v8::String'; did you mean 'GetExternalOneByteStringResource'?
    return str->GetExternalAsciiStringResource();
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                GetExternalOneByteStringResource
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/deps/v8/include/v8.h:2003:40: note: 'GetExternalOneByteStringResource' declared here
  const ExternalOneByteStringResource* GetExternalOneByteStringResource() const;
                                       ^
In file included from ../src/bigmaths.cpp:3:
../../nan/nan.h:1790:12: error: cannot initialize return object of type 'const NanExternalOneByteStringResource *' (aka 'const v8::String::ExternalStringResource *') with an rvalue of type 'const v8::String::ExternalOneByteStringResource *'
    return str->GetExternalAsciiStringResource();
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1800:17: error: no member named 'IsExternalAscii' in 'v8::String'; did you mean 'IsExternal'?
    return str->IsExternalAscii();
                ^~~~~~~~~~~~~~~
                IsExternal
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/deps/v8/include/v8.h:1900:8: note: 'IsExternal' declared here
  bool IsExternal() const;
       ^
In file included from ../src/bigmaths.cpp:3:
../../nan/nan.h:1825:11: error: assigning to 'const char *' from incompatible type 'const uint16_t *' (aka 'const unsigned short *')
    *data = ext->data();
          ^ ~~~~~~~~~~~
../../nan/nan.h:1848:10: error: no matching function for call to 'Encode'
  return node::Encode(
         ^~~~~~~~~~~~
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/src/node.h:272:34: note: candidate function not viable: cannot convert argument of incomplete type 'const void *' to 'const char *'
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
                                 ^
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/src/node.h:278:34: note: candidate function not viable: requires 3 arguments, but 4 were provided
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
                                 ^
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/src/node.h:283:45: note: candidate function not viable: requires at most 3 arguments, but 4 were provided
                inline v8::Local<v8::Value> Encode(
                                            ^
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/src/node.h:64:53: note: expanded from macro 'NODE_DEPRECATED'
#define NODE_DEPRECATED(msg, fn) V8_DEPRECATED(msg, fn)
                                                    ^
/Users/karenr/.atom/.node-gyp/.node-gyp/0.21.0/deps/v8/include/v8config.h:329:45: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message, declarator) declarator
                                            ^
9 errors generated.
make: *** [Release/obj.target/bigmaths/src/bigmaths.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/karenr/Code/buddycopspreso/node_modules/genericnodeaddon
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm WARN prefer global poshery@0.1.0 should be installed with -g
npm ERR! Darwin 13.4.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Applications/Atom.app/Contents/Resources/app/apm/.apmrc" "--userconfig" "/Users/karenr/.atom/.apmrc" "install" "--target=0.21.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.3.0
npm ERR! code ELIFECYCLE

npm ERR! genericnodeaddon@0.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the genericnodeaddon@0.0.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the genericnodeaddon package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls genericnodeaddon
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/karenr/Code/buddycopspreso/npm-debug.log

I ran npm install genericnodeaddon to see if installing it separately would fix it; the npm install appeared to succeed:

manzanita:buddycopspreso karenr$ npm install genericnodeaddon
npm WARN package.json buddycopspreso@0.0.1 No repository field.
npm WARN package.json poshery@0.1.0 No description
npm WARN package.json poshery@0.1.0 No repository field.

> genericnodeaddon@0.0.1 install /Users/karenr/Code/buddycopspreso/node_modules/genericnodeaddon
> node-gyp rebuild

  CXX(target) Release/obj.target/bigmaths/src/bigmaths.o
  SOLINK_MODULE(target) Release/bigmaths.node
  SOLINK_MODULE(target) Release/bigmaths.node: Finished
  CXX(target) Release/obj.target/helloworld/src/helloworld.o
  SOLINK_MODULE(target) Release/helloworld.node
  SOLINK_MODULE(target) Release/helloworld.node: Finished
  CXX(target) Release/obj.target/randomcoords/src/randomcoords.o
  SOLINK_MODULE(target) Release/randomcoords.node
  SOLINK_MODULE(target) Release/randomcoords.node: Finished
genericnodeaddon@0.0.1 node_modules/genericnodeaddon

but then trying to run apm install again failed the same way as before. Unsure what to try next.

I'm running OS X, 10.9.5.

bengfarrell commented 9 years ago

Yep, there's a few reasons there. One is that my docs were sorta terrible.

Do another clone, I have a better readme with some proper instructions this time. The big issue you ran into that you copied/pasted all that output from is that my C++ module seems not to compile on OSX. I'm not sure why, but it was a very minor part of the presentation (just the silly demo on the last 3 slides after my thank you slide).

So I've removed that bit - so there's no reason to do an apm install anymore.

Anyway - I'm sitting here on my OSX machine running the install and setup, and everything checks out and runs for me. Sorry it was a bit ugly before!