beyondscreen / node-rpi-ws281x-native

native bindings to drive WS2811 (or WS2812) LED-Controllers on a Raspberry Pi
MIT License
224 stars 101 forks source link

Compilation error #56

Closed Stan92 closed 6 years ago

Stan92 commented 7 years ago

Hi, Using npm install I get this error. To be clear, I had to uninstall the package.

gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.9.0 | linux | arm
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/node-rpi-ws281x-native/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/.node-gyp/7.9.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/pi/.node-gyp/7.9.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/pi/node-rpi-ws281x-native',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
make: Entering directory '/home/pi/node-rpi-ws281x-native/build'
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/ws2811.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/pwm.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/dma.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/mailbox.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/board_info.o
  AR(target) Release/obj.target/rpi_libws2811.a
  COPY Release/rpi_libws2811.a
  CXX(target) Release/obj.target/rpi_ws281x/src/rpi-ws281x.o
In file included from /usr/include/c++/4.9/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.9/memory:62,
                 from /home/pi/.node-gyp/7.9.0/include/node/v8.h:21,
                 from /home/pi/.node-gyp/7.9.0/include/node/node.h:42,
                 from ../node_modules/nan/nan.h:49,
                 from ../src/rpi-ws281x.cc:1:
/usr/include/c++/4.9/bits/stl_pair.h:109:15: internal compiler error: Segmentation fault
       : first(), second() { }
               ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cc5q8c2V.out file, please attach this to your bugreport.
rpi_ws281x.target.mk:95: recipe for target 'Release/obj.target/rpi_ws281x/src/rpi-ws281x.o' failed
make: *** [Release/obj.target/rpi_ws281x/src/rpi-ws281x.o] Error 1
make: Leaving directory '/home/pi/node-rpi-ws281x-native/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.50-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/node-rpi-ws281x-native
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok 
usefulthink commented 6 years ago

sorry for not replying earlier. The issue you experienced is apparently a bug in gcc and has nothing per se to do with this module.