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

node-gyp/16.0.0/include/node/v8-internal.h:452:50: error: template argument 2 is invalid “!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data); ” #2387

Closed
dilyanpalauzov opened this issue May 3, 2021 · 1 comment

Comments

@dilyanpalauzov
Copy link

I have nodejs 16.0 and g++ 11.0.1 20210324. When I try to initialize with the package manager bootstrap, it tries to compile node-sass by using node-gyp. Compiling fails with:

  ln -f "Release/obj.target/src/sass.a" "Release/sass.a" 2>/dev/null || (rm -rf "Release/sass.a" && cp -af "Release/obj.target/src/sass.a" "Release/sass.a")  
  g++ -o Release/obj.target/binding/src/binding.o ../src/binding.cpp '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64'
 '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/home/d/.cache/node-gyp/16.0.0/include/node -I/home/d/.cache/node-gyp/16.0.0/src -I/home/d/.cache/node-gyp/16.0.0/deps/openssl/config -I/home/d/.cache/node-gyp/16.0.0/deps/openssl/openssl/include -I/home/d/.cache/node-gyp/16.0.0/deps/uv/include -I/home/d/.cache/node-gyp/16.0.0/deps/zlib -I/home/d/.cache/node-gyp/16.0.0/deps/v8/include -I../../nan -I../src/libsass/include
  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw   -c                                                                                                        
In file included from /home/d/.cache/node-gyp/16.0.0/include/node/v8.h:30,                                                                                    
                 from /home/d/.cache/node-gyp/16.0.0/include/node/node.h:63,                                                                                  
                 from ../../nan/nan.h:56,                                                                                                                     
                 from ../src/binding.cpp:1:                                                                                                                   
/home/d/.cache/node-gyp/16.0.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:                                             
/home/d/.cache/node-gyp/16.0.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                                                                                                        
/home/d/.cache/node-gyp/16.0.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                                                                                                        
/home/d/.cache/node-gyp/16.0.0/include/node/v8-internal.h:452:50: error: template argument 2 is invalid                                                       
  452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                          
      |                                                  ^                                                                                                    
/home/d/.cache/node-gyp/16.0.0/include/node/v8-internal.h:452:63: error: ‘::Perform’ has not been declared                                                    
  452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                          
      |                                                               ^~~~~~~                                                                                 

Platform: Linux.

@richardlau
Copy link
Member

This is a node-sass issue. remove_cv_t is a C++14 feature but node-sass specifies C++11: https://github.com/sass/node-sass/blob/4115e9de35a26a6c27604e22c9c1981bf19b0f5f/binding.gyp#L31.

See also nodejs/node#38367 and sass/node-sass#3091

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

No branches or pull requests

2 participants