atom-archive / electron-starter

Example Electron app
MIT License
530 stars 66 forks source link

'errno.h' and 'assert.h' files not found when building on OS X #43

Closed claudio-silva closed 9 years ago

claudio-silva commented 9 years ago

I get errors when running: npm install script/bootstrap script/buid

Ex, for script/bootstrap

Node: v0.12.0
npm: v1.4.28
Installing build modules...
child_process: customFds option is deprecated, use stdio instead.
In file included from ../src/main.cc:1:
In file included from ../node_modules/nan/nan.h:177:
In file included from /Users/claudio/.node-gyp/0.12.0/deps/uv/include/uv.h:48:
/Users/claudio/.node-gyp/0.12.0/deps/uv/include/uv-errno.h:25:10: fatal error: 'errno.h' file not found
#include <errno.h>
...

or npm install

...
> runas@2.0.0 install /Users/claudio/Sites/test/atom-shell-starter/node_modules/runas
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/runas/src/main.o
In file included from ../src/main.cc:1:
In file included from ../node_modules/nan/nan.h:23:
In file included from /Users/claudio/.node-gyp/0.12.0/deps/uv/include/uv.h:48:
/Users/claudio/.node-gyp/0.12.0/deps/uv/include/uv-errno.h:25:10: fatal error: 'errno.h' file not found
#include <errno.h>
...
anaisbetts commented 9 years ago

Do you have Xcode installed?

claudio-silva commented 9 years ago

I didn't. May I suggest that you add a section on the Readme named "Requirements" listing what one should have installed before attempting to use any of the builder scripts?

claudio-silva commented 9 years ago

I have install Xcode, and now I get another error. I run npm install and it succeeds. Then I run script/bootstrap and it fails:

Node: v0.12.0
npm: v1.4.28
Installing build modules...
Installing apm...
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
  Referenced from: /Users/claudio/Sites/tmp/atom-shell-starter/apm/node_modules/atom-package-manager/node_modules/keytar/build/Release/keytar.node
  Expected in: dynamic lookup

dyld: Symbol not found: _node_module_register
  Referenced from: /Users/claudio/Sites/tmp/atom-shell-starter/apm/node_modules/atom-package-manager/node_modules/keytar/build/Release/keytar.node
  Expected in: dynamic lookup

/Users/claudio/Sites/tmp/atom-shell-starter/apm/node_modules/atom-package-manager/bin/apm: line 40: 29689 Trace/BPT trap: 5       "$binDir/$nodeBin" --harmony_collections "$binDir/../lib/cli.js" "$@"
i

I also tried to script/clean and repeat script/bootstrap, but to no avail.

anaisbetts commented 9 years ago

Sorry for all the trouble - I think your node.js version needs to be 0.10.x, not the one that was just released

claudio-silva commented 9 years ago

Thanks, I'll try again with node 0.10.x.

On 16/02/15 23:01, Paul Betts wrote:

Sorry for all the trouble - I think your node.js version needs to be 0.10.x, not the one that was just released

— Reply to this email directly or view it on GitHub https://github.com/atom/atom-shell-starter/issues/43#issuecomment-74585918.

claudio-silva commented 9 years ago

Ok, I'm using node 0.10.36 now, and Pyton 2.7. script/bootstrapruns fine. But script/build fails at the grunt task:

Running "build-atom-shell" task
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 127, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 35, in main
>>     update_atom_modules('spec')
>>   File "script/bootstrap.py", line 77, in update_atom_modules
>>     execute_stdout([apm, 'install'])
>>   File "/private/var/folders/4j/knpk5tyj5kd5vs8hqkg62wwr0000gn/T/eightoheight-build/atom-shell/script/lib/util.py", line 150, in execute_stdout
>>     execute(argv)
>>   File "/private/var/folders/4j/knpk5tyj5kd5vs8hqkg62wwr0000gn/T/eightoheight-build/atom-shell/script/lib/util.py", line 132, in execute
>>     output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
>>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
>>     process = Popen(stdout=PIPE, *popenargs, **kwargs)
>>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in __init__
>>     errread, errwrite)
>>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child
>>     raise child_exception
>> OSError: [Errno 2] No such file or directory

What now?

anaisbetts commented 9 years ago

@claudio-silva I think you got a half-baked eightoheight-build directory, run bootstrap again

claudio-silva commented 9 years ago

Yes, that fixed it. I've successfully built atom-shell. Thank you very much for your help.

Just a couple of additional questions:

EightOhEight.app
EightOhEight Helper.app

and/or anything more?

anaisbetts commented 9 years ago

@claudio-silva You don't have to think about the helper, you just copy EightOhEight.app over

Is it really 108Mb just for an empty app? I'm shocked...

Apple routinely sends down 1GB+ updates, let's keep it in perspective :) Zipped it will come to ~40MB

claudio-silva commented 9 years ago

Indeed! :-) I just wished there was a lighter solution for developing desktop apps with web technologies. Thanks.

anaisbetts commented 9 years ago

@claudio-silva It's a pain in the ass to get started, but now that it works it'll be mostly out of your face. I'll try to work on making Atom Shell easier to build.

claudio-silva commented 9 years ago

Great! I'm still evaluating my options to find out what is the easiest, simplest, lightest, fastest way to create apps using web tech. I like (and use) Atom and I'm looking forward to using atom-shell-start on my projects. Too bad it doesn't work for mobile. I guess I'll have to use Cordova for that, but it may be difficult to make the same application run on both platforms seamlessly. What are your thoughts on that?

anaisbetts commented 9 years ago

@claudio-silva Atom Shell probably won't ever end up running on Mobile because of iOS, but you could probably pretty easily reimplement the Cordova APIs you need in Atom Shell so you wouldn't have to have as many #IFs in your code

claudio-silva commented 9 years ago

@paulcbetts Thanks for the tip! It could be a very viable solution, if I just map calls from one API to the other.