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

Cannot build #85

Closed
entrptaher opened this issue Dec 14, 2018 · 18 comments
Closed

Cannot build #85

entrptaher opened this issue Dec 14, 2018 · 18 comments

Comments

@entrptaher
Copy link

Ubuntu 16.04 64 bit and Node v11, doing yarn install fails.

/usr/include/c++/5/bits/random.tcc:1492:28: error: call of overloaded ‘log(double)’ is ambiguous
...
node_gtk.target.mk:115: recipe for target 'Release/obj.target/node_gtk/src/debug.o' failed
make: *** [Release/obj.target/node_gtk/src/debug.o] Error 1
make: Leaving directory '/home/someone/gtktest/node_modules/node-gtk/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
...

There are no built binaries for this, I tried on node 8 with no success.

@ghost
Copy link

ghost commented Dec 17, 2018

I also cannot build

$ npm install node-gtk
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)

> [email protected] install /Users/me/node_modules/node-gtk
> if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error getaddrinfo ENOTFOUND node-gtk-1.s3-us-east-1.amazonaws.com node-gtk-1.s3-us-east-1.amazonaws.com:443
  CXX(target) Release/obj.target/node_gtk/src/boxed.o
In file included from ../src/boxed.cc:5:
In file included from ../src/boxed.h:4:
../../nan/nan.h:1081:96: error: too many arguments to function call, expected at most 4, have 5
        length_ = string->WriteUtf8(v8::Isolate::GetCurrent(), str_, static_cast<int>(len), 0, flags);
                  ~~~~~~~~~~~~~~~~~                                                            ^~~~~
/Users/me/.node-gyp/10.7.0/include/node/v8.h:2622:3: note: 'WriteUtf8' declared here
  int WriteUtf8(char* buffer,
  ^
1 error generated.
make: *** [Release/obj.target/node_gtk/src/boxed.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/me/node_modules/node-gtk/lib/binding/node-v64-darwin-x64/node_gtk.node" "--module_name=node_gtk" "--module_path=/Users/me/node_modules/node-gtk/lib/binding/node-v64-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/me/node_modules/node-gtk
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/me/node_modules/node-gtk/lib/binding/node-v64-darwin-x64/node_gtk.node --module_name=node_gtk --module_path=/Users/me/node_modules/node-gtk/lib/binding/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/me/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/me/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/me/node_modules/node-gtk
node-pre-gyp ERR! node -v v10.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.2
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/me/node_modules/node-gtk/lib/binding/node-v64-darwin-x64/node_gtk.node --module_name=node_gtk --module_path=/Users/me/node_modules/node-gtk/lib/binding/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm WARN me No description
npm WARN me No repository field.
npm WARN me No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2018-12-17T05_10_23_955Z-debug.log

🙁

@romgrk
Copy link
Owner

romgrk commented Dec 17, 2018

Couldn't reproduce any of the issues, could you both run the following commands and report back the output:

node --version
npm --version
gcc --version

@ghost
Copy link

ghost commented Dec 17, 2018

👌

ambp:~ me$ node --version
v11.4.0
ambp:~ me$ npm --version
6.4.1
ambp:~ me$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@ghost
Copy link

ghost commented Dec 17, 2018

Hold up, now it works after updating to node 11.4.0 😄
before it was on 10.7.0 as you can see in the log.

@romgrk
Copy link
Owner

romgrk commented Dec 18, 2018

@ledlamp I could reproduce with 10.7.0, I've opened a separate issue: #86, follow that one if you're interested.

@entrptaher continue posting your details here when you have them.

@entrptaher
Copy link
Author

Not much success yet even with node 11.4, same build error. Here is my config.
image

Same error with node v8.

@romgrk
Copy link
Owner

romgrk commented Dec 18, 2018

I didn't catch your compiler version, could you show me the output of gcc --version?

@entrptaher
Copy link
Author

entrptaher commented Dec 19, 2018

I had GCC 5, but seeing your response, I installed GCC 8 and it worked perfectly fine in seconds. I wish this is documented in the requirements of the package :) .

image

@romgrk
Copy link
Owner

romgrk commented Dec 19, 2018

Sure, will update the doc in a moment :)

@davidgatti
Copy link

With this:

  • node: v11.6.0
  • gcc: Apple LLVM version 10.0.0 (clang-1000.10.44.4)
  • npm: 6.5.0-next.0

I get this:

npm i node-gtk --save
npm WARN deprecated [email protected]: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)

> [email protected] install /Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk
> if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error getaddrinfo ENOTFOUND node-gtk-1.s3-us-east-1.amazonaws.com node-gtk-1.s3-us-east-1.amazonaws.com:443
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config --cflags glib-2.0 gobject-introspection-1.0' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/dude/.nvm/versions/node/v11.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/dude/.nvm/versions/node/v11.6.0/bin/node" "/Users/dude/.nvm/versions/node/v11.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk/lib/binding/node-v67-darwin-x64/node_gtk.node" "--module_name=node_gtk" "--module_path=/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk/lib/binding/node-v67-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/dude/.nvm/versions/node/v11.6.0/bin/node /Users/dude/.nvm/versions/node/v11.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk/lib/binding/node-v67-darwin-x64/node_gtk.node --module_name=node_gtk --module_path=/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk/lib/binding/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/Users/dude/.nvm/versions/node/v11.6.0/bin/node" "/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.2
node-pre-gyp ERR! not ok
Failed to execute '/Users/dude/.nvm/versions/node/v11.6.0/bin/node /Users/dude/.nvm/versions/node/v11.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk/lib/binding/node-v67-darwin-x64/node_gtk.node --module_name=node_gtk --module_path=/Users/dude/Documents/GitHub/example/FRP-desktop-display/node_modules/node-gtk/lib/binding/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dude/.npm/_logs/2019-01-17T20_58_04_086Z-debug.log

@romgrk
Copy link
Owner

romgrk commented Jan 19, 2019

@davidgatti looks like pkg-config is not installed in your system. Check if installing it solves your issue.

@davidgatti
Copy link

With this:

  • node: v11.7.0
  • gcc: gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516
  • npm: 6.5.0

And this: pkg-config

On a Raspberry PI Zero

I get this:

npm install --save node-gtk
npm WARN deprecated [email protected]: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)

> [email protected] install /home/pi/Documents/demo-app/node_modules/node-gtk
> if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error getaddrinfo ENOTFOUND node-gtk-1.s3-us-east-1.amazonaws.com node-gtk-1.s3-us-east-1.amazonaws.com:443
Package gobject-introspection-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-introspection-1.0' found
gyp: Call to 'pkg-config --cflags gobject-introspection-1.0' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/pi/.nvm/versions/node/v11.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.14.79+
gyp ERR! command "/home/pi/.nvm/versions/node/v11.7.0/bin/node" "/home/pi/.nvm/versions/node/v11.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/Documents/demo-app/node_modules/node-gtk/lib/binding/node-v67-linux-arm/node_gtk.node" "--module_name=node_gtk" "--module_path=/home/pi/Documents/demo-app/node_modules/node-gtk/lib/binding/node-v67-linux-arm" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /home/pi/Documents/demo-app/node_modules/node-gtk
gyp ERR! node -v v11.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/pi/.nvm/versions/node/v11.7.0/bin/node /home/pi/.nvm/versions/node/v11.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/Documents/demo-app/node_modules/node-gtk/lib/binding/node-v67-linux-arm/node_gtk.node --module_name=node_gtk --module_path=/home/pi/Documents/demo-app/node_modules/node-gtk/lib/binding/node-v67-linux-arm --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/Documents/demo-app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Linux 4.14.79+
node-pre-gyp ERR! command "/home/pi/.nvm/versions/node/v11.7.0/bin/node" "/home/pi/Documents/demo-app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/Documents/demo-app/node_modules/node-gtk
node-pre-gyp ERR! node -v v11.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.2
node-pre-gyp ERR! not ok
Failed to execute '/home/pi/.nvm/versions/node/v11.7.0/bin/node /home/pi/.nvm/versions/node/v11.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/Documents/demo-app/node_modules/node-gtk/lib/binding/node-v67-linux-arm/node_gtk.node --module_name=node_gtk --module_path=/home/pi/Documents/demo-app/node_modules/node-gtk/lib/binding/node-v67-linux-arm --napi_version=3 --node_abi_napi=napi' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-01-21T09_47_35_651Z-debug.log

@romgrk
Copy link
Owner

romgrk commented Jan 21, 2019

I see the following line in your output:

No package 'gobject-introspection-1.0' found

Be sure to install all the required dependencies, check the installing and building section for more detail.s

@davidgatti
Copy link

I see, I'm not use to dependency with NPM, so I didn't even look for that. Thank you.

@romgrk
Copy link
Owner

romgrk commented Jan 22, 2019

Sure, no problem. Ideally the prebuilt binaries would be available and there would be no dependencies but I haven't had time to look into it (#73) :/

@romgrk
Copy link
Owner

romgrk commented Jan 22, 2019

@davidgatti binaries for version 0.2.1 have been re-published, you should now be able to install directly without any dependencies. Let me know if you have more issues.

@davidgatti
Copy link

@romgrk on RPi i get Package gobject-introspection-1.0 was not found in the pkg-config search path. with version 0.2.2

@romgrk
Copy link
Owner

romgrk commented Jan 24, 2019

I don't know the architecture of the RPi, but I don't think we can support making pre-built binaries for it (wikipedia says it's 32-bit ARM).
But post the install log, maybe it's a fixable issue.

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

3 participants