Open qistoph opened 2 years ago
Running npm install
in the epoll dir works correctly:
~/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll $ npm install
~/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll $ grep -r compression
build/config.gypi: "v8_enable_pointer_compression": 0,
However it seems that using electron-rebuild
breaks the pointer compression:
~/MagicMirror/modules/MMM-PIR-Sensor $ node_modules/.bin/electron-rebuild -e ../../node_modules/electron
[...]
/home/pi/.electron-gyp/16.0.5/include/node/v8-internal.h:113:27: error: static assertion failed: Pointer compression can be enabled only for 64-bit architectures
kApiSystemPointerSize == kApiInt64Size,
[...]
~/MagicMirror/modules/MMM-PIR-Sensor $ grep -r compression node_modules/epoll/
node_modules/epoll/build/config.gypi: "v8_enable_pointer_compression": 1,
What version of Electron are you using?
I haven't used Electron myself but to the best of my knowledge, native modules such as epoll that are not "Context Aware" will not work with Electrom 14 or higher. See https://github.com/electron/electron/issues/18397.
~/MagicMirror/modules/MMM-PIR-Sensor $ DEBUG="electron-rebuild" ./node_modules/.bin/electron-rebuild -e ../../node_modules/electron
⠋ Searching dependency tree electron-rebuild rebuilding with args: [Arguments] {
'0': {
buildPath: '/home/pi/MagicMirror/modules/MMM-PIR-Sensor',
electronVersion: '16.0.5',
arch: 'arm',
extraModules: [],
onlyModules: null,
force: undefined,
headerURL: undefined,
types: [ 'prod', 'optional' ],
mode: undefined,
debug: undefined,
prebuildTagPrefix: 'v',
forceABI: undefined,
useElectronClang: false,
disablePreGypCopy: false,
projectRootPath: '/home/pi/MagicMirror/modules/MMM-PIR-Sensor'
}
} +0ms
I managed to find a work around, but don't understand enough of gyp to comprehend a proper fix.
I've found that ~/.electron-gyp/16.0.5/include/node/common.gypi
contains rules to set v8_enable_pointer_compression: 1
only if target_arch
is arm64
or x64
. Which shouldn't be the case, since I'm running this on arm.
Setting v8_enable_pointer_compression: 0
in node_modules/node-gyp/addon.gypi
's variables
does get my electron-rebuild run.
Building with
election-rebuild@3.2.7
fails with: error: static assertion failed: Pointer compression can be enabled only for 64-bit architecturesAny suggestions on how to fix this?
Below is the full log.