Giter Club home page Giter Club logo

Comments (12)

daniel-j-h avatar daniel-j-h commented on August 15, 2024 1

Thanks! I merged your pull request, released v1.0.6. Travis automatically built binaries for LTS Node 4,6,8.

from node-or-tools.

daniel-j-h avatar daniel-j-h commented on August 15, 2024

What errors did you see? Can you provide more details?

We currently provide pre-built packages on npm for Node 4, 6, 8. If you want to add support for Node 10 you can modify the .travis.yaml file and open a pull request. Happy to review and merge it.

from node-or-tools.

ntelkedzhiev avatar ntelkedzhiev commented on August 15, 2024

Will do. Thanks 👍

from node-or-tools.

nnnikolay avatar nnnikolay commented on August 15, 2024

Hey, @daniel-j-h I'm not sure if this connected with node 10 (in my case 10.3.0) or not, but can't install the module, am I doing something wrong?

$ npm i node_or_tools --save

> [email protected] install /Users/n/Projects/sandbox/ren/node_modules/node_or_tools
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/node_or_tools/v1.0.5/Release/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/node_or_tools/v1.0.5/Release/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
  ACTION binding_gyp_action_before_build_target_install_deps mason_packages
  ACTION binding_gyp_action_before_build_target_install_deps mason_packages
Downloading Mason @ca9b4cb
Downloading Mason @ca9b4cb
* Downloading binary package osx-x86_64/protobuf/3.0.0.tar.gz...
fatal: Unable to read current working directory: No such file or directory
make: *** [mason_packages] Error 128
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:258: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 17.5.0
gyp ERR! command "/usr/local/Cellar/node/10.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding/node_or_tools.node" "--module_name=node_or_tools" "--module_path=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding"
gyp ERR! cwd /Users/n/Projects/sandbox/ren/node_modules/node_or_tools
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
* Installed binary package at /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/protobuf/3.0.0
* Linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/protobuf/3.0.0
* Links will be inside /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/.link/
* Using bash fallback for symlinking (install lndir for faster symlinking)
* Done linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/protobuf/3.0.0
* Downloading binary package headers/sparsehash/2.0.2.tar.gz...
* Installed binary package at /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/headers/sparsehash/2.0.2
* Linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/headers/sparsehash/2.0.2
* Links will be inside /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/.link/
* Using bash fallback for symlinking (install lndir for faster symlinking)
* Done linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/headers/sparsehash/2.0.2
* Downloading binary package osx-x86_64/gflags/2.1.2.tar.gz...
* Installed binary package at /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/gflags/2.1.2
* Linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/gflags/2.1.2
* Links will be inside /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/.link/
* Using bash fallback for symlinking (install lndir for faster symlinking)
* Done linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/gflags/2.1.2
* Downloading binary package osx-x86_64/or-tools/6.0.tar.gz...
* Installed binary package at /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/or-tools/6.0
* Linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/or-tools/6.0
* Links will be inside /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/.link/
* Using bash fallback for symlinking (install lndir for faster symlinking)
* Done linking /Users/n/Projects/sandbox/ren/node_modules/node_or_tools/mason_packages/osx-x86_64/or-tools/6.0
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: unrecognized option: --strip-unneeded
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip [-AnuSXx] [-] [-d filename] [-s filename] [-R filename] [-o output] file [...]
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: unrecognized option: --strip-unneeded
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip [-AnuSXx] [-] [-d filename] [-s filename] [-R filename] [-o output] file [...]
  TOUCH Release/obj.target/action_before_build.stamp
  CXX(target) Release/obj.target/node_or_tools/src/main.o
In file included from ../src/main.cc:1:
In file included from ../src/tsp.h:6:
../src/adaptors.h:39:28: warning: 'Call' is deprecated [-Wdeprecated-declarations]
      auto cost = callback.Call(argc, argv);
                           ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../src/main.cc:1:
In file included from ../src/tsp.h:6:
../src/adaptors.h:64:30: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    auto interval = callback.Call(argc, argv);
                             ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../src/main.cc:1:
In file included from ../src/tsp.h:6:
../src/adaptors.h:102:27: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    auto locks = callback.Call(argc, argv);
                          ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
3 warnings generated.
  CXX(target) Release/obj.target/node_or_tools/src/tsp.o
In file included from ../src/tsp.cc:1:
In file included from ../src/tsp.h:6:
../src/adaptors.h:39:28: warning: 'Call' is deprecated [-Wdeprecated-declarations]
      auto cost = callback.Call(argc, argv);
                           ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../src/tsp.cc:1:
In file included from ../src/tsp.h:6:
../src/adaptors.h:64:30: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    auto interval = callback.Call(argc, argv);
                             ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../src/tsp.cc:1:
In file included from ../src/tsp.h:6:
../src/adaptors.h:102:27: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    auto locks = callback.Call(argc, argv);
                          ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../src/tsp.cc:3:
../src/tsp_worker.h:52:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(argc, argv);
              ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/tsp.cc:31:37: error: no matching member function for call to 'NewInstance'
    info.GetReturnValue().Set(init->NewInstance());
                              ~~~~~~^~~~~~~~~~~
/Users/n/.node-gyp/10.3.0/include/node/v8.h:3862:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                           ^
/Users/n/.node-gyp/10.3.0/include/node/v8.h:3859:44: note: candidate function not viable: requires 3 arguments, but 0 were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                           ^
4 warnings and 1 error generated.
make: *** [Release/obj.target/node_or_tools/src/tsp.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:258: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 17.5.0
gyp ERR! command "/usr/local/Cellar/node/10.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding/node_or_tools.node" "--module_name=node_or_tools" "--module_path=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding"
gyp ERR! cwd /Users/n/Projects/sandbox/ren/node_modules/node_or_tools
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.3.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding/node_or_tools.node --module_name=node_or_tools --module_path=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/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 17.5.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.3.0/bin/node" "/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/n/Projects/sandbox/ren/node_modules/node_or_tools
node-pre-gyp ERR! node -v v10.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.3.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding/node_or_tools.node --module_name=node_or_tools --module_path=/Users/n/Projects/sandbox/ren/node_modules/node_or_tools/lib/binding' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `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/n/.npm/_logs/2018-06-08T08_41_17_282Z-debug.log

Don't I have any -dev package system-wide?

from node-or-tools.

daniel-j-h avatar daniel-j-h commented on August 15, 2024

Seems like this is a breaking change in the v8 API

../src/tsp.cc:31:37: error: no matching member function for call to 'NewInstance'
    info.GetReturnValue().Set(init->NewInstance());
                              ~~~~~~^~~~~~~~~~~

coming from

You can simply remove the branches for now and re-compile.

from node-or-tools.

nnnikolay avatar nnnikolay commented on August 15, 2024

@daniel-j-h sorry Daniel, what branches are you talking about?

from node-or-tools.

daniel-j-h avatar daniel-j-h commented on August 15, 2024

In tsp.cc and vrp.cc remove

node-or-tools/src/tsp.cc

Lines 28 to 33 in 30351e1

// Handle `new T()` as well as `T()`
if (!info.IsConstructCall()) {
auto init = Nan::New(constructor());
info.GetReturnValue().Set(init->NewInstance());
return;
}

and

node-or-tools/src/vrp.cc

Lines 27 to 32 in 30351e1

// Handle `new T()` as well as `T()`
if (!info.IsConstructCall()) {
auto init = Nan::New(constructor());
info.GetReturnValue().Set(init->NewInstance());
return;
}

The NewInstance function calls seem to be not compatible with newer v8 versions.

from node-or-tools.

ivosabev avatar ivosabev commented on August 15, 2024

Is this fix going to be release officially?

from node-or-tools.

daniel-j-h avatar daniel-j-h commented on August 15, 2024

Happy to review a pull request if you want to help out here. It's not as easy as removing the two branches above as it will break compatibility with user code. But otherwise there should be nothing blocking this.

from node-or-tools.

ivosabev avatar ivosabev commented on August 15, 2024

I have submitted a PR that I believe should fix the issue and preserve compatibility.

#57

from node-or-tools.

danpaz avatar danpaz commented on August 15, 2024

@ivosabev have you been able to produce a build for node 10? I've been running into issues building in #62 although not much has changed since your PR #57.

from node-or-tools.

ivosabev avatar ivosabev commented on August 15, 2024

@danpaz I was able to build it, but only in a fresh directory without any other dependencies in the package.json. If I try to build it from my project folder it calls twice mason and runs two concurrent builds resulting in a failure. I've described it in #59

from node-or-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.