Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

getting ‘nullptr’ was not declared in this scope when building on RHEL6 #889

Closed
drewfish opened this issue Apr 23, 2015 · 5 comments
Closed

Comments

@drewfish
Copy link

In my environment (admittedly a weird corporate environment) I'm getting a ‘nullptr’ was not declared in this scope error in src/binding.cpp:173 of [email protected].

I think this might be because of the -std=c++0x in...
https:/sass/node-sass/blob/v2.1.1/binding.gyp#L89
... which perhaps should be -std=c++11. (Interestingly, that is being used in the OS=="mac" condition.)

@saper
Copy link
Member

saper commented Apr 23, 2015

Which compiler type and version are you using?

@drewfish
Copy link
Author

$ g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

...also...

$ SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true SASS_FORCE_BUILD=true npm run-script postinstall                                                                                                                                                   
...
gyp info   g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' '-DDEBUG' '-D_DEBUG' -I/home/folta/.node-gyp/0.10.36/src -I/home/folta/.node-gyp/0.10.36/deps/uv/include -I/home/folta/.node-gyp/0.10.36/deps/v8/include -I../node_modules/nan  -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -g -O0 -fno-rtti -std=c++0x -fexceptions -frtti -MMD -MF ./Debug/.deps/Debug/obj.target/binding/src/binding.o.d.raw  -c -o Debug/obj.target/binding/src/binding.o ../src/binding.cpp
spawn args [ 'V=1', 'BUILDTYPE=Debug', '-C', 'build' ]
../src/binding.cpp: In function ‘void GetStats(sass_context_wrapper*, Sass_Context*)’:
../src/binding.cpp:173: error: ‘nullptr’ was not declared in this scope
make: *** [Debug/obj.target/binding/src/binding.o] Error 1
make: Leaving directory `/home/folta/tmp/y/node_modules/node-sass/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/folta/tmp/y/node_modules/node-sass/node_modules/pangyp/lib/build.js:271:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-431.23.3.el6.YAHOO.20140804.x86_64
gyp ERR! command "/home/y/libexec64/node" "/home/folta/tmp/y/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--verbose"
gyp ERR! cwd /home/folta/tmp/y/node_modules/node-sass
gyp ERR! node -v v0.10.36
gyp ERR! pangyp -v v2.1.0
gyp ERR! not ok 

@drewfish
Copy link
Author

Oh hehe.. I just tried the change I suggested and got cc1plus: error: unrecognized command line option "-std=c++11".

@saper
Copy link
Member

saper commented Apr 23, 2015

Well, anything older than gcc 4.6 is not supported by libsass, our C++ library. With node-sass 2.1.1 you might have some luck with gcc 4.5.

If you are feeling brave, you might want to try some of my patches to lower compiler requirement:

sass/libsass#996
sass/libsass#995

@drewfish
Copy link
Author

Got it, thanks. I tried adding a #define nullptr NULL and then got a bunch of errors in libsass as you said.

Closing this bug, since my situation isn't something you support.

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

No branches or pull requests

2 participants