kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
505 stars 41 forks source link

lmdb-store: build error #274

Closed maghaffar closed 7 months ago

maghaffar commented 7 months ago

I am instaling node modules using yarn install and getting this error

error /home/abdul/Desktop/work/herb/platform/node_modules/lmdb-store: Command failed. Exit code: 1 Command: node-gyp-build Arguments: Directory: /home/abdul/Desktop/work/herb/platform/node_modules/lmdb-store Output: gyp info it worked if it ends with ok gyp info using node-gyp@10.0.1 gyp info using node@20.11.1 | linux | x64 gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3" gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/home/abdul/.nvm/versions/node/v20.11.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/abdul/Desktop/work/herb/platform/node_modules/lmdb-store/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/abdul/.nvm/versions/node/v20.11.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/abdul/.cache/node-gyp/20.11.1/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/abdul/.cache/node-gyp/20.11.1', gyp info spawn args '-Dnode_gyp_dir=/home/abdul/.nvm/versions/node/v20.11.1/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/abdul/.cache/node-gyp/20.11.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/abdul/Desktop/work/herb/platform/node_modules/lmdb-store', 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' ]

make: Entering directory '/home/abdul/Desktop/work/herb/platform/node_modules/lmdb-store/build' CXX(target) Release/obj.target/lmdb/src/node-lmdb.o CC(target) Release/obj.target/lmdb/dependencies/lmdb/libraries/liblmdb/midl.o CC(target) Release/obj.target/lmdb/dependencies/lmdb/libraries/liblmdb/chacha8.o CC(target) Release/obj.target/lmdb/dependencies/lz4/lib/lz4.o CXX(target) Release/obj.target/lmdb/src/env.o CXX(target) Release/obj.target/lmdb/src/compression.o CXX(target) Release/obj.target/lmdb/src/ordered-binary.o ../src/ordered-binary.cpp: In function ‘size_t valueToKey(const v8::Local&, uint8_t, size_t, bool, bool)’: ../src/ordered-binary.cpp:138:91: error: no matching function for call to ‘v8::Symbol::Description()’ 138 | Local string = Local::Cast(Local::Cast(jsKey)->Description()); | ~~~~~~~~~~~^~ In file included from /home/abdul/.cache/node-gyp/20.11.1/include/node/v8-object.h:11, from /home/abdul/.cache/node-gyp/20.11.1/include/node/v8-array-buffer.h:13, from /home/abdul/.cache/node-gyp/20.11.1/include/node/v8.h:24, from ../src/node-lmdb.h:29, from ../src/ordered-binary.cpp:1: /home/abdul/.cache/node-gyp/20.11.1/include/node/v8-primitive.h:597:16: note: candidate: ‘v8::Local v8::Symbol::Description(v8::Isolate) const’ 597 | Local Description(Isolate* isolate) const; | ^~~ /home/abdul/.cache/node-gyp/20.11.1/include/node/v8-primitive.h:597:16: note: candidate expects 1 argument, 0 provided make: *** [lmdb.target.mk:148: Release/obj.target/lmdb/src/ordered-binary.o] Error 1 make: Leaving directory '/home/abdul/Desktop/work/herb/platform/node_modules/lmdb-store/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess. (/home/abdul/.nvm/versions/node/v20.11.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23) gyp ERR! System Linux 6.5.0-21-generic gyp ERR! command "/home/abdul/.nvm/versions/node/v20.11.1/bin/node" "/home/abdul/.nvm/versions/node/v20.11.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/abdul/Desktop/work/herb/platform/node_modules/lmdb-store

It is working with node version 16.14.0 but giving error with node version 20.11.1 and 18.19.1 what could be the possible solution to this?

maghaffar commented 7 months ago

@kriszyp can you please tell me why is this happening?

kriszyp commented 7 months ago

Are you using a package name of lmdb or lmdb-store? You should be using lmdb (lmdb-store was the old, deprecated name).

maghaffar commented 7 months ago

@kriszyp There are both in my node modules Screenshot from 2024-02-28 18-02-30 And

maghaffar commented 7 months ago

@kriszyp I just don't know why this error is happening? I am not implementing lmdb or lmdb-store. It is being added in my node modules automatically Where I should change the name or what could be the possible solution to this? I am trying different solutions and spent already a lot of hours on this.

maghaffar commented 7 months ago

@kriszyp I uninstalled lmdb-store and installed latest version of lmdb. And it did the work. Error is gone. Thanks for helping me