Closed mattvv closed 9 years ago
Note: I used the example from the readme to build the project.
You probably want script/grunt
instead - what happens when you run script/grunt --verbose
?
Also, can you update to the latest version?
Hi there,
I'm just having the same exact issue:
This is what I'm getting:
Running "build-atom-shell" task
Verifying properties build-atom-shell.buildDir, build-atom-shell.tag, build-atom-shell.projectName, build-atom-shell.productName exist in config...OK
>> Running: git remote set-url origin https://github.com/atom/atom-shell
>> Running: git fetch origin
>> Running: git reset --hard HEAD
>> Running: git checkout v0.19.5
>> Rigging atom.gyp to have correct name
Reading /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell/atom.gyp...OK
Writing /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell/atom.gyp...OK
>> bootstrap appears to have been run, skipping it to save time!
>> Running: python script/build.py -c Release -t q
>>
Warning: null Use --force to continue.```
Any idea?
This means that building Atom Shell is failing (for some reason we're not capturing the output properly).
@underkin Can you try running:
cd $TMPDIR/q-build/atom-shell
python script/bootstrap.py
python script/build.py -c Release -t q
Hi,
I did it, and seems it compiled ok. Here is the output, and the Release folder content:
enoch ➜ ~/projects/q/code git:(multiwindow) ✗ cd $TMPDIR/q-build/atom-shell
python script/bootstrap.py
enoch ➜ /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell git:(6c9dbe1) ✗ python script/bootstrap.py
enoch ➜ /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell git:(6c9dbe1) ✗ python script/build.py -c Release -t q
ninja: Entering directory `out/Release'
[32/788] CC obj/vendor/node/deps/uv/src/unix/libuv.stream.o
../../vendor/node/deps/uv/src/unix/stream.c:1054:19: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
char cmsg_space[CMSG_SPACE(UV__CMSG_FD_SIZE)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/socket.h:522:24: note: expanded from macro 'CMSG_SPACE'
#define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../vendor/node/deps/uv/src/unix/stream.c:1054:19: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/socket.h:522:25: note: expanded from macro 'CMSG_SPACE'
#define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/i386/_param.h:43:42: note: expanded from macro '__DARWIN_ALIGN32'
#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
^
1 warning generated.
[788/788] STAMP Q.app
enoch ➜ /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell git:(6c9dbe1) ✗ ls
LICENSE appveyor.yml atom.gyp common.gypi external_binaries node_modules package.json spec vendor
README.md atom chromium_src docs filename_rules.gypi out script tools
enoch ➜ /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell git:(6c9dbe1) ✗ ls out/Release/
Inspector Q Helper.app build.ninja gyp-mac-tool libcares.a libopenssl.a
Inspector.dSYM Q Helper.app.dSYM crash_report_sender.app libbreakpad.a libchrome_zlib.a libq_lib.a
Q Framework.framework Q.app crash_report_sender.app.dSYM libbreakpad_utilities.a libhttp_parser.a libuv.a
Q Framework.framework.dSYM Q.app.dSYM gen libbrightray.a libnode_lib.a obj
enoch ➜ /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/q-build/atom-shell git:(6c9dbe1) ✗
For the records, my versions are: Node: v0.10.33 npm: v1.4.28
Hi again,
So I'm still hitting my head against a wall.
Right now, I can run the task, but it always stops is the same place: If I remove that dependency, it gets stuck in other one line nslog, for example or git-utils
Running "build-atom-shell" task
Verifying properties build-atom-shell.buildDir, build-atom-shell.tag, build-atom-shell.projectName, build-atom-shell.productName exist in config...OK
>> Running: git remote set-url origin https://github.com/atom/atom-shell
>> Running: git fetch origin
>> Running: git reset --hard HEAD
>> Running: git checkout v0.20.0
>> Rigging atom.gyp to have correct name
Reading /var/folders/6n/k47r6fmn3pb9jzh6n6qfx9yc0000gn/T/atom-build/atom-shell/atom.gyp...OK
Writing /var/folders/6n/k47r6fmn3pb9jzh6n6qfx9yc0000gn/T/atom-build/atom-shell/atom.gyp...OK
>> bootstrap appears to have been run, skipping it to save time!
>> Running: python script/build.py -c Release -t mycoolapp
>> Rebuilding native modules against Atom Shell
>> Running: node /Users/jgarcia/projects/q/code/core/build/node_modules/npm/bin/npm-cli.js rebuild --target=0.18.0 --arch=x64
>> gyp WARN install got an error, rolling back install
>> gyp ERR! configure error
>> gyp ERR! stack Error: 404 status code downloading tarball
>> gyp ERR! stack at Request.<anonymous> (/Users/jgarcia/projects/q/code/core/build/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
>> gyp ERR! stack at Request.emit (events.js:117:20)
>> gyp ERR! stack at Request.onResponse (/Users/jgarcia/projects/q/code/core/build/node_modules/npm/node_modules/request/request.js:1085:10)
>> gyp ERR! stack at ClientRequest.g (events.js:180:16)
>> gyp ERR! stack at ClientRequest.emit (events.js:95:17)
>> gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1688:21)
>> gyp ERR! stack at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
>> gyp ERR! stack at Socket.socketOnData (http.js:1583:20)
>> gyp ERR! stack at TCP.onread (net.js:527:27)
>> gyp ERR! System Darwin 14.0.0
>> gyp ERR! command "node" "/Users/jgarcia/projects/q/code/core/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
>> gyp ERR! cwd /Users/jgarcia/projects/q/code/core/node_modules/oniguruma
>> gyp ERR! node -v v0.10.31
>> gyp ERR! node-gyp -v v1.0.1
>> gyp ERR! not ok
>>
>> npm ERR! oniguruma@3.0.4 install: `node-gyp rebuild`
>> npm ERR! Exit status 1
>> npm ERR!
>> npm ERR! Failed at the oniguruma@3.0.4 install script.
>> npm ERR! This is most likely a problem with the oniguruma 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 oniguruma
>> npm ERR! There is likely additional logging output above.
>> npm ERR! System Darwin 14.0.0
>> npm ERR! command "node" "/Users/jgarcia/projects/q/code/core/build/node_modules/npm/bin/npm-cli.js" "rebuild" "--target=0.18.0" "--arch=x64"
>> npm ERR! cwd /Users/jgarcia/projects/q/code/core
>> npm ERR! node -v v0.10.31
>> npm ERR! npm -v 1.4.28
>> npm ERR! code ELIFECYCLE
>> npm ERR!
>> npm ERR! Additional logging details can be found in:
>> npm ERR! /Users/jgarcia/projects/q/code/core/npm-debug.log
>> npm ERR! not ok code 0
Warning: null Use --force to continue.
Aborted due to warnings.
Although it complains with a 404, the module gets downloaded to the node_modules folder. What am I missing? what makes the rebuild of native modules fails?
Kind regards
@underkin You've got mismatched node versions - v0.20.0 of Atom Shell needs 0.20.0
of node.js (these happen to match at the moment solely via coincidence). Check out https://github.com/paulcbetts/grunt-build-atom-shell#correctly-setting-nodeversion
I must be missing something. In my config I have:
'build-atom-shell':
tag: 'v0.20.0',
nodeVersion: '0.20.0',
buildDir: buildDir
projectName: 'mycoolapp'
productName: 'MyCoolApp'
But I'm still getting the error above. Seems to happen only with native modules, if that is a clue....
@underkin Hm. Can you try deleting $TMPDIR/q-build
? I think the "skip the bootstrap if it's already run" phase is causing a lot of problems (even though it saves a lot of time when it works)
Mmm... still no luck:
Running "build-atom-shell" task
Verifying properties build-atom-shell.buildDir, build-atom-shell.tag, build-atom-shell.projectName, build-atom-shell.productName exist in config...OK
>> Cloning to /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/atom-build
>> Running: git clone https://github.com/atom/atom-shell
>> Running: git fetch origin
>> Running: git reset --hard HEAD
>> Running: git checkout v0.20.0
>> Rigging atom.gyp to have correct name
Reading /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/atom-build/atom-shell/atom.gyp...OK
Writing /var/folders/4f/n0h6n_fx5_7dl5tm_3qttq3w0000gn/T/atom-build/atom-shell/atom.gyp...OK
>> Running: python script/bootstrap.py
>> Running: python script/build.py -c Release -t mycoolapp
>> Rebuilding native modules against Atom Shell
>> Running: node /Users/jgarcia/projects/q/code/build/node_modules/npm/bin/npm-cli.js rebuild --target=0.20.0 --arch=x64
>> gyp WARN install got an error, rolling back install
>> gyp ERR! configure error
>> gyp ERR! stack Error: 404 status code downloading tarball
>> gyp ERR! stack at Request.<anonymous> (/Users/jgarcia/projects/q/code/build/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
>> gyp ERR! stack at Request.emit (events.js:117:20)
>> gyp ERR! stack at Request.onResponse (/Users/jgarcia/projects/q/code/build/node_modules/npm/node_modules/request/request.js:1085:10)
>> gyp ERR! stack at ClientRequest.g (events.js:180:16)
>> gyp ERR! stack at ClientRequest.emit (events.js:95:17)
>> gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1692:21)
>> gyp ERR! stack at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
>> gyp ERR! stack at Socket.socketOnData (http.js:1587:20)
>> gyp ERR! stack at TCP.onread (net.js:527:27)
>> gyp ERR! System Darwin 14.0.0
>> gyp ERR! command "node" "/Users/jgarcia/projects/q/code/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
>> gyp ERR! cwd /Users/jgarcia/projects/q/code/node_modules/oniguruma
>> gyp ERR! node -v v0.10.33
>> gyp ERR! node-gyp -v v1.0.1
>> gyp ERR! not ok
>>
>> npm ERR! oniguruma@3.0.4 install: `node-gyp rebuild`
>> npm ERR! Exit status 1
>> npm ERR!
>> npm ERR! Failed at the oniguruma@3.0.4 install script.
>> npm ERR! This is most likely a problem with the oniguruma 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 oniguruma
>> npm ERR! There is likely additional logging output above.
>> npm ERR! System Darwin 14.0.0
>> npm ERR! command "node" "/Users/jgarcia/projects/q/code/build/node_modules/npm/bin/npm-cli.js" "rebuild" "--target=0.20.0" "--arch=x64"
>> npm ERR! cwd /Users/jgarcia/projects/q/code
>> npm ERR! node -v v0.10.33
>> npm ERR! npm -v 1.4.28
>> npm ERR! code ELIFECYCLE
>> npm ERR!
>> npm ERR! Additional logging details can be found in:
>> npm ERR! /Users/jgarcia/projects/q/code/npm-debug.log
>> npm ERR! not ok code 0
Warning: null Use --force to continue.
If I manually try
node /Users/jgarcia/projects/q/code/build/node_modules/npm/bin/npm-cli.js rebuild --target=0.20.0 --arch=x64
instead of:
node /Users/jgarcia/projects/q/code/build/node_modules/npm/bin/npm-cli.js rebuild --arch=x64
If compiles many of the modules, but it fails with:
> runas@1.0.1 install /Users/jgarcia/projects/q/code/node_modules/runas
> node-gyp rebuild
CXX(target) Release/obj.target/runas/src/main.o
CXX(target) Release/obj.target/runas/src/runas_darwin.o
CXX(target) Release/obj.target/runas/src/fork.o
SOLINK_MODULE(target) Release/runas.node
SOLINK_MODULE(target) Release/runas.node: Finished
> scrollbar-style@1.0.2 install /Users/jgarcia/projects/q/code/node_modules/scrollbar-style
> node-gyp rebuild
CXX(target) Release/obj.target/scrollbar-style-observer/src/scrollbar-style-observer-mac.o
../src/scrollbar-style-observer-mac.mm:42:3: error: no matching function for call to 'uv_async_init'
uv_async_init(loop, &async, asyncSendHandler);
^~~~~~~~~~~~~
/Users/jgarcia/.node-gyp/0.10.33/deps/uv/include/uv.h:1192:15: note: candidate function not viable: no known conversion from 'void (uv_async_t *)' to 'uv_async_cb'
(aka 'void (*)(uv_async_t *, int)') for 3rd argument
UV_EXTERN int uv_async_init(uv_loop_t*, uv_async_t* async,
^
1 error generated.
make: *** [Release/obj.target/scrollbar-style-observer/src/scrollbar-style-observer-mac.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/jgarcia/projects/q/code/build/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:810:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/Users/jgarcia/projects/q/code/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jgarcia/projects/q/code/node_modules/scrollbar-style
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! scrollbar-style@1.0.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrollbar-style@1.0.2 install script.
npm ERR! This is most likely a problem with the scrollbar-style 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 scrollbar-style
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/Users/jgarcia/projects/q/code/build/node_modules/npm/bin/npm-cli.js" "rebuild" "--arch=x64"
npm ERR! cwd /Users/jgarcia/projects/q/code
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jgarcia/projects/q/code/npm-debug.log
npm ERR! not ok code 0
This is weird, why is your target "mycoolapp" but your app name "Q".
Running: python script/build.py -c Release -t mycoolapp
Can you make this the same as your 'name' in package.json instead of mycoolapp?
Well, I went paranoid, and copied and pasted the config from the doc, but, I also run with Q and it also failed...
>> Running: python script/bootstrap.py
>> Running: python script/build.py -c Release -t q
>> Rebuilding native modules against Atom Shell
>> Running: node /Users/jgarcia/projects/q/code/build/node_modules/npm/bin/npm-cli.js rebuild --target=0.20.0 --arch=x64
>> gyp WARN install got an error, rolling back install
>> gyp ERR! configure error
>> gyp ERR! stack Error: 404 status code downloading tarball
>> gyp ERR! stack at Request.<anonymous> (/Users/jgarcia/projects/q/code/build/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
....
Any clue on why if it runs npm.-cli.js with --target=0.20.0
it fails with that (red hearing I think) of a 404, but If I manually rebuild it without the --target
then it compiles many of the modules and fails when compiling scrollbar-style-observer-mac.mm:
?
Kind regards
I guess the error I get when running without target is the same mentioned here:
https://github.com/atom/atom/issues/3184
But the task seems to specify the target in any case...
@underkin If you remove target
, you're no longer building against Atom's version of node, you're building against system node, which won't work (this is why you see the compile errors)
/cc @zcbenz @kevinsawicki, I need an adult
To build native modules for atom-shell with npm, you also have to specify --dist-url
, see:
https://github.com/atom/atom-shell/blob/master/docs/tutorial/using-native-node-modules.md#the-node-gyp-way
So... is this something that grunt-build-atom-shell should handle not rebuilding the full set of modules, or should I change the build script somehow? I took the build script from the atom project, trying to replace the `grunt-download-atom-shell`` Kind regards
@underkin So, I think what is happening is that this grunt tool implicitly relies on atom's script/bootstrap
to set some stuff up (where the --dist-url
part comes in). In the meantime, atom/atom-shell-starter does have this correctly set-up
Thanks! Will use starter then Do you know if it will keep updated with the upcoming releases from atom-shell? Kind regards
On 17 Dec 2014 at 00:28:12, Paul Betts (notifications@github.com) wrote:
@underkin So, I think what is happening is that this grunt tool implicitly relies on atom's script/bootstrap to set some stuff up (where the --dist-url part comes in). In the meantime, atom/atom-shell-starter does have this correctly set-up
— Reply to this email directly or view it on GitHub.
@underkin It'll keep updating but you can always bump the version yourself in the Gruntfile.coffee
Hey guys, these bugs should be fixed in the latest version 1.1.0 (both the "PATH includes Homebrew" bug and the "npm is failing" bug).
I try and run the app after building and I get a message "You can't open the application because it may be damaged or incomplete"