Failed install on Raspbian


#1

Nice to meet you.
Please advise as Raspbian can not install realm.

What I’ve tried

  • $ rm -rf node_modules & $ npm cache verify
  • $ npm i realm (not install from package.json)

env

Raspberry Pi3

[email protected]:~/server $ cat /etc/debian_version
9.3
[email protected]:~/server $ node -v
v9.6.1
[email protected]:~/server $ npm -v
5.6.0

stdout

[email protected]:~/server $ npm i realm
> [email protected] install /home/pi/server/node_modules/realm
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/2.2.14/realm-v2.2.14-node-v59-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI, glibc) (falling back to source compile with node-gyp)
make: ディレクトリ '/home/pi/server/node_modules/realm/build' に入ります
  TOUCH Release/obj.target/OpenSSL.stamp
  ACTION binding_gyp_vendored_realm_target_download_realm /home/pi/server/node_modules/realm/vendor/realm-linux-arm
Resolved requirements: { CORE_SERVER_FOLDER: 'core',
  CORE_ARCHIVE: 'realm-core-5.1.2.tgz',
  CORE_ARCHIVE_ROOT: 'realm-core-5.1.2' }
No lockfile found at the target, proceeding.
Download url: https://static.realm.io/downloads/core/realm-core-5.1.2.tgz
Extracting realm-core-5.1.2.tgz => /home/pi/server/node_modules/realm/vendor/realm-linux-arm
Success
  TOUCH Release/obj.target/vendored-realm.stamp
  TOUCH Release/obj.target/realm-core.stamp
  CXX(target) Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/collection_notifications.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/index_set.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/list.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/object.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/placeholder.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/object_schema.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/object_store.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/results.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/schema.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/shared_realm.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/thread_safe_reference.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_change_builder.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/list_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/object_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/primitive_list_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/realm_coordinator.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/results_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/transact_log_handler.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/weak_realm_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/util/uuid.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/epoll/external_commit_helper.o
  AR(target) Release/obj.target/object-store.a
  COPY Release/object-store.a
  CXX(target) Release/obj.target/realm/src/js_realm.o
  CXX(target) Release/obj.target/realm/src/node/node_init.o
In file included from ../src/node/node_init.hpp:29:0,
                 from ../src/node/node_init.cpp:19:
../src/node/node_class.hpp: In instantiation of ‘static void realm::node::ObjectWrap<ClassType>::construct(const v8::FunctionCallbackInfo<v8::Value>&) [with ClassType = realm::js::RealmClass<realm::node::Types>]’:
../src/node/node_class.hpp:162:68:   required from ‘static v8::Local<v8::FunctionTemplate> realm::node::ObjectWrap<ClassType>::create_template() [with ClassType = realm::js::RealmClass<realm::node::Types>]’
../src/node/node_class.hpp:50:81:   required from ‘static v8::Local<v8::FunctionTemplate> realm::node::ObjectWrap<ClassType>::get_template() [with ClassType = realm::js::RealmClass<realm::node::Types>]’
../src/node/node_class.hpp:135:55:   required from ‘static v8::Local<v8::Function> realm::node::ObjectWrap<ClassType>::create_constructor(v8::Isolate*) [with ClassType = realm::js::RealmClass<realm::node::Types>]’
../src/js_realm.hpp:333:86:   required from ‘static typename T::Function realm::js::RealmClass<T>::create_constructor(realm::js::RealmClass<T>::ContextType) [with T = realm::node::Types; typename T::Function = v8::Local<v8::Function>; realm::js::RealmClass<T>::ContextType = v8::Isolate*]’
../src/node/node_init.cpp:27:72:   required from here
../src/node/node_class.hpp:232:5: warning: the address of ‘static void realm::js::RealmClass<T>::constructor(realm::js::RealmClass<T>::ContextType, realm::js::RealmClass<T>::ObjectType, size_t, const ValueType*) [with T = realm::node::Types; realm::js::RealmClass<T>::ContextType = v8::Isolate*; realm::js::RealmClass<T>::ObjectType = v8::Local<v8::Object>; size_t = unsigned int; realm::js::RealmClass<T>::ValueType = v8::Local<v8::Value>]’ will always evaluate as ‘true’ [-Waddress]
     if (reinterpret_cast<void*>(s_class.constructor)) {
     ^~
  CXX(target) Release/obj.target/realm/src/node/platform.o
  SOLINK_MODULE(target) Release/obj.target/realm.node
/home/pi/server/node_modules/realm/vendor/realm-linux-arm/lib/librealm-parser.a: error adding symbols: ファイル形式が認識できません
collect2: error: ld returned 1 exit status
realm.target.mk:152: ターゲット 'Release/obj.target/realm.node' のレシピで失敗しました
make: *** [Release/obj.target/realm.node] エラー 1
make: ディレクトリ '/home/pi/server/node_modules/realm/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:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:127:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.14.22-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/server/node_modules/realm/compiled/node-v59_linux_arm/realm.node" "--module_name=realm" "--module_path=/home/pi/server/node_modules/realm/compiled/node-v59_linux_arm"
gyp ERR! cwd /home/pi/server/node_modules/realm
gyp ERR! node -v v9.6.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/server/node_modules/realm/compiled/node-v59_linux_arm/realm.node --module_name=realm --module_path=/home/pi/server/node_modules/realm/compiled/node-v59_linux_arm' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:127:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:933:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Linux 4.14.22-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/server/node_modules/realm
node-pre-gyp ERR! node -v v9.6.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/server/node_modules/realm/compiled/node-v59_linux_arm/realm.node --module_name=realm --module_path=/home/pi/server/node_modules/realm/compiled/node-v59_linux_arm' (1)
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":"arm"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
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-03-07T06_25_06_200Z-debug.log

debug.log(excerpt)

4778 verbose npm  v5.6.0
4779 error code ELIFECYCLE
4780 error errno 1
4781 error [email protected] install: `node-pre-gyp install --fallback-to-build`
4781 error Exit status 1
4782 error Failed at the [email protected] install script.
4782 error This is probably not a problem with npm. There is likely additional logging output above.
4783 verbose exit [ 1, true ]

Thank you.


#2

The follow line explains it:

node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/2.2.14/realm-v2.2.14-node-v59-linux-arm.tar.gz

That is, we don’t precompile Realm Core for Raspberry Pi, so currently we don’t support it.


#3

Thank you for the immediate reply.

OK.

This time we will use a different DB.
Someday I want to use this nice DB.