Giter Club home page Giter Club logo

Comments (11)

springmeyer avatar springmeyer commented on August 15, 2024 1

I'm unable to replicate the obscure error. Rather I get a different error that is both expected and can be improved. What I did is changed third_party/mason/mason.sh to hardcode sunos

- MASON_UNAME=`uname -s`
+ MASON_UNAME="sunos"

Here: https://github.com/mapbox/mason/blob/4da5ec441b9bad3aa546c414b519fee611a77e4d/mason.sh#L9

That simulates running sunos. Then I built from source, expecting an error from mason to trickle up to the terminal. It did:

$ V=1 npm install --build-from-source
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /Users/dane/projects/node-or-tools
> node-pre-gyp install --fallback-to-build

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
  LD_LIBRARY_PATH=/Users/dane/projects/node-or-tools/build/Release/lib.host:/Users/dane/projects/node-or-tools/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p .; ./scripts/install-deps.sh
/Users/dane/projects/node-or-tools/third_party/mason/mason.sh: line 41: MASON_PLATFORM: unbound variable
make: *** [mason_packages] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/dane/projects/node-or-tools/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/Users/dane/.nvm/versions/node/v4.8.3/bin/node" "/Users/dane/projects/node-or-tools/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/dane/projects/node-or-tools/lib/binding/node_or_tools.node" "--module_name=node_or_tools" "--module_path=/Users/dane/projects/node-or-tools/lib/binding"
gyp ERR! cwd /Users/dane/projects/node-or-tools
gyp ERR! node -v v4.8.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 

The /Users/dane/projects/node-or-tools/third_party/mason/mason.sh: line 41: MASON_PLATFORM: unbound variable is the key error here and the expected one. Since mason does not support sunos. Although it is also pretty unhelpful, so I've ticketed improving this at mapbox/mason#448.

from node-or-tools.

Saspect-IO avatar Saspect-IO commented on August 15, 2024

Please chack this link for setup and anything you may have missed in your initial setup of node and npm.
http://blog.teamtreehouse.com/install-node-js-npm-linux
Then try your npm install node_or_tools

from node-or-tools.

harshw avatar harshw commented on August 15, 2024

Thanks for the quick response! We have tried installing the node-or-tool on a running production node app environment and also a clean install on the latest node and npm version that was mentioned in the orignial issue with the same errrors. Is there a dependency specific to node 4.8 version to take advantage of the prebuilt libraries? We have node 6.9.2. Anything specific to pre-gyp or gyp also that we need to install? The errors are saying that "node-pre-gyp install --fallback-to-build" is failing.

from node-or-tools.

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

We build and publish binaries for LTS Node.js 4 and 6 - but only for Linux and macOS.

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazon
s.com/node_or_tools/v1.0.3/Release/node-v48-sunos-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and nod
6.9.2 (node-v48 ABI) (falling back to source compile with node-gyp)

This roughly says: there is no SunOS pre-built binary and building from source seems to fail on your system. What you can try is posting the installation log in verbose mode when building from source:

env V=1 npm install --build-from-source

from node-or-tools.

harshw avatar harshw commented on August 15, 2024

Thank you for your suggestion. I have tried a number of things according to the more verbose error log but it is still failing. I have attached the verbose log. Appreciate the help to clarify what might be going on.

2017-07-13T01_09_42_634Z-debug.txt

from node-or-tools.

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

Hm all I can see in your log is the following error log

1980 info lifecycle [email protected]~install: [email protected]
1981 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
1982 verbose lifecycle [email protected]~install: PATH: /opt/local/lib/node_modules/npm/bin/node-gyp-bin:/home/routing/node_modules/node_or_tools/node_modules/.bin:/home/routing/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/opt/local/sbin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin
1983 verbose lifecycle [email protected]~install: CWD: /home/routing/node_modules/node_or_tools
1984 silly lifecycle [email protected]~install: Args: [ '-c', 'node-pre-gyp install --fallback-to-build' ]
1985 silly lifecycle [email protected]~install: Returned: code: 1  signal: null
1986 info lifecycle [email protected]~install: Failed to exec install script
1987 verbose unlock done using /root/.npm/_locks/staging-6d8364e01a125c5a.lock for /home/routing/node_modules/.staging
1988 warn [email protected] No description
1989 warn [email protected] No repository field.
1990 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
1990 verbose stack Exit status 1
1990 verbose stack     at EventEmitter.<anonymous> (/opt/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
1990 verbose stack     at emitTwo (events.js:106:13)
1990 verbose stack     at EventEmitter.emit (events.js:191:7)
1990 verbose stack     at ChildProcess.<anonymous> (/opt/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
1990 verbose stack     at emitTwo (events.js:106:13)
1990 verbose stack     at ChildProcess.emit (events.js:191:7)
1990 verbose stack     at maybeClose (internal/child_process.js:877:16)
1990 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
1991 verbose pkgid [email protected]
1992 verbose cwd /home/routing
1993 verbose SunOS 5.11
1994 verbose argv "/opt/local/bin/node" "/opt/local/bin/npm" "install" "--build-from-source" "node_or_tools" "--unsafe-perm=true"
1995 verbose node v6.9.2
1996 verbose npm  v5.0.3

paging @springmeyer for node-pre-gyp help - do you have seen anything like that before?

@harshw can you give us some more details, what compiler are you using, which version is it? Given that this is SunOS and we don't have much experience here I don't know if we can help you here.

from node-or-tools.

harshw avatar harshw commented on August 15, 2024

I have copied from the terminal both the compiler and make versions on my system. Can I force a compile through some manual switches on node-pre-gyp?

gcc (GCC) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Make 4.1
Built for x86_64-sun-solaris2.11
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

from node-or-tools.

springmeyer avatar springmeyer commented on August 15, 2024

@harshw I'm sorry, node-or-tools does not support sunos. If you want to use node-or-tools I recommend you move to linux or OS X. For this reason I will now close this issue. Please create a new issue if you have any trouble installing on OS X or Linux. On those systems we support binaries for both node v4 and v6, so both should work great and be easy to install. Let us know if you find otherwise.

The reason is that node-or-tools does not support sunos is that this module depends on external libraries that must be pre-compiled for a given architecture: these are gflags, libprotobuf, and libortools (and all of its dependencies). Two blockers exist:

from node-or-tools.

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

@springmeyer wondering if and how we can get more verbose log messages out of node-pre-gyp. Even with the verbose flag turned on all I can see is: it's bailing out, but I don't know where or why specifically.

(just interested here - you are right SunOS will not work without libortools.so)

from node-or-tools.

springmeyer avatar springmeyer commented on August 15, 2024

@harshw I'm sorry: I forgot to mention that, while I know we don't support sunos and that is the root cause, I'm unsure why you are getting such a cryptic error.

1990 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
1990 verbose stack Exit status 1

^^ That obviously does not provide much to go on. What is likely happening is that the build system calls out to the https://github.com/mapbox/node-or-tools/blob/master/scripts/install-deps.sh file from https://github.com/mapbox/node-or-tools/blob/master/binding.gyp#L12-L23. That call out is failing because mason does not support sunos. Locally I'm currently trying to figure out why this is not producing a better error. Will post back when I know more.

from node-or-tools.

harshw avatar harshw commented on August 15, 2024

Thank you for your help on this! We have successfully installed the node-or-tools on an Ubuntu instance. Again, appreciate the thoughtful support.

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.