cerebro icon indicating copy to clipboard operation
cerebro copied to clipboard

`error Command "build" not found.` during installation in latest Manjaro with `pacaur -S cerebro`

Open notalentgeek opened this issue 6 years ago • 2 comments

Here are the error log:

yarn run v1.3.2
error Command "build" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
==> ERROR: A failure occurred in build().
    Aborting...
:: gendesk is now an orphan package
:: failed to build cerebro package(s)

Here are the full log...

[notalentgeek@notalentgeek-pc ~]$ pacaur -S cerebro
:: Package cerebro not found in repositories, trying AUR...
:: resolving dependencies...
:: looking for inter-conflicts...
:: cerebro-0.3.1-1 has been flagged out of date on Sen 18 Des 2017 08:20:06  WIB

AUR Packages  (1) cerebro-0.3.1-1  
Repo Packages (1) gendesk-0.6.5-1  

Repo Download Size:   0.11 MiB
Repo Installed Size:  0.58 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving package(s)...
Cloning into 'cerebro'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 0), reused 1 (delta 0)
Unpacking objects: 100% (6/6), done.
:: View cerebro PKGBUILD? [Y/n] Y
:: cerebro PKGBUILD viewed
[sudo] password for notalentgeek: 
:: Checking cerebro integrity...
==> Making package: cerebro 0.3.1-1 (Kam Jan 18 08:51:22 WIB 2018)
==> Retrieving sources...
  -> Downloading 0.3.1.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122    0   122    0     0    122      0 --:--:-- --:--:-- --:--:--   127
100 1245k    0 1245k    0     0   415k      0 --:--:--  0:00:03 --:--:--  711k
==> Validating source files with sha256sums...
    0.3.1.tar.gz ... Passed
:: Building cerebro package(s)...
==> Making package: cerebro 0.3.1-1 (Kam Jan 18 08:51:26 WIB 2018)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (1) gendesk-0.6.5-1

Total Download Size:   0,11 MiB
Total Installed Size:  0,58 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 gendesk-0.6.5-1-x86_64                   113,4 KiB  88,1K/s 00:01 [####################################] 100%
(1/1) checking keys in keyring                                     [####################################] 100%
(1/1) checking package integrity                                   [####################################] 100%
(1/1) loading package files                                        [####################################] 100%
(1/1) checking for file conflicts                                  [####################################] 100%
(1/1) checking available disk space                                [####################################] 100%
:: Processing package changes...
(1/1) installing gendesk                                           [####################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "eslint@^3.19.0".
warning "eslint-config-airbnb > [email protected]" has incorrect peer dependency "eslint@^3.19.0".
warning " > [email protected]" has incorrect peer dependency "webpack@^1 || ^2".
warning "jsdom > [email protected]" has unmet peer dependency "request@^2.34".
warning "jsdom > request-promise-native > [email protected]" has unmet peer dependency "request@^2.34".
warning " > [email protected]" has incorrect peer dependency "webpack@^1.12.13 || ^2.1.0-beta.15".
[4/4] Building fresh packages...
$ concurrently "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"
[0] node node_modules/fbjs-scripts/node/check-dev-engines.js package.json exited with code 0
Done in 57.42s.
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/2] â   ref:    ^~~~~~~~~~
[-/2] â   waiting...
[-/2] â   waiting...
[-/2] â   waiting...
error /home/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://nodejs.org/download/release/v9.4.0/node-v9.4.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v9.4.0/node-v9.4.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v9.4.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v9.4.0/SHASUMS256.txt
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/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/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/notalentgeek/.node-gyp/9.4.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/notalentgeek/.node-gyp/9.4.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/notalentgeek/.node-gyp/9.4.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref',
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
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../../nan/nan.h:192:0,
                 from ../src/binding.cc:8:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:112:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
   return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
                                                                         ^
In file included from /home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:26:0,
                 from /home/notalentgeek/.node-gyp/9.4.0/include/node/node.h:63,
                 from ../src/binding.cc:6:
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:3115:29: note: declared here
                 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                             ^
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/binding.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/binding.cc:619:182: error: no matching function for call to ‘v8::Object::ForceSet(v8::Local<v8::String>, v8::Local<v8::String>, v8::PropertyAttribute)’
   target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::String>(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
                                                                                                                                                                                      ^
In file included from /home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:26:0,
                 from /home/notalentgeek/.node-gyp/9.4.0/include/node/node.h:63,
                 from ../src/binding.cc:6:
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:3115:29: note: candidate: v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)
                 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                             ^
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:3115:29: note:   no known conversion for argument 3 from ‘v8::PropertyAttribute’ to ‘v8::Local<v8::Value>’
                 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                             ^
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/binding.cc:620:137: error: no matching function for call to ‘v8::Object::ForceSet(v8::Local<v8::String>, v8::Local<v8::Value>, v8::PropertyAttribute)’
   target->ForceSet(Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
                                                                                                                                         ^
In file included from /home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:26:0,
                 from /home/notalentgeek/.node-gyp/9.4.0/include/node/node.h:63,
                 from ../src/binding.cc:6:
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:3115:29: note: candidate: v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)
                 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                             ^
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h:3115:29: note:   no known conversion for argument 3 from ‘v8::PropertyAttribute’ to ‘v8::Local<v8::Value>’
                 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                             ^
/home/notalentgeek/.node-gyp/9.4.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
make: *** [binding.target.mk:95: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/home/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref/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/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.9.76-1-MANJARO
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/notalentgeek/.cache/pacaur/cerebro/src/cerebro-0.3.1/app/node_modules/ref




yarn run v1.3.2
error Command "build" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
==> ERROR: A failure occurred in build().
    Aborting...
:: gendesk is now an orphan package
:: failed to build cerebro package(s)

notalentgeek avatar Jan 18 '18 01:01 notalentgeek

For me it was an issue that gyp was installed globally with a different version than cerebro is coming with. Cerebro from AUR comes with node 8.9.4 (LTS), while you seem to have used gyp with 9.4.0 (as seen from your log):

/home/notalentgeek/.node-gyp/9.4.0/include/node/v8.h

Uninstall node-gyp 9.4.0 and then rerun the installation, it should work then. Or just build cerebro directly from github.

wtho avatar Feb 01 '18 21:02 wtho

FYI the reason AUR package is using LTS nodejs is #426, as soon as it's fixed I'll switch the nodejs dependency back to the latest version.

Yet another alternative is to use a pre-compiled package that I made, see comments on the AUR page.

maximbaz avatar Feb 03 '18 00:02 maximbaz

When it comes to build this issue is very old, so I believe that today we no longer have this problem. I will close, if the problem repeats I will open again

@maximbaz @wtho @notalentgeek

ogustavo-pereira avatar Jan 01 '23 21:01 ogustavo-pereira