node_buffer.cc:481: error: 'NO_HINTS' is not a member of 'v8::String'

163 views
Skip to first unread message

khinester

unread,
Sep 22, 2011, 10:33:38 PM9/22/11
to nodejs
Hello I have node running on my FreeBSD machine, but when i try to
upgrade either via the ports or from source, i get this error:

$ node -v
v0.2.6

# cd /usr/ports/www/node
# make install clean && rehash
===> Building for node-0.4.11
Waf: Entering directory `/usr/ports/www/node/work/node-v0.4.11/build'
DEST_OS: freebsd
DEST_CPU: x64
Parallel Jobs: 1
Product type: program
[53/74] cxx: src/node_buffer.cc -> build/default/src/node_buffer_3.o
c++ -O2 -pipe -fno-strict-aliasing -pthread -g -O3 -DHAVE_OPENSSL=1 -
DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -
DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -
DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="freebsd" -
D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -Idefault/src -
I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/
http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev
-Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/freebsd-
x64 -I../deps/c-ares/freebsd-x64 -I/usr/include -I/usr/local/
include ../src/node_buffer.cc -c -o default/src/node_buffer_3.o
../src/node_buffer.cc: In static member function 'static
v8::Handle<v8::Value> node::Buffer::Utf8Write(const v8::Arguments&)':
../src/node_buffer.cc:481: error: 'NO_HINTS' is not a member of
'v8::String'
Waf: Leaving directory `/usr/ports/www/node/work/node-v0.4.11/build'
Build failed: -> task failed (err #1):
{task: cxx node_buffer.cc -> node_buffer_3.o}
*** Error code 1

Stop in /usr/ports/www/node.

if i try to build it from the git repo:

$ cd ~/sandboxes/node
$ ./configure --prefix=$HOME
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
...

Checking for fdatasync(2) with c++ : no
'configure' finished successfully (0.993s)
$ make
Error expanding embedded variable.

any advice much appreciated.


Ben Noordhuis

unread,
Sep 22, 2011, 10:59:40 PM9/22/11
to nod...@googlegroups.com

You are building against a shared libv8 and it's too old.

> if i try to build it from the git repo:
>
> $ cd ~/sandboxes/node
> $ ./configure --prefix=$HOME
> Checking for program g++ or c++          : /usr/bin/g++
> Checking for program cpp                 : /usr/bin/cpp
> ...
>
> Checking for fdatasync(2) with c++                 : no
> 'configure' finished successfully (0.993s)
> $ make
> Error expanding embedded variable.

Use gmake here, not BSD make.

khinester

unread,
Sep 22, 2011, 11:45:57 PM9/22/11
to nodejs
hi, thanks for the reply,

On Sep 23, 4:59 am, Ben Noordhuis <i...@bnoordhuis.nl> wrote:
ok, i tried this, but got the following error:

g++ -o obj/release/extensions/externalize-string-extension.o -c -Wall -
W -Wno-unused-parameter -Wnon-virtual-dtor -m64 -O3 -fomit-frame-
pointer -fdata-sections -ffunction-sections -ansi -fno-rtti -fno-
exceptions -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -m64 -O3 -
fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -
DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/usr/local/
include -I/home/khine/sandboxes/node/deps/v8/src /home/khine/sandboxes/
node/deps/v8/src/extensions/externalize-string-extension.cc
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:55: error: 'uc16' was not declared in this scope
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:55: error: template argument 1 is invalid
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:56: error: invalid type in declaration before ';' token
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc: In member function 'virtual
v8::Handle<v8::FunctionTemplate>
v8::internal::ExternalizeStringExtension::GetNativeFunction(v8::Handle<v8::String>)':
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:66: error: 'strcmp' was not declared in this scope
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:69: error: 'ASSERT' was not declared in this scope
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc: In static member function 'static v8::Handle<v8::Value>
v8::internal::ExternalizeStringExtension::Externalize(const
v8::Arguments&)':
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:91: error: incomplete type 'v8::Utils' used in nested
name specifier
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:92: error: 'class v8::String' has no member named
'IsExternalString'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:96: error: 'class v8::String' has no member named
'IsAsciiRepresentation'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:97: error: 'class v8::String' has no member named
'length'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:98: error: 'WriteToFlat' is not a member of 'v8::String'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:98: error: 'class v8::String' has no member named
'length'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:100: error: 'class v8::String' has no member named
'length'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:102: error: 'class v8::String' has no member named
'IsSymbol'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:103: error: 'i' has not been declared
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:107: error: 'uc16' was not declared in this scope
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:107: error: 'data' was not declared in this scope
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:107: error: expected type-specifier before 'uc16'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:107: error: expected `;' before 'uc16'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:108: error: 'WriteToFlat' is not a member of 'v8::String'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:108: error: 'class v8::String' has no member named
'length'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:110: error: 'class v8::String' has no member named
'length'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:110: error: new initializer expression list treated as
compound expression
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:111: error: no matching function for call to
'v8::String::MakeExternal(v8::internal::SimpleTwoByteStringResource*&)'
/usr/local/include/v8.h:1218: note: candidates are: bool
v8::String::MakeExternal(v8::String::ExternalStringResource*)
/usr/local/include/v8.h:1240: note: bool
v8::String::MakeExternal(v8::String::ExternalAsciiStringResource*)
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:112: error: 'class v8::String' has no member named
'IsSymbol'
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:113: error: 'i' has not been declared
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc: In static member function 'static v8::Handle<v8::Value>
v8::internal::ExternalizeStringExtension::IsAscii(const
v8::Arguments&)':
/home/khine/sandboxes/node/deps/v8/src/extensions/externalize-string-
extension.cc:130: error: incomplete type 'v8::Utils' used in nested
name specifier
scons: *** [obj/release/extensions/externalize-string-extension.o]
Error 1
scons: building terminated because of errors.
Waf: Leaving directory `/home/khine/sandboxes/node/build'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
gmake: *** [program] Error 1

which goes back to the old libv8

then i followed this post (http://superuser.com/questions/262385/
getting-node-js-0-4-2-to-build-install-on-freebsd-8-2-amd64), but got
this traceback:

$ cd ~/sandboxes/node/deps/v8
$ scons os=freebsd arch=x64
...
g++ -o obj/release/extensions/externalize-string-extension.o -c -Wall -
W -Wno-unused-parameter -Wnon-virtual-dtor -m64 -O3 -fomit-frame-
pointer -fdata-sections -ffunction-sections -ansi -fno-rtti -fno-
exceptions -fvisibility=hidden -Wall -W -Wno-unused-parameter -Wnon-
virtual-dtor -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-
sections -ansi -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/usr/local/
include -Isrc src/extensions/externalize-string-extension.cc
src/extensions/externalize-string-extension.cc:55: error: 'uc16' was
not declared in this scope
src/extensions/externalize-string-extension.cc:55: error: template
argument 1 is invalid
src/extensions/externalize-string-extension.cc:56: error: invalid type
in declaration before ';' token
src/extensions/externalize-string-extension.cc: In member function
'virtual v8::Handle<v8::FunctionTemplate>
v8::internal::ExternalizeStringExtension::GetNativeFunction(v8::Handle<v8::String>)':
src/extensions/externalize-string-extension.cc:66: error: 'strcmp' was
not declared in this scope
src/extensions/externalize-string-extension.cc:69: error: 'ASSERT' was
not declared in this scope
src/extensions/externalize-string-extension.cc: In static member
function 'static v8::Handle<v8::Value>
v8::internal::ExternalizeStringExtension::Externalize(const
v8::Arguments&)':
src/extensions/externalize-string-extension.cc:91: error: incomplete
type 'v8::Utils' used in nested name specifier
src/extensions/externalize-string-extension.cc:92: error: 'class
v8::String' has no member named 'IsExternalString'
src/extensions/externalize-string-extension.cc:96: error: 'class
v8::String' has no member named 'IsAsciiRepresentation'
src/extensions/externalize-string-extension.cc:97: error: 'class
v8::String' has no member named 'length'
src/extensions/externalize-string-extension.cc:98: error:
'WriteToFlat' is not a member of 'v8::String'
src/extensions/externalize-string-extension.cc:98: error: 'class
v8::String' has no member named 'length'
src/extensions/externalize-string-extension.cc:100: error: 'class
v8::String' has no member named 'length'
src/extensions/externalize-string-extension.cc:102: error: 'class
v8::String' has no member named 'IsSymbol'
src/extensions/externalize-string-extension.cc:103: error: 'i' has not
been declared
src/extensions/externalize-string-extension.cc:107: error: 'uc16' was
not declared in this scope
src/extensions/externalize-string-extension.cc:107: error: 'data' was
not declared in this scope
src/extensions/externalize-string-extension.cc:107: error: expected
type-specifier before 'uc16'
src/extensions/externalize-string-extension.cc:107: error: expected
`;' before 'uc16'
src/extensions/externalize-string-extension.cc:108: error:
'WriteToFlat' is not a member of 'v8::String'
src/extensions/externalize-string-extension.cc:108: error: 'class
v8::String' has no member named 'length'
src/extensions/externalize-string-extension.cc:110: error: 'class
v8::String' has no member named 'length'
src/extensions/externalize-string-extension.cc:110: error: new
initializer expression list treated as compound expression
src/extensions/externalize-string-extension.cc:111: error: no matching
function for call to
'v8::String::MakeExternal(v8::internal::SimpleTwoByteStringResource*&)'
/usr/local/include/v8.h:1218: note: candidates are: bool
v8::String::MakeExternal(v8::String::ExternalStringResource*)
/usr/local/include/v8.h:1240: note: bool
v8::String::MakeExternal(v8::String::ExternalAsciiStringResource*)
src/extensions/externalize-string-extension.cc:112: error: 'class
v8::String' has no member named 'IsSymbol'
src/extensions/externalize-string-extension.cc:113: error: 'i' has not
been declared
src/extensions/externalize-string-extension.cc: In static member
function 'static v8::Handle<v8::Value>
v8::internal::ExternalizeStringExtension::IsAscii(const
v8::Arguments&)':
src/extensions/externalize-string-extension.cc:130: error: incomplete
type 'v8::Utils' used in nested name specifier
scons: *** [obj/release/extensions/externalize-string-extension.o]
Error 1
scons: building terminated because of errors.

Ben Noordhuis

unread,
Sep 23, 2011, 9:27:34 AM9/23/11
to nod...@googlegroups.com
On Fri, Sep 23, 2011 at 05:45, khinester <norman...@gmail.com> wrote:
> -I/usr/local/include -Isrc

You probably still have the shared (and outdated) libv8 headers
installed and they're being included instead of the headers from the
bundled libv8.

khinester

unread,
Sep 23, 2011, 10:15:24 AM9/23/11
to nodejs
thanks, i updated the ports on freebsd and this issue was fixed couple
of days ago.

On Sep 23, 3:27 pm, Ben Noordhuis <i...@bnoordhuis.nl> wrote:
Reply all
Reply to author
Forward
0 new messages