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

Build errors under Node 16.1.0 #190

Open
michaelfig opened this issue May 12, 2021 · 9 comments
Open

Build errors under Node 16.1.0 #190

michaelfig opened this issue May 12, 2021 · 9 comments

Comments

@michaelfig
Copy link

Refs Agoric/agoric-sdk#2977

This is apparently caused by older stdc++ compiler flags.

Please see uhop/node-re2#100 for another package that was plagued by this and found a fix.

  CXX(target) Release/obj.target/node-lmdb/src/node-lmdb.o
In file included from /home/warner/.cache/node-gyp/16.1.0/include/node/v8.h:30,
                 from ../src/node-lmdb.h:29,
                 from ../src/node-lmdb.cpp:24:
/home/warner/.cache/node-gyp/16.1.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/home/warner/.cache/node-gyp/16.1.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
  452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
      |                                      ^~~~~~~~~~~
      |                                      remove_cv
...
kriszyp added a commit to kriszyp/node-lmdb that referenced this issue May 12, 2021
@firdausious
Copy link

@kriszyp nice updates .. could you please make MR here, since you've already made a new commit on your forking repo?

kriszyp added a commit to kriszyp/node-lmdb that referenced this issue Jul 2, 2021
@kriszyp
Copy link
Collaborator

kriszyp commented Jul 2, 2021

I've actually still been trying to figure out the best compiler configuration across multiple projects, as the referencing fix caused a regression for at least one computer in the world: kriszyp/lmdb-js#46. I am hoping that the most reliable config is simply to not specify the C++ version at all (always just let it the compiler use latest). Just committed a fix that does, if you want to give that a try. Let me know if you want me to publish it first.

@michaelfig
Copy link
Author

I am hoping that the most reliable config is simply to not specify the C++ version at all (always just let it the compiler use latest). Just committed a fix that does, if you want to give that a try. Let me know if you want me to publish it first.

I've tested node-lmdb@Venemo/node-lmdb#b96ef731a6 against Node.js 16.8.0 under MacOS and Ubuntu, and it works just fine. Thanks!

Please publish a new version of node-lmdb, then I think it's safe to close this issue.

@kriszyp
Copy link
Collaborator

kriszyp commented Sep 2, 2021

Ok, I published v0.9.5 with the latest.

@michaelfig
Copy link
Author

Ok, I published v0.9.5 with the latest.

Wow, fast! It works perfectly for me. This bug is squashed!

@robert-zaremba
Copy link

I've been still experiencing this issue today. The solution was to prefix the commands which involve building dependencies with CXXFLAGS="--std=c++14", eg:

CXXFLAGS="--std=c++14" agoric install

@kriszyp
Copy link
Collaborator

kriszyp commented Nov 23, 2021

@robert-zaremba Pushed a fix to specify C++ version based on node version, if you want to try from master. Otherwise I will publish later.

@kriszyp kriszyp reopened this Nov 23, 2021
@kriszyp
Copy link
Collaborator

kriszyp commented Nov 23, 2021

@robert-zaremba I want to make sure I understand what is happening here before proceeding, as this change does have potential for causing regression for other users. How is that your system has C++, but ends up compiling the code with an older version? For all other users/machine, I believe the C++ is automatically compiled with the latest C++ version. Do you have another part of your build that is defaulting the C++ version to 11?

(or is it possible that you were attempting to install/build an older version of node-lmdb that was specifying an incorrect C++ version, and this has already been fixed, as apparently other users seem to have reported this as fixed).

@kriszyp
Copy link
Collaborator

kriszyp commented Nov 27, 2021

I have published v0.9.6 with a significantly expanded set of prebuilds, which should hopefully eliminate the need for compilation in this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants