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

Compilation error on Travis #378

Closed
develar opened this issue Mar 16, 2016 · 6 comments
Closed

Compilation error on Travis #378

develar opened this issue Mar 16, 2016 · 6 comments
Labels

Comments

@develar
Copy link

develar commented Mar 16, 2016

In the #42 I see that should be a precompiled version for Linux.

So, I don't understand why error https://travis-ci.org/loopline-systems/electron-builder/jobs/116341251#L268 occurred.

> sharp@0.13.1 install /home/travis/build/loopline-systems/electron-builder/node_modules/sharp
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/home/travis/build/loopline-systems/electron-builder/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
  CXX(target) Release/obj.target/sharp/src/metadata.o
In file included from ../src/metadata.cc:4:0:
../../nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from /home/travis/.node-gyp/4.4.0/include/node/node.h:42:0,
                 from ../src/metadata.cc:1:
/home/travis/.node-gyp/4.4.0/include/node/v8.h:336:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/4.4.0/include/node/v8.h:469:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/4.4.0/include/node/v8.h:852:1: error: expected unqualified-id before ‘using’
In file included from ../../nan/nan.h:194:0,

see full log by link...
@lovell
Copy link
Owner

lovell commented Mar 16, 2016

"error: #error This version of node/NAN/v8 requires a C++11 compiler"

https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-%28or-io.js-v3%29-compiler-requirements

@develar
Copy link
Author

develar commented Mar 16, 2016

@lovell Yes, I understand. My concern that I cannot ask users to setup compiler on CI. It is not acceptable. In the readme of this project I see that "Most Windows (x64), Linux and ARMv6+ systems do not require the installation of any external runtime dependencies.", so, my question is why no precompiled binaries for Travis server (Ubuntu 12.04.5 LTS).

@lovell
Copy link
Owner

lovell commented Mar 16, 2016

A pre-compiled copy of libvips and its dependencies are provided so people don't have to compile and install them globally. For example, this allows people to use the fast, sudo-less Travis container environment.

I notice you're using Electron. sharp is a "native module" so if you've not seen it, http://electron.atom.io/docs/latest/tutorial/using-native-node-modules/ may help here.

See also #313

@develar
Copy link
Author

develar commented Mar 16, 2016

Sorry for misunderstanding — electron-builder is not an Electorn app, but tool to "Build installers for Electron apps the easy way".

A lot of people use it and I cannot ask everyone to install C++11 compiler. My previous approach was to use gm. And it seems I have to move back to it.

Thanks for quick response.

@lovell
Copy link
Owner

lovell commented Mar 16, 2016

I guess in this case it's a trade off between failing at run-time because GraphicsMagick is not globally installed vs failing at install-time because the compiler is not suitable for Node v4+ native modules.

If image processing is an optional feature, you could use npm's optionalDependencies feature so installation continues after any compilation failure.

Some native modules use node-pre-gyp to try to avoid compilation, for which we're using #186 to track any progress. This would mean providing pre-compiled binaries of sharp for each version of the Node ABI (currently 47), but it can still fallback to requiring compilation.

@lovell
Copy link
Owner

lovell commented Mar 30, 2016

Closing this question as it looks like electron-builder has gone with the GraphicsMagick requirement - feel free to re-open if there's anything else I can help with related to this.

@lovell lovell closed this as completed Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants