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

Failed to install with "unknown type name 'cpu_set_t'" #5

Closed
redandinvisible opened this issue Jun 2, 2019 · 7 comments
Closed

Failed to install with "unknown type name 'cpu_set_t'" #5

redandinvisible opened this issue Jun 2, 2019 · 7 comments

Comments

@redandinvisible
Copy link

I noticed you committed a fix for Issue #1 (Many thanks). I tried to install the latest version from npm, at version 0.3.0, but I get the following error.

$ npm install

> easybotics-rpi-rgb-led-matrix@0.3.0 install /Users/xxxxxxx/workspace/repo/lightmessage/node_modules/easybotics-rpi-rgb-led-matrix
> node-gyp rebuild

  CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/transformer.o
  CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/thread.o
../external/matrix/lib/thread.cc:58:5: error: unknown type name 'cpu_set_t'
    cpu_set_t cpu_mask;
    ^
1 error generated.
make: *** [Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/thread.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/xxxxxxx/.nodenv/versions/10.15.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/Users/xxxxxxx/.nodenv/versions/10.15.3/bin/node" "/Users/xxxxxxx/.nodenv/versions/10.15.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxxxxxx/workspace/repo/lightmessage/node_modules/easybotics-rpi-rgb-led-matrix
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! easybotics-rpi-rgb-led-matrix@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1

I removed all my old node_modules in case there was a clash with my local workaround but, same error. Fingers crossed it's something at my end...

@samturner3
Copy link

samturner3 commented Jun 3, 2019

I got that too when installing on mac, but when running on Rpi it was fine.

Yes it is annoying not sure what is the solution, but for now I have made a separate branch for mac development that does not have the dependency in it.

@keptan
Copy link
Collaborator

keptan commented Jun 3, 2019

cpu_set_t is a core affinity setting thing that is linux only, not on macOS.
This project relies on the IO of the rpi so I doubt you'll be able to get it working on any apple hardware.

@renebigot
Copy link

Install as optional dependency with ´npm install easybotics-rpi-rgb-led-matrix —save-optional’.

NPM will ignore compilation error. It then should work on a RPi, not on other platform but ´npm install’ won’t be blocked anymore if you do some debuging on a Mac (for example)

@keptan
Copy link
Collaborator

keptan commented Jul 5, 2019

this issue only comes about on non linux envs only
ill reopen this issue when you prove you're running macos on a rpi.

@keptan keptan closed this as completed Jul 5, 2019
@redandinvisible
Copy link
Author

Sorry, how would i prove that? I just had the default Raspbien OS on the rpi. Is it mandatory for this library for it to be running on macos on the pi - i didnt even know you could do that!

Sorry, this is my first ever project with a rpi - although i am a backend dev for a living so i'm not completely out of my depth :)

@keptan
Copy link
Collaborator

keptan commented Jul 8, 2019

Sorry Ill take another look

@keptan keptan reopened this Jul 8, 2019
@keptan
Copy link
Collaborator

keptan commented Jul 9, 2019

@redandinvisible
it really looks like you tried to build it on macOS or a different non-linux OS

because http://man7.org/linux/man-pages/man3/CPU_SET.3.html
cpu_set_t should absolutely be available
and everyone else having this problem tried building on mac

is it possible you were sshing into a raspi and accidentally tried to build this from the mac you were sshing from?
thats the only way I can see this happening to you, what do you think?
it also looks like the path you were in is a macos one
otherwise im confused

@keptan keptan closed this as completed Feb 27, 2020
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

4 participants