-
Notifications
You must be signed in to change notification settings - Fork 16
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
node-gyp fails on armv7 32bit #21
Comments
Unfortunately, I can't reproduce the error on the latest version of Raspberry Pi OS with Node.js v14.16.0 and gcc v8.3.0. pi@raspberrypi:~/spi-device $ node --version
v14.16.0
pi@raspberrypi:~/spi-device $ gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
pi@raspberrypi:~/spi-device $ uname -a
Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux
pi@raspberrypi:~/spi-device $ npm install spi-device
> spi-device@3.1.1 install /home/pi/spi-device/node_modules/spi-device
> node-gyp rebuild
make: Entering directory '/home/pi/spi-device/node_modules/spi-device/build'
CXX(target) Release/obj.target/spi/src/spi.o
CXX(target) Release/obj.target/spi/src/spidevice.o
CXX(target) Release/obj.target/spi/src/open.o
CXX(target) Release/obj.target/spi/src/close.o
CXX(target) Release/obj.target/spi/src/transfer.o
CXX(target) Release/obj.target/spi/src/getoptions.o
CXX(target) Release/obj.target/spi/src/setoptions.o
SOLINK_MODULE(target) Release/obj.target/spi.node
COPY Release/spi.node
make: Leaving directory '/home/pi/spi-device/node_modules/spi-device/build'
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/spi-device/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/spi-device/package.json'
npm WARN spi-device No description
npm WARN spi-device No repository field.
npm WARN spi-device No README data
npm WARN spi-device No license field.
+ spi-device@3.1.1
added 4 packages from 9 contributors and audited 4 packages in 18.479s
found 0 vulnerabilities
pi@raspberrypi:~/spi-device $ Please answer the following questions: What version of spi-device is being used? It should be possible to see this in "node_modules/spi-device/package.json". |
Also, if you run the command "npm install spi-device" in an empty directory, does it work? |
I'm using spi-device 3.1.1. It also happens in an empty directory. It always worked in the past for both, armv7 32bit and armv8 64bit. After an update of Arch Linux ARM npm install fails for getoptions.o on armv7 32bit now. It's a rolling release distribution with updates all the time, so I'm not 100% sure when it exactly happened. It is also difficult to remember because after each system update everything worked as expected, so the already built spi-device module worked without issues. Only when I had to compile the spi-device module again I run into this issue. So, yes, it could be related to an gcc update. gcc version is actually 10.2.0. |
The longer I think about this the more I believe that the update from gcc 9.3.0 to 10.2.0 was the one that introduced this issue for spi-device. But again, I'm not 100% sure. |
Does it work if this line: Nan::New<v8::Uint32>(spiOptions.mode & (SPI_CPOL | SPI_CPHA)) is changed to this: Nan::New<v8::Uint32>(static_cast<uint32_t>(spiOptions.mode & (SPI_CPOL | SPI_CPHA))) |
yes, this works fine. |
oh, I forgot to mention that it didn't work for me either. |
Ok, thanks for the information. I don't quite understand why it didn't work with gcc 8 which works for me. |
@Flummi On the other hand, your using aarch64 @ odroid c2. I used 32-bit Raspberry Pi OS. This may explain the difference. |
true. maybe an error only with aarch64. (I got the same error as @renkei) edit: nevermind.. I've no clue. |
To be clear, on aarch64 there is no error. I've got it only on armv7, 32bit. Now, I've cloned this repo and run npm install on master branch on armv7, 32bit. It fails with exactly the same error, as expected. I've added the static cast as mentioned by fivdi and called npm install again. Now it works! Please, can you create a bugfix release 3.1.2? I don't expect any side-effects by this patch and it should work properly on all platforms. |
Yes, I'll do that in the coming days. It shouldn't take too long. |
This issue has been fixed and the fix is available with spi-device@3.1.2 which has been published on npm. |
I'm on Arch Linux ARM for amv7h, 32bit.
node-gyp fails with:
Runs fine on Ach Linux ARM for armv8/aarch64, 64bit.
Any ideas howto solve the error
call of overloaded ‘New(long unsigned int&)’ is ambiguous
?The text was updated successfully, but these errors were encountered: