Skip to content

Build Failed on Ubuntu 18.04.3 LTS #1733

@arkniazi

Description

@arkniazi

I tried to build app on ubuntu but iit failed

../src/keyboard-layout-manager-linux.cc:5:10: fatal error: X11/extensions/XKBrules.h: No such file or directory

Reproduced

1.     git clone https://github.com/Automattic/simplenote-electron.git
2.     cd simplenote-electron
3.     npm install

Observed

`npm install

@paulcbetts/[email protected] install /home/abdul/workspace/npm/simplenote-electron/node_modules/@paulcbetts/spellchecker
node-gyp rebuild

make: Entering directory '/home/abdul/workspace/npm/simplenote-electron/node_modules/@paulcbetts/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:0:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
sfx(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]
ar * 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:0:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
sfx(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]
ar * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
^~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
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
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
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::SetDictionary(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:43:54: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
std::string language = *String::Utf8Value(info[0]);
^
In file included from /home/abdul/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /home/abdul/.node-gyp/10.15.3/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/main.cc:2:
/home/abdul/.node-gyp/10.15.3/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^
/home/abdul/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::IsMisspelled(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:64:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
std::string word = *String::Utf8Value(info[0]);
^
In file included from /home/abdul/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /home/abdul/.node-gyp/10.15.3/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/main.cc:2:
/home/abdul/.node-gyp/10.15.3/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^
/home/abdul/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::Add(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:112:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
std::string word = *String::Utf8Value(info[0]);
^
In file included from /home/abdul/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /home/abdul/.node-gyp/10.15.3/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/main.cc:2:
/home/abdul/.node-gyp/10.15.3/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^
/home/abdul/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::Remove(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:125:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
std::string word = *String::Utf8Value(info[0]);
^
In file included from /home/abdul/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /home/abdul/.node-gyp/10.15.3/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/main.cc:2:
/home/abdul/.node-gyp/10.15.3/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^
/home/abdul/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::GetAvailableDictionaries(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:139:52: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
std::string path = *String::Utf8Value(info[0]);
^
In file included from /home/abdul/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /home/abdul/.node-gyp/10.15.3/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/main.cc:2:
/home/abdul/.node-gyp/10.15.3/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^
/home/abdul/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::GetCorrectionsForMisspelling(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:162:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
std::string word = *String::Utf8Value(info[0]);
^
In file included from /home/abdul/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /home/abdul/.node-gyp/10.15.3/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/main.cc:2:
/home/abdul/.node-gyp/10.15.3/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^
/home/abdul/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
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/abdul/workspace/npm/simplenote-electron/node_modules/@paulcbetts/spellchecker/build'

[email protected] install /home/abdul/workspace/npm/simplenote-electron/node_modules/keyboard-layout
node-gyp rebuild

make: Entering directory '/home/abdul/workspace/npm/simplenote-electron/node_modules/keyboard-layout/build'
CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager.o
CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o
../src/keyboard-layout-manager-linux.cc:5:10: fatal error: X11/extensions/XKBrules.h: No such file or directory
#include <X11/extensions/XKBrules.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
keyboard-layout-manager.target.mk:104: 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 '/home/abdul/workspace/npm/simplenote-electron/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 (/usr/local/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 Linux 4.15.0-70-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/abdul/workspace/npm/simplenote-electron/node_modules/keyboard-layout
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

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/abdul/.npm/_logs/2019-11-21T11_34_13_124Z-debug.log`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions