Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Compilation of 2.8.0 fails with node 18 due to lmdb-store #4260

Open
inglor opened this issue Jun 8, 2023 · 1 comment
Open

[BUG] Compilation of 2.8.0 fails with node 18 due to lmdb-store #4260

inglor opened this issue Jun 8, 2023 · 1 comment
Labels
bug Something isn't working NODE 18 ⚙

Comments

@inglor
Copy link

inglor commented Jun 8, 2023

Describe the bug

Compilation of 2.8.0 with node 18 fails due to lmdb-store. The error is described here in step 5 and seems like it's fixed in main branch but not on 2.8.0 tag.

main branch: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/packages/osd-optimizer/package.json
2.8.0 branch: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/2.8.0/packages/osd-optimizer/package.json

Maybe a bad backport merge since it was replaced with lmdb?

To Reproduce
Steps to reproduce the behavior:

  1. Verify you are using node 18+
  2. Checkout 2.8.0
  3. yarn osd bootstrap
[..]
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/build/opensearch-dashboards/src/OpenSearch-Dashboards/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
  CXX(target) Release/obj.target/lmdb/src/misc.o
  CXX(target) Release/obj.target/lmdb/src/txn.o
  CXX(target) Release/obj.target/lmdb/src/dbi.o
  CXX(target) Release/obj.target/lmdb/src/cursor.o
  CC(target) Release/obj.target/lmdb/dependencies/lmdb/libraries/liblmdb/mdb.o
../src/ordered-binary.cpp: In function ‘size_t valueToKey(const v8::Local<v8::Value>&, 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> string = Local<String>::Cast(Local<Symbol>::Cast(jsKey)->Description());
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /build/.cache/node-gyp/18.15.0/include/node/v8-object.h:11,
                 from /build/.cache/node-gyp/18.15.0/include/node/v8-array-buffer.h:13,
                 from /build/.cache/node-gyp/18.15.0/include/node/v8.h:24,
                 from ../src/node-lmdb.h:29,
                 from ../src/ordered-binary.cpp:1:
/build/.cache/node-gyp/18.15.0/include/node/v8-primitive.h:588:16: note: candidate: ‘v8::Local<v8::Value> v8::Symbol::Description(v8::Isolate*) const’
  588 |   Local<Value> Description(Isolate* isolate) const;
      |                ^~~~~~~~~~~
/build/.cache/node-gyp/18.15.0/include/node/v8-primitive.h:588:16: note:   candidate expects 1 argument, 0 provided
make: *** [lmdb.target.mk:146: Release/obj.target/lmdb/src/ordered-binary.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/build/opensearch-dashboards/src/OpenSearch-Dashboards/node_modules/lmdb-store/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/build/opensearch-dashboards/src/OpenSearch-Dashboards/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 6.3.6-zen1-1-zen
gyp ERR! command "/usr/bin/node" "/build/opensearch-dashboards/src/OpenSearch-Dashboards/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /build/opensearch-dashboards/src/OpenSearch-Dashboards/node_modules/lmdb-store
gyp ERR! node -v v18.15.0
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: /usr/lib/node_modules/yarn/bin/yarn.js install --non-interactive
          at makeError (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:25045:11)
          at handlePromise (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:23981:26)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
          at async installInDir (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:23704:3)
          at async Project.installDependencies (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:15168:5)
          at async Object.run (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:9188:11)
          at async runCommand (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:56360:5)
          at async Object.run (/build/opensearch-dashboards/src/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:278:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected behavior
Expected to build properly

OpenSearch Version
N/A

Dashboards Version
tag 2.8.0 from git repo.

Plugins
N/A

Screenshots
N/A

Additional context

@inglor inglor added bug Something isn't working untriaged labels Jun 8, 2023
@ananzh
Copy link
Member

ananzh commented Jun 8, 2023

Yeah seems in this backport PR, we have both lmdb-store here

and lmdb

ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Jun 8, 2023
Issue Resolve
opensearch-project#4260

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Jun 8, 2023
Issue Resolve
opensearch-project#4260

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit that referenced this issue Jun 9, 2023
Issue Resolve
#4260

Signed-off-by: ananzh <ananzh@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NODE 18 ⚙
Projects
None yet
Development

No branches or pull requests

3 participants