AgregoreWeb / agregore-browser

A minimal browser for the distributed web (Desktop version)
https://www.youtube.com/watch?v=TnYKvOQB0ts&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=14
GNU Affero General Public License v3.0
715 stars 66 forks source link

compilation error: errorOut=prebuild-install warn install No prebuilt binaries found (target=20.3.2 runtime=electron arch=x64 libc= platform=linux) #213

Closed raphael10-collab closed 1 year ago

raphael10-collab commented 1 year ago
raphy@pc:~$ git clone https://github.com/AgregoreWeb/agregore-browser.git
Cloning into 'agregore-browser'...
remote: Enumerating objects: 2497, done.
remote: Total 2497 (delta 0), reused 0 (delta 0), pack-reused 2497
Receiving objects: 100% (2497/2497), 4.06 MiB | 14.27 MiB/s, done.
Resolving deltas: 100% (1591/1591), done.
raphy@pc:~$ cd agregore-browser/
raphy@pc:~/agregore-browser$ git submodule update --init --recursive
Submodule 'app/extensions/extension-agregore-qr-share' (https://github.com/AgregoreWeb/extension-agregore-qr-share.git) registered for path 'app/extensions/extension-agregore-qr-share'
Submodule 'app/extensions/extension-agregore-renderer' (https://github.com/AgregoreWeb/extension-agregore-renderer.git) registered for path 'app/extensions/extension-agregore-renderer'
Cloning into '/home/raphy/agregore-browser/app/extensions/extension-agregore-qr-share'...
Cloning into '/home/raphy/agregore-browser/app/extensions/extension-agregore-renderer'...
Submodule path 'app/extensions/extension-agregore-qr-share': checked out 'cfb20c0337db325f5aea18e8b21d26549d77c4ae'
Submodule path 'app/extensions/extension-agregore-renderer': checked out 'b042a7769374e4d98d8bf034f9ad23658908c941'
raphy@pc:~/agregore-browser$ yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "wrtc@0.4.7" is missing a bundled dependency "node-pre-gyp". This should be reported to the package maintainer.
[4/4] Building fresh packages...
$ npm run download-extensions && electron-builder install-app-deps

> agregore-browser@1.9.1 download-extensions
> node ./download-extensions.js

Downloading latest archiveweb.page release from the chrome web store
Downloading latest ublock release from the chrome web store
Finished downloading and installing ublock
Finished downloading and installing archiveweb.page
  • electron-builder  version=22.14.13
  • loaded configuration  file=package.json ("build" field)
  • rebuilding native dependencies  dependencies=better-sqlite3@7.6.2, bufferutil@4.0.6, ed25519-supercop@2.0.1, fd-lock@1.2.0, fsctl@1.0.0, sodium-native@3.4.1, utf-8-validate@5.0.9, utp-native@2.5.3
                                    platform=linux
                                    arch=x64
  • install prebuilt binary  name=better-sqlite3 version=7.6.2 platform=linux arch=x64 napi=
  • build native dependency from sources  name=better-sqlite3
                                          version=7.6.2
                                          platform=linux
                                          arch=x64
                                          napi=
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=prebuild-install info begin Prebuild-install version 7.1.1
    prebuild-install warn install prebuilt binaries enforced with --force!
    prebuild-install warn install prebuilt binaries may be out of date!
    prebuild-install info looking for local prebuild @ prebuilds/better-sqlite3-v7.6.2-electron-v107-linux-x64.tar.gz
    prebuild-install info looking for cached prebuild @ /home/raphy/.npm/_prebuilds/4acada-better-sqlite3-v7.6.2-electron-v107-linux-x64.tar.gz
    prebuild-install http request GET https://github.com/WiseLibs/better-sqlite3/releases/download/v7.6.2/better-sqlite3-v7.6.2-electron-v107-linux-x64.tar.gz
    prebuild-install http 404 https://github.com/WiseLibs/better-sqlite3/releases/download/v7.6.2/better-sqlite3-v7.6.2-electron-v107-linux-x64.tar.gz
    prebuild-install warn install No prebuilt binaries found (target=20.3.2 runtime=electron arch=x64 libc= platform=linux)

  • rebuilding native dependency  name=bufferutil version=4.0.6
  • rebuilding native dependency  name=better-sqlite3 version=7.6.2
  • rebuilding native dependency  name=ed25519-supercop version=2.0.1
  • rebuilding native dependency  name=fd-lock version=1.2.0
  • rebuilding native dependency  name=fsctl version=1.0.0
  • rebuilding native dependency  name=sodium-native version=3.4.1
  • rebuilding native dependency  name=utf-8-validate version=5.0.9
  • rebuilding native dependency  name=utp-native version=2.5.3
  • cannot build optional native dependency  name=better-sqlite3
                                             version=7.6.2
                                             cause=exit status 1
yarn run v1.22.19
$ prebuild-install || npm run build-release

    > better-sqlite3@7.6.2 build-release
    > node-gyp rebuild --release

    make: Entering directory '/home/raphy/agregore-browser/node_modules/better-sqlite3/build'
      TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
      ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
      TOUCH Release/obj.target/deps/locate_sqlite3.stamp
      CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
      AR(target) Release/obj.target/deps/sqlite3.a
      COPY Release/sqlite3.a
      CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
    rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
    make: Leaving directory '/home/raphy/agregore-browser/node_modules/better-sqlite3/build'
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

                                             errorOut=prebuild-install warn install No prebuilt binaries found (target=20.3.2 runtime=electron arch=x64 libc= platform=linux)
    gyp info it worked if it ends with ok
    gyp info using node-gyp@9.0.0
    gyp info using node@16.15.1 | linux | x64
    gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
    gyp info spawn /usr/bin/python3
    gyp info spawn args [
    gyp info spawn args   '/home/raphy/.nvm/versions/node/v16.15.1/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/raphy/agregore-browser/node_modules/better-sqlite3/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/raphy/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/raphy/.electron-gyp/20.3.2/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/raphy/.electron-gyp/20.3.2',
    gyp info spawn args   '-Dnode_gyp_dir=/home/raphy/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/home/raphy/.electron-gyp/20.3.2/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/home/raphy/agregore-browser/node_modules/better-sqlite3',
    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 args ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    In file included from /home/raphy/.electron-gyp/20.3.2/include/node/v8-object.h:9,
                     from /home/raphy/.electron-gyp/20.3.2/include/node/v8-array-buffer.h:13,
                     from /home/raphy/.electron-gyp/20.3.2/include/node/v8.h:24,
                     from /home/raphy/.electron-gyp/20.3.2/include/node/node.h:69,
                     from ./src/better_sqlite3.lzz:11,
                     from ../src/better_sqlite3.cpp:4:
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:106:45: error: ‘is_lvalue_reference_v’ is not a member of ‘std’; did you mean ‘is_lvalue_reference’?
      106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
          |                                             ^~~~~~~~~~~~~~~~~~~~~
          |                                             is_lvalue_reference
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
      106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
          |                                                                  ^
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
      106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
          |                                                                   ^
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:106:71: error: expected unqualified-id before ‘>’ token
      106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
          |                                                                       ^
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:123:43: error: ‘is_lvalue_reference_v’ is not a member of ‘std’; did you mean ‘is_lvalue_reference’?
      123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
          |                                           ^~~~~~~~~~~~~~~~~~~~~
          |                                           is_lvalue_reference
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
      123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
          |                                                                ^
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
      123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
          |                                                                 ^
    /home/raphy/.electron-gyp/20.3.2/include/node/v8-maybe.h:123:70: error: expected unqualified-id before ‘=’ token
      123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
          |                                                                      ^
    In file included from ./src/better_sqlite3.lzz:11,
                     from ../src/better_sqlite3.cpp:4:
    /home/raphy/.electron-gyp/20.3.2/include/node/node.h:882:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)’ to ‘node::addon_context_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, void*)’} [-Wcast-function-type]
      882 |       (node::addon_context_register_func) (regfunc),                  \
          |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/raphy/.electron-gyp/20.3.2/include/node/node.h:900:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE_X’
      900 |   NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/raphy/.electron-gyp/20.3.2/include/node/node.h:931:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE’
      931 |   NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME,                     \
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~
    ./src/better_sqlite3.lzz:67:1: note: in expansion of macro ‘NODE_MODULE_INIT’
    ./src/util/macros.lzz: In function ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, v8::AccessorGetterCallback)’:
    ./src/util/macros.lzz:157:21: error: ‘v8::AccessorSignature’ has not been declared
    ./src/util/binder.lzz: In static member function ‘static bool Binder::IsPlainObject(v8::Isolate*, v8::Local<v8::Object>)’:
    ./src/util/binder.lzz:37:51: error: ‘class v8::Object’ has no member named ‘CreationContext’; did you mean ‘GetCreationContext’?
    ./src/util/data.lzz: In function ‘v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_stmt*, int, bool)’:
    ./src/util/data.lzz:73:92: warning: this statement may fall through [-Wimplicit-fallthrough=]
    ./src/util/data.lzz:73:197: note: here
    ./src/util/data.lzz: In function ‘v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_value*, bool)’:
    ./src/util/data.lzz:77:81: warning: this statement may fall through [-Wimplicit-fallthrough=]
    ./src/util/data.lzz:77:175: note: here
    make: *** [better_sqlite3.target.mk:143: Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/home/raphy/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    gyp ERR! System Linux 5.15.0-52-generic
    gyp ERR! command "/home/raphy/.nvm/versions/node/v16.15.1/bin/node" "/home/raphy/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
    gyp ERR! cwd /home/raphy/agregore-browser/node_modules/better-sqlite3
    gyp ERR! node -v v16.15.1
    gyp ERR! node-gyp -v v9.0.0
    gyp ERR! not ok 
error Command failed with exit code 1.

                                             command=/home/raphy/.nvm/versions/node/v16.15.1/bin/node /home/raphy/.yarn/bin/yarn.js run install
                                             workingDir=/home/raphy/agregore-browser/node_modules/better-sqlite3
Done in 51.39s.
raphy@pc:~/agregore-browser$ nano package.json 
raphy@pc:~/agregore-browser$ nano package.json 
raphy@pc:~/agregore-browser$ 

Other Info:

O.S. : Ubuntu 22.04 Desktop
node: v16.15.1
RangerMauve commented 1 year ago

Does the code still run after this? I think the error can be safely ignored since better-sqlite3 is an optional dependency.

I think in the next few months I'll be replacing it once hyper-sdk updates. 😁

raphael10-collab commented 1 year ago

It works without better-sqlite3