Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Fail to compile platform_darwin.cc in Mac OS X (with solution) #813

Closed
lxcid opened this issue Mar 19, 2011 · 2 comments
Closed

Fail to compile platform_darwin.cc in Mac OS X (with solution) #813

lxcid opened this issue Mar 19, 2011 · 2 comments

Comments

@lxcid
Copy link

lxcid commented Mar 19, 2011

While compiling from the master branch on Mac OS X 10.6.6, my compiler (using XCode 3.2.5) failed at the following block.

[73/75] cxx: src/platform_darwin.cc -> build/default/src/platform_darwin_4.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -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="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/v8/include -I../deps/v8/include -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -Ideps/v8/include ../src/platform_darwin.cc -c -o default/src/platform_darwin_4.o
../src/platform_darwin.cc:216: error: expected constructor, destructor, or type conversion before ‘<’ token
Waf: Leaving directory `/Users/khinboon/Documents/Projects/node/build'
Build failed: -> task failed (err #1):
{task: cxx platform_darwin.cc -> platform_darwin_4.o}
make: *** [install] Error 1

This is generally a namespace problem. I could not figure out why the line using namespace v8; above is not working but if you are looking for a fix, try my following solution.

At this line of code (tentatively at line 213):

Handle<Value> Platform::GetInterfaceAddresses() {

add a v8:: in front of Handle like this:

v8::Handle<Value> Platform::GetInterfaceAddresses() {

and you should be able to compile. :)

@bkw
Copy link

bkw commented Mar 20, 2011

dupe of #801 and #805

@ry
Copy link

ry commented Mar 22, 2011

fixed in 7bff702

@ry ry closed this as completed Mar 22, 2011
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

3 participants