Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Build fails on Raspberry Pi #37

Open
j-f1 opened this issue Jan 28, 2018 · 6 comments
Open

Build fails on Raspberry Pi #37

j-f1 opened this issue Jan 28, 2018 · 6 comments

Comments

@j-f1
Copy link

j-f1 commented Jan 28, 2018

I'm trying to build Atom on a Raspberry Pi 2, and running npm install fails with this message:

> [email protected] install /media/Raspberry Pi Documents/atom-arm/atom/node_modules/keyboard-layout
> node-gyp rebuild

make: Entering directory '/media/Raspberry Pi Documents/atom-arm/atom/node_modules/keyboard-layout/build'
  CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o
In file included from ../../nan/nan.h:51:0,
                 from ../src/keyboard-layout-manager.h:4,
                 from ../src/keyboard-layout-manager-linux.cc:1:
/home/pi/.node-gyp/9.4.0/include/node/node.h:220:11: error: looser throw specifier for ‘virtual node::MultiIsolatePlatform::~MultiIsolatePlatform()’
In file included from /home/pi/.node-gyp/9.4.0/include/node/node.h:64:0,
                 from ../../nan/nan.h:51,
                 from ../src/keyboard-layout-manager.h:4,
                 from ../src/keyboard-layout-manager-linux.cc:1:
/home/pi/.node-gyp/9.4.0/include/node/v8-platform.h:178:11: error:   overriding ‘virtual v8::Platform::~Platform() noexcept (true)’
keyboard-layout-manager.target.mk:95: recipe for target 'Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o' failed
make: *** [Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o] Error 1
make: Leaving directory '/media/Raspberry Pi Documents/atom-arm/atom/node_modules/keyboard-layout/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/media/Raspberry Pi Documents/.nvm/versions/node/v9.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.1.19-v7+
gyp ERR! command "/media/Raspberry Pi Documents/.nvm/versions/node/v9.4.0/bin/node" "/media/Raspberry Pi Documents/.nvm/versions/node/v9.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /media/Raspberry Pi Documents/atom-arm/atom/node_modules/keyboard-layout
gyp ERR! node -v v9.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2018-01-28T18_21_01_598Z-debug.log

Is there any way to fix this error?

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Jan 29, 2018

Hi @j-f1 👋

ARM is currently not supported for Atom but there are users that have got it up and running. I have not tried any of this myself but I know about some issues and resources that might help you:

https://github.com/hypersad/atom-armv7l/
atom/atom#15881
atom/atom#7822
electron/electron#11413

@j-f1
Copy link
Author

j-f1 commented Jan 29, 2018

Thanks for getting back to me!

I’m actually using @hypersad’s solution you linked above. I’ll try installing a newer version of g++ this afternoon.

@tylercwats
Copy link

Were you able to fix this issue? I'm having the same problem.

@ghost
Copy link

ghost commented Mar 12, 2018

I have only Raspberry Pi 3 Model B, on which Atom seems to build fine, so I can't help.

@LessThanCorey
Copy link

Try npm install [email protected]
Then try to build it again, it fixed it for me.

@BeeChains
Copy link

help please!!! using pi 3b+!!!

~/patchwork $ npm start patchwork

[email protected] start /home/pi/patchwork
electron index.js "patchwork"

/home/pi/patchwork/node_modules/electron/index.js:14
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (/home/pi/patchwork/node_modules/electron/index.js:14:11)
at Object. (/home/pi/patchwork/node_modules/electron/index.js:18:18)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/home/pi/patchwork/node_modules/electron/cli.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: electron index.js "patchwork"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-04-11T20_21_08_863Z-debug.log

~/patchwork $ rm -rf node_modules
~/patchwork $ rm -rf electron
~/patchwork $ npm install

@felixrieseberg/[email protected] install /home/pi/patchwork/node_modules/@felixrieseberg/spellchecker
node-gyp rebuild

make: Entering directory '/home/pi/patchwork/node_modules/@felixrieseberg/spellchecker/build'
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/md5.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string_piece.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict_reader.o
../vendor/hunspell/src/google/bdict_reader.cc: In member function ‘bool hunspell::LineIterator::AdvanceAndCopy(char*, size_t)’:
../vendor/hunspell/src/google/bdict_reader.cc:670:15: warning: unused variable ‘begin’ [-Wunused-variable]
const char* begin = reinterpret_cast<const char*>(&bdict_data_[cur_offset_]);
^~~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affentry.o
In file included from ../vendor/hunspell/src/hunspell/affentry.cxx:9:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
^~~~
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
^~~~
../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int PfxEntry::test_condition(const char*)’:
../vendor/hunspell/src/hunspell/affentry.cxx:113:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
case '.': if (!pos) { // dots are not metacharacters in groups: [.]
^~
../vendor/hunspell/src/hunspell/affentry.cxx:120:5: note: here
default: {
^~~~~~~
../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int SfxEntry::test_condition(const char*, const char*)’:
../vendor/hunspell/src/hunspell/affentry.cxx:503:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
case '.': if (!pos) { // dots are not metacharacters in groups: [.]
^~
../vendor/hunspell/src/hunspell/affentry.cxx:518:5: note: here
default: {
^~~~~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
^~~~
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
^~~~
../vendor/hunspell/src/hunspell/affixmgr.cxx: In member function ‘int AffixMgr::encodeit(affentry&, char*)’:
../vendor/hunspell/src/hunspell/affixmgr.cxx:1141:12: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 20 equals destination size [-Wstringop-truncation]
strncpy(entry.c.conds, cs, MAXCONDLEN);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘void strlinecat(char*, const char*)’:
../vendor/hunspell/src/hunspell/csutil.cxx:411:24: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(dest, s, len);
~~~~~~~^~~~~~~~~~~~~~
../vendor/hunspell/src/hunspell/csutil.cxx:407:21: note: length computed here
int len = strlen(s);
~~~~~~^~~
../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘char* mystrrep(char*, const char*, const char*)’:
../vendor/hunspell/src/hunspell/csutil.cxx:567:16: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(pos, rep, replen);
~~~~~~~^~~~~~~~~~~~~~~~~~
../vendor/hunspell/src/hunspell/csutil.cxx:552:26: note: length computed here
int replen = strlen(rep);
~~~~~~^~~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/dictmgr.o
../vendor/hunspell/src/hunspell/dictmgr.cxx: In member function ‘int DictMgr::parse_file(const char*, const char*)’:
../vendor/hunspell/src/hunspell/dictmgr.cxx:102:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
pdict->region=NULL;
^
../vendor/hunspell/src/hunspell/dictmgr.cxx:103:21: note: here
case 2: //deliberate fallthrough
^~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/filemgr.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hashmgr.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hunspell.o
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::spell(const char*, int*, char**)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:404:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
info += SPELL_ORIGCAP;
../vendor/hunspell/src/hunspell/hunspell.cxx:405:6: note: here
case NOCAP: {
^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:474:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
}
^
../vendor/hunspell/src/hunspell/hunspell.cxx:476:6: note: here
case INITCAP: {
^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::suggest(char
**, const char*)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:786:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
capwords = 1;
~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:787:6: note: here
case HUHCAP: {
^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:910:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
capwords = 1;
~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:911:11: note: here
case HUHCAP: {
^~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hunzip.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/phonet.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/replist.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/suggestmgr.o
../vendor/hunspell/src/hunspell/suggestmgr.cxx: In member function ‘char* SuggestMgr::suggest_gen(char**, int, char*)’:
../vendor/hunspell/src/hunspell/suggestmgr.cxx:1883:12: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
strncpy(ds, MORPH_TERM_SFX, MORPH_TAG_LEN);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/parsers/textparser.o
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string16.o
AR(target) Release/obj.target/hunspell.a
COPY Release/hunspell.a
CXX(target) Release/obj.target/spellchecker/src/main.o
In file included from ../src/main.cc:2:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../../../nan/nan.h:54,
from ../src/main.cc:2:
../src/main.cc: At global scope:
/home/pi/.cache/node-gyp/13.12.0/include/node/node.h:618:43: warning: cast between incompatible function types from ‘void ()(v8::Localv8::Object, v8::Localv8::Object)’ to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/home/pi/.cache/node-gyp/13.12.0/include/node/node.h:652:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/main.cc:228:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(spellchecker, Init)
^~~~~~~~~~~
CXX(target) Release/obj.target/spellchecker/src/spellchecker_hunspell.o
CXX(target) Release/obj.target/spellchecker/src/spellchecker_linux.o
CXX(target) Release/obj.target/spellchecker/src/transcoder_posix.o
SOLINK_MODULE(target) Release/obj.target/spellchecker.node
COPY Release/spellchecker.node
make: Leaving directory '/home/pi/patchwork/node_modules/@felixrieseberg/spellchecker/build'

[email protected] install /home/pi/patchwork/node_modules/keyboard-layout
node-gyp rebuild

make: Entering directory '/home/pi/patchwork/node_modules/keyboard-layout/build'
CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager.o
In file included from ../src/keyboard-layout-manager.cc:1:
../src/keyboard-layout-manager.h:7:10: fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
^~~~~~~~~~~~
compilation terminated.
make: *** [keyboard-layout-manager.target.mk:112: Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager.o] Error 1
make: Leaving directory '/home/pi/patchwork/node_modules/keyboard-layout/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/.config/versions/node/v13.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.97-v7+
gyp ERR! command "/home/pi/.config/versions/node/v13.12.0/bin/node" "/home/pi/.config/versions/node/v13.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/patchwork/node_modules/keyboard-layout
gyp ERR! node -v v13.12.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-04-11T20_40_53_515Z-debug.log

~/patchwork $ npm install patchwork

  • [email protected]
    removed 21 packages and updated 1 package in 46.352s
    51 packages are looking for funding
    run npm fund for details

~/patchwork $ npm start patchwork

[email protected] start /home/pi/patchwork
electron index.js "patchwork"

/home/pi/patchwork/node_modules/electron/index.js:14
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (/home/pi/patchwork/node_modules/electron/index.js:14:11)
at Object. (/home/pi/patchwork/node_modules/electron/index.js:18:18)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/home/pi/patchwork/node_modules/electron/cli.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: electron index.js "patchwork"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-04-11T20_46_39_842Z-debug.log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants