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

Raspberry Pi cant get amount cores #1115

Closed
cronicryo opened this issue Jun 13, 2016 · 6 comments
Closed

Raspberry Pi cant get amount cores #1115

cronicryo opened this issue Jun 13, 2016 · 6 comments
Assignees
Labels
installing node Issues with installing node/io.js versions.
Milestone

Comments

@cronicryo
Copy link

cronicryo commented Jun 13, 2016

nvm -s version
throws a message saying that it cant determine the amount of cores for make

@ljharb
Copy link
Member

ljharb commented Jun 13, 2016

Presumably nvm install -s node?

Can you provide the output of nvm debug, nvm_get_os, cat /proc/cpuinfo, sysctl -n hw.ncpu, and psrinfo?

@ljharb ljharb added installing node Issues with installing node/io.js versions. needs followup We need some info or action from whoever filed this issue/PR. labels Jun 13, 2016
@cronicryo
Copy link
Author

cronicryo commented Jun 13, 2016

nvm debug

nvm --version: v0.31.1
$SHELL: /bin/bash
$HOME: /home/ratchet
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v6.2.1
which node: $NVM_DIR/versions/node/v6.2.1/bin/node
which iojs: 
which npm: $NVM_DIR/versions/node/v6.2.1/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.2.1
npm root -g: $NVM_DIR/versions/node/v6.2.1/lib/node_modules

nvm_get_os
linux

sysctl -n hw.ncpu
sysctl: cannot stat /proc/sys/hw/ncpu: No such file or directory

cat /proc/cpuinfo
cpuinfo.txt

@ljharb
Copy link
Member

ljharb commented Jun 13, 2016

@cronicryo Thanks!! Very helpful.

@PeterDaveHello it looks like in addition to grepping for "core id", we should count the number of "processor:" lines?

ljharb added a commit to ljharb/nvm that referenced this issue Jun 13, 2016
…o, fall back to counting “processor” lines.

Fixes nvm-sh#1115.
@PeterDaveHello
Copy link
Collaborator

hmmm ... I'll take a look at my Raspberry Pi.
@cronicryo what's the distribution of GNU/Linux you are using?

@PeterDaveHello
Copy link
Collaborator

Yeah, I don't have core id on Raspbian on Raspberry Pi 2, but the patch doesn't work either.
What about this:

-    NVM_CPU_THREADS="$(grep -c 'core id' /proc/cpuinfo)"
+    NVM_CPU_THREADS="$(command grep -c -E '^processor.+: [0-9]+' /proc/cpuinfo)"

This also works on the other platforms. Tested on the latest Debian/Ubuntu/Linuxmint/ArchLinux.

@ljharb
Copy link
Member

ljharb commented Jun 13, 2016

ok, sounds good thanks, i'll use that instead

@ljharb ljharb closed this as completed in 45ae48d Jun 13, 2016
@ljharb ljharb removed the needs followup We need some info or action from whoever filed this issue/PR. label Jun 13, 2016
@ljharb ljharb self-assigned this Jun 13, 2016
@ljharb ljharb added this to the v0.31.2 milestone Jun 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing node Issues with installing node/io.js versions.
Projects
None yet
Development

No branches or pull requests

3 participants