Re: [v8-users] Build on Mac

2015-11-10 Thread Jakob Kummerow
Looks like your copy of include/v8.h is out of sync with the rest of V8 (as
in: it's a different version). Maybe it's installed as a system header and
somehow gets pulled in?

Also, using "sudo" for random shell commands is a bad idea.

On Tue, Nov 10, 2015 at 6:15 AM, Vitor  wrote:

> I was searching for a theme for my final paper in college, and found V8.
> Got very interested in the concept. I do not know very much about C++, and
> i am trying to build it just to see how it works, but it keep giving me
> some erros. I guess someone already got this problem, but i could not find
> an answer for this.
> I am using a Mac, on branch master, already sync gclient. Running "make
> native"  returns the following
>
> suki:v8 vito$ sudo make native
> PYTHONPATH="/Users/vito/v8/tools/generate_shim_headers:/Users/vito/v8/build::/Users/vito/v8/build/gyp/pylib:"
> \
> GYP_GENERATORS=make \
> build/gyp/gyp --generator-output="out" build/all.gyp \
>  -Ibuild/standalone.gypi --depth=. -S.native
>  -Dv8_enable_backtrace=1 -Darm_fpu=default -Darm_float_abi=default
>   CXX(target) /Users/vito/v8/out/native/obj.target/v8_base/src/accessors.o
> In file included from ../src/accessors.cc:7:
> In file included from .././src/api.h:9:
> In file included from .././src/contexts.h:8:
> In file included from .././src/heap/heap.h:18:
> In file included from .././src/heap/mark-compact.h:9:
> In file included from .././src/heap/spaces.h:16:
> .././src/objects.h:780:1: error: static_assert failed "JS_OBJECT_TYPE ==
> Internals::kJSObjectType"
> STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType);
> ^ ~~
> .././src/base/macros.h:284:29: note: expanded from macro 'STATIC_ASSERT'
> #define STATIC_ASSERT(test) static_assert(test, #test)
> ^
> In file included from ../src/accessors.cc:7:
> In file included from .././src/api.h:9:
> In file included from .././src/contexts.h:8:
> In file included from .././src/heap/heap.h:18:
> In file included from .././src/heap/mark-compact.h:9:
> In file included from .././src/heap/spaces.h:16:
> .././src/objects.h:9303:3: error: static_assert failed "kKindOffset ==
> Internals::kOddballKindOffset"
>   STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset);
>   ^ 
> .././src/base/macros.h:284:29: note: expanded from macro 'STATIC_ASSERT'
> #define STATIC_ASSERT(test) static_assert(test, #test)
> ^
> In file included from ../src/accessors.cc:7:
> In file included from .././src/api.h:9:
> In file included from .././src/contexts.h:8:
> .././src/heap/heap.h:1481:43: error: no type named 'GCCallback' in
> 'v8::Isolate'
>   void AddGCPrologueCallback(v8::Isolate::GCCallback callback,
>  ~^
> .././src/heap/heap.h:1483:46: error: no type named 'GCCallback' in
> 'v8::Isolate'
>   void RemoveGCPrologueCallback(v8::Isolate::GCCallback callback);
> ~^
> .././src/heap/heap.h:1485:43: error: no type named 'GCCallback' in
> 'v8::Isolate'
>   void AddGCEpilogueCallback(v8::Isolate::GCCallback callback,
>  ~^
> .././src/heap/heap.h:1487:46: error: no type named 'GCCallback' in
> 'v8::Isolate'
>   void RemoveGCEpilogueCallback(v8::Isolate::GCCallback callback);
> ~^
> .././src/heap/heap.h:1603:33: error: no type named 'GCCallback' in
> 'v8::Isolate'
> GCCallbackPair(v8::Isolate::GCCallback callback, GCType gc_type,
>~^
> .././src/heap/heap.h:1611:18: error: no type named 'GCCallback' in
> 'v8::Isolate'
> v8::Isolate::GCCallback callback;
> ~^
> In file included from ../src/accessors.cc:7:
> In file included from .././src/api.h:9:
> .././src/contexts.h:553:3: error: static_assert failed
> "EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex"
>   STATIC_ASSERT(EMBEDDER_DATA_INDEX ==
> Internals::kContextEmbedderDataIndex);
>   ^ ~~~
> .././src/base/macros.h:284:29: note: expanded from macro 'STATIC_ASSERT'
> #define STATIC_ASSERT(test) static_assert(test, #test)
> ^
> In file included from ../src/accessors.cc:7:
> In file included from .././src/api.h:10:
> In file included from .././src/factory.h:8:
> In file included from .././src/isolate.h:16:
> .././src/cancelable-task.h:53:54: error: expected class name
> class CancelableIdleTask : public Cancelable, public IdleTask {
>  ^
> .././src/cancelable-task.h:58:40: error: only virtual member functions can
> be marked 'final'
>   void Run(double deadline_in_seconds) final {
>^~
> In file included from ../src/accessors.cc:7:
> In file included from 

[v8-users] Build on Mac

2015-11-09 Thread Vitor
I was searching for a theme for my final paper in college, and found V8.
Got very interested in the concept. I do not know very much about C++, and
i am trying to build it just to see how it works, but it keep giving me
some erros. I guess someone already got this problem, but i could not find
an answer for this.
I am using a Mac, on branch master, already sync gclient. Running "make
native"  returns the following

suki:v8 vito$ sudo make native
PYTHONPATH="/Users/vito/v8/tools/generate_shim_headers:/Users/vito/v8/build::/Users/vito/v8/build/gyp/pylib:"
 
\
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
 -Ibuild/standalone.gypi --depth=. -S.native 
 -Dv8_enable_backtrace=1 -Darm_fpu=default -Darm_float_abi=default
  CXX(target) /Users/vito/v8/out/native/obj.target/v8_base/src/accessors.o
In file included from ../src/accessors.cc:7:
In file included from .././src/api.h:9:
In file included from .././src/contexts.h:8:
In file included from .././src/heap/heap.h:18:
In file included from .././src/heap/mark-compact.h:9:
In file included from .././src/heap/spaces.h:16:
.././src/objects.h:780:1: error: static_assert failed "JS_OBJECT_TYPE == 
Internals::kJSObjectType"
STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType);
^ ~~
.././src/base/macros.h:284:29: note: expanded from macro 'STATIC_ASSERT'
#define STATIC_ASSERT(test) static_assert(test, #test)
^
In file included from ../src/accessors.cc:7:
In file included from .././src/api.h:9:
In file included from .././src/contexts.h:8:
In file included from .././src/heap/heap.h:18:
In file included from .././src/heap/mark-compact.h:9:
In file included from .././src/heap/spaces.h:16:
.././src/objects.h:9303:3: error: static_assert failed "kKindOffset == 
Internals::kOddballKindOffset"
  STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset);
  ^ 
.././src/base/macros.h:284:29: note: expanded from macro 'STATIC_ASSERT'
#define STATIC_ASSERT(test) static_assert(test, #test)
^
In file included from ../src/accessors.cc:7:
In file included from .././src/api.h:9:
In file included from .././src/contexts.h:8:
.././src/heap/heap.h:1481:43: error: no type named 'GCCallback' in 
'v8::Isolate'
  void AddGCPrologueCallback(v8::Isolate::GCCallback callback,
 ~^
.././src/heap/heap.h:1483:46: error: no type named 'GCCallback' in 
'v8::Isolate'
  void RemoveGCPrologueCallback(v8::Isolate::GCCallback callback);
~^
.././src/heap/heap.h:1485:43: error: no type named 'GCCallback' in 
'v8::Isolate'
  void AddGCEpilogueCallback(v8::Isolate::GCCallback callback,
 ~^
.././src/heap/heap.h:1487:46: error: no type named 'GCCallback' in 
'v8::Isolate'
  void RemoveGCEpilogueCallback(v8::Isolate::GCCallback callback);
~^
.././src/heap/heap.h:1603:33: error: no type named 'GCCallback' in 
'v8::Isolate'
GCCallbackPair(v8::Isolate::GCCallback callback, GCType gc_type,
   ~^
.././src/heap/heap.h:1611:18: error: no type named 'GCCallback' in 
'v8::Isolate'
v8::Isolate::GCCallback callback;
~^
In file included from ../src/accessors.cc:7:
In file included from .././src/api.h:9:
.././src/contexts.h:553:3: error: static_assert failed "EMBEDDER_DATA_INDEX 
== Internals::kContextEmbedderDataIndex"
  STATIC_ASSERT(EMBEDDER_DATA_INDEX == 
Internals::kContextEmbedderDataIndex);
  ^ ~~~
.././src/base/macros.h:284:29: note: expanded from macro 'STATIC_ASSERT'
#define STATIC_ASSERT(test) static_assert(test, #test)
^
In file included from ../src/accessors.cc:7:
In file included from .././src/api.h:10:
In file included from .././src/factory.h:8:
In file included from .././src/isolate.h:16:
.././src/cancelable-task.h:53:54: error: expected class name
class CancelableIdleTask : public Cancelable, public IdleTask {
 ^
.././src/cancelable-task.h:58:40: error: only virtual member functions can 
be marked 'final'
  void Run(double deadline_in_seconds) final {
   ^~
In file included from ../src/accessors.cc:7:
In file included from .././src/api.h:10:
In file included from .././src/factory.h:8:
.././src/isolate.h:659:20: error: no type named 
'AbortOnUncaughtExceptionCallback' in 'v8::Isolate'
  v8::Isolate::AbortOnUncaughtExceptionCallback callback);
  ~^
.././src/isolate.h:1331:16: error: no type named 
'AbortOnUncaughtExceptionCallback' in 'v8::Isolate'
  v8::Isolate::AbortOnUncaughtExceptionCallback
  ~^
13 errors generated.
make[1]: ***