Skip to content
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

Build from source fails (mac) #69

Closed
jorgenskogmo opened this issue Oct 2, 2012 · 6 comments
Closed

Build from source fails (mac) #69

jorgenskogmo opened this issue Oct 2, 2012 · 6 comments

Comments

@jorgenskogmo
Copy link

Hi,

Falling in love with this project - and want to compile it myself, so I tried to follow the instructions on the Building-node-webkit wiki page:

  • downloaded chromium (using the 'Bootstrap using the tarball' option)
  • created the .gclient file (as pr instructed in Building-node-webkit#Get the Code)
  • ran gclient sync (which took 3 hours)
  • applied the patch
  • ran build/gyp_chromium
  • opened the ~/node-webkit/src/content/content.xcodeproj (using xcode 4.5)
  • selected the 'nw' target
  • ran Archive (there is no "release" build option in newer xcode versions)
    -> Build failed.
  • ran gclient runhooks
  • opened the ~/node-webkit/src/build/all.xcodeproj (using xcode 4.5)
    -> (xcode still crawling after 30 minutes...)

(Mac OS X 10.8.2 on a retina macbook pro)

Would love some advice!

@zcbenz
Copy link
Contributor

zcbenz commented Oct 3, 2012

Don't use XCode, it's the worst IDE I have ever met...

You can build with ninja under terminal, by running:
GYP_GENERATORS='ninja' ./build/gyp_chromium -Dtarget_arch="ia32"
ninja -C out/Release -j4 nw

On Wed, Oct 3, 2012 at 4:10 AM, Jørgen Skogmo notifications@github.comwrote:

Hi,

Falling in love with this project - and want to compile it myself, so I
tried to follow the instructions on the Building-node-webkit wiki page:

  • downloaded chromium (using the 'Bootstrap using the tarball' option)

  • created the .gclient file (as pr instructed in
    Building-node-webkit#Get the Code)

  • ran gclient sync (which took 3 hours)

  • applied the patch

  • ran build/gyp_chromium

  • opened the ~/node-webkit/src/content/content.xcodeproj (using xcode
    4.5)

  • selected the 'nw' target

    ran Archive (there is no "release" build option in newer xcode
    versions)

    -> Build failed.

    ran gclient runhooks

    opened the ~/node-webkit/src/build/all.xcodeproj (using xcode 4.5)
    -> (xcode still crawling after 30 minutes...)

(Mac OS X 10.8.2 on a retina macbook pro)

Would love some advice!


Reply to this email directly or view it on GitHubhttps://github.com//issues/69.

Cheng
Intel Open Source Technology Center

@jorgenskogmo
Copy link
Author

Don't use XCode, it's the worst IDE I have ever met...

Charming.

You can build with ninja under terminal, by running:
GYP_GENERATORS='ninja' ./build/gyp_chromium -Dtarget_arch="ia32"
ninja -C out/Release -j4 nw

Sure, then Ninja fails with:

ninja: Entering directory `out/Release'
ninja: error: '../../third_party/node/config.gypi', needed by 'gen/node_natives.h', missing and no known rule to make it

[edit]

Seems this has happened before ( #8 )

cd ~/node-webkit/src/third_party/node/
./configure

Fails with a KeyError, but at least the '../../third_party/node/config.gypi' file was created.

Trying to build again (ninja -C out/Release -j4 nw)
runs for a while, then dies with:

../../base/message_pump_mac.mm:584:9: error: use of undeclared identifier 'uv_run_once_nowait'
uv_run_once_nowait(uv_default_loop());
^
1 error generated.
[3660/8686] CXX obj/base/metrics/base.field_trial.o
ninja: build stopped: subcommand failed.

@zcbenz
Copy link
Contributor

zcbenz commented Oct 3, 2012

It's my fault, I forgot to push newest changes to my node repository, you can update the node repository and then retry:

cd node-webkit/src/third_party/node/
git pull

@jorgenskogmo
Copy link
Author

thanks! Pull done.

Now the build fails at:

../../content/nw/src/shell_browser_context.h:37:7: error: 'GetMediaRequestContextForStoragePartition' marked 'override' but does not override any member functions

@zcbenz
Copy link
Contributor

zcbenz commented Oct 3, 2012

I reviewed your steps and found you're using the Bootstrap using the tarball way. I think you also need to update the Chromium repository (which gclient sync will not do), you can follow the section Update to upstream of Building node-webkit to update it.

@jorgenskogmo
Copy link
Author

yay! Build completed :-) Thank you so much for your assistance.

Summarizing required steps:

  • download chromium (using the 'Bootstrap using the tarball' option)
  • create the /path-to-node-webkit/.gclient file (see Building node webkit #Get the Code)
  • cd /path-to-node-webkit
  • run gclient sync (takes hours)
  • cd /path-to-node-webkit/src
  • git pull
  • cd /path-to-node-webkit
  • gclient sync
  • cd /path-to-node-webkit/src/third_party/WebKit
  • git apply ../../content/nw/patches/webkit.patch
  • cd /path-to-node-webkit/src
  • GYP_GENERATORS='ninja' ./build/gyp_chromium -Dtarget_arch="ia32"
  • ninja -C out/Release -j4 nw

Find the fresh node-webkit in /path-to-node-webkit/out/Release/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants