Giter Site home page Giter Site logo

Compiling on OS X about v8js HOT 22 CLOSED

phpv8 avatar phpv8 commented on August 25, 2024
Compiling on OS X

from v8js.

Comments (22)

andrewtch avatar andrewtch commented on August 25, 2024

You should make PR with mac-os related README then.

from v8js.

camspiers avatar camspiers commented on August 25, 2024

I need some direction on what the rpath flags are for and if they are needed, and if they are needed how can we get around the issue.

from v8js.

stesie avatar stesie commented on August 25, 2024

@camspiers the -rpath linker option just "hard codes" the library path of libv8 into the v8js shared object file.

This is useful if you have an older libv8 version installed to /usr/lib and put a recent libv8 version below /usr/local/bla/v8 ... by default the v8js.so file would simply depend on "libv8.so" and the system's library loader would pick the one from /usr/lib in turn. The -rpath makes sure that the one at /usr/local/bla/v8 is picked (as needed)

from v8js.

evandrix avatar evandrix commented on August 25, 2024

@camspiers: What OSX version are you working on? I'm on the latest OSX 10.10.1. Following your build instructions doesn't work for me.

Prior to configuring v8js v0.1.5, I did a brew install v8, which installed v8 v3.25.30 to /usr/local/Cellar/v8/3.25.30.

Then, in /v8js root,
./configure --with-v8js=/usr/local/Cellar/v8/3.25.30 CXXFLAGS="-D_GLIBCXX_USE_NANOSLEEP"

Attached is the make failure output generated:

/bin/sh $HOME/v8js-0.1.5/libtool --mode=compile g++ -std=c++11 -I. -I$HOME/v8js-0.1.5 -DPHP_ATOM_INC -I$HOME/v8js-0.1.5/include -I$HOME/v8js-0.1.5/main -I$HOME/v8js-0.1.5 -I/opt/local/include/php56/php -I/opt/local/include/php56/php/main -I/opt/local/include/php56/php/TSRM -I/opt/local/include/php56/php/Zend -I/opt/local/include/php56/php/ext -I/opt/local/include/php56/php/ext/date/lib -I/opt/local/include -I/usr/local/Cellar/v8/3.25.30/include  -DHAVE_CONFIG_H  -D_GLIBCXX_USE_NANOSLEEP   -c $HOME/v8js-0.1.5/v8js.cc -o v8js.lo 
 g++ -std=c++11 -I. -I$HOME/v8js-0.1.5 -DPHP_ATOM_INC -I$HOME/v8js-0.1.5/include -I$HOME/v8js-0.1.5/main -I$HOME/v8js-0.1.5 -I/opt/local/include/php56/php -I/opt/local/include/php56/php/main -I/opt/local/include/php56/php/TSRM -I/opt/local/include/php56/php/Zend -I/opt/local/include/php56/php/ext -I/opt/local/include/php56/php/ext/date/lib -I/opt/local/include -I/usr/local/Cellar/v8/3.25.30/include -DHAVE_CONFIG_H -D_GLIBCXX_USE_NANOSLEEP -c $HOME/v8js-0.1.5/v8js.cc  -fno-common -DPIC -o .libs/v8js.o
In file included from /opt/local/include/php56/php/main/php_ini.h:24:0,
                 from /opt/local/include/php56/php/main/fopen_wrappers.h:26,
                 from /opt/local/include/php56/php/main/php.h:400,
                 from $HOME/v8js-0.1.5/php_v8js_macros.h:20,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/opt/local/include/php56/php/Zend/zend_ini.h:115:97: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define ZEND_INI_END()  { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, NULL } };
                                                                                                 ^
$HOME/v8js-0.1.5/v8js.cc:74:1: note: in expansion of macro 'ZEND_INI_END'
 ZEND_INI_END()
 ^
/opt/local/include/php56/php/Zend/zend_ini.h:115:97: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define ZEND_INI_END()  { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, NULL } };
                                                                                                 ^
$HOME/v8js-0.1.5/v8js.cc:74:1: note: in expansion of macro 'ZEND_INI_END'
 ZEND_INI_END()
 ^
/opt/local/include/php56/php/Zend/zend_ini.h:115:97: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define ZEND_INI_END()  { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, NULL } };
                                                                                                 ^
$HOME/v8js-0.1.5/v8js.cc:74:1: note: in expansion of macro 'ZEND_INI_END'
 ZEND_INI_END()
 ^
$HOME/v8js-0.1.5/v8js.cc: In function 'zval* php_v8js_v8_read_property(zval*, zval*, int, const zend_literal*)':
$HOME/v8js-0.1.5/v8js.cc:128:49: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (Z_TYPE_P(member) == IS_STRING && obj->v8obj->IsObject() && !obj->v8obj->IsFunction())
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:128:76: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (Z_TYPE_P(member) == IS_STRING && obj->v8obj->IsObject() && !obj->v8obj->IsFunction())
                                                                            ^
$HOME/v8js-0.1.5/v8js.cc:130:43: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
   v8::Local<v8::Object> jsObj = obj->v8obj->ToObject();
                                           ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:41:26: error: 'New' is not a member of 'v8::String'
 #define V8JS_STRL(v, l)  v8::String::New(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:131:33: note: in expansion of macro 'V8JS_STRL'
   v8::Local<v8::String> jsKey = V8JS_STRL(Z_STRVAL_P(member), Z_STRLEN_P(member));
                                 ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_v8_write_property(zval*, zval*, zval*, const zend_literal*)':
$HOME/v8js-0.1.5/v8js.cc:161:16: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (obj->v8obj->IsObject() && !obj->v8obj->IsFunction()) {
                ^
$HOME/v8js-0.1.5/v8js.cc:161:43: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (obj->v8obj->IsObject() && !obj->v8obj->IsFunction()) {
                                           ^
$HOME/v8js-0.1.5/v8js.cc:162:13: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
   obj->v8obj->ToObject()->ForceSet(V8JS_SYML(Z_STRVAL_P(member), Z_STRLEN_P(member)), zval_to_v8js(value, obj->isolate TSRMLS_CC));
             ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:162:36: note: in expansion of macro 'V8JS_SYML'
   obj->v8obj->ToObject()->ForceSet(V8JS_SYML(Z_STRVAL_P(member), Z_STRLEN_P(member)), zval_to_v8js(value, obj->isolate TSRMLS_CC));
                                    ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_v8_unset_property(zval*, zval*, const zend_literal*)':
$HOME/v8js-0.1.5/v8js.cc:171:16: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (obj->v8obj->IsObject() && !obj->v8obj->IsFunction()) {
                ^
$HOME/v8js-0.1.5/v8js.cc:171:43: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (obj->v8obj->IsObject() && !obj->v8obj->IsFunction()) {
                                           ^
$HOME/v8js-0.1.5/v8js.cc:172:13: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
   obj->v8obj->ToObject()->ForceDelete(V8JS_SYML(Z_STRVAL_P(member), Z_STRLEN_P(member)));
             ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:172:39: note: in expansion of macro 'V8JS_SYML'
   obj->v8obj->ToObject()->ForceDelete(V8JS_SYML(Z_STRVAL_P(member), Z_STRLEN_P(member)));
                                       ^
$HOME/v8js-0.1.5/v8js.cc: In function 'HashTable* php_v8js_v8_get_properties(zval*)':
$HOME/v8js-0.1.5/v8js.cc:231:92: error: could not convert 'obj->php_v8js_object::v8obj' from 'v8::Persistent<v8::Value>' to 'v8::Handle<v8::Value>'
  if (php_v8js_v8_get_properties_hash(obj->v8obj, retval, obj->flags, obj->isolate TSRMLS_CC) == SUCCESS) {
                                                                                            ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/v8js.cc: In function 'zend_function* php_v8js_v8_get_method(zval**, char*, int, const zend_literal*)':
$HOME/v8js-0.1.5/php_v8js_macros.h:41:26: error: 'New' is not a member of 'v8::String'
 #define V8JS_STRL(v, l)  v8::String::New(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:249:32: note: in expansion of macro 'V8JS_STRL'
  v8::Local<v8::String> jsKey = V8JS_STRL(method, method_len);
                                ^
$HOME/v8js-0.1.5/v8js.cc:252:41: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (!obj->v8obj.IsEmpty() && obj->v8obj->IsObject() && !obj->v8obj->IsFunction()) {
                                         ^
$HOME/v8js-0.1.5/v8js.cc:252:68: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (!obj->v8obj.IsEmpty() && obj->v8obj->IsObject() && !obj->v8obj->IsFunction()) {
                                                                    ^
$HOME/v8js-0.1.5/v8js.cc:253:43: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
   v8::Local<v8::Object> jsObj = obj->v8obj->ToObject();
                                           ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/v8js.cc: In function 'int php_v8js_v8_call_method(const char*, int, zval*, zval**, zval*, int)':
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:289:38: note: in expansion of macro 'V8JS_SYML'
  v8::Local<v8::String> method_name = V8JS_SYML(method, strlen(method));
                                      ^
$HOME/v8js-0.1.5/v8js.cc:290:42: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  v8::Local<v8::Object> v8obj = obj->v8obj->ToObject();
                                          ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:38:23: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYM(v)   v8::String::NewSymbol(v, sizeof(v) - 1)
                       ^
$HOME/v8js-0.1.5/v8js.cc:293:26: note: in expansion of macro 'V8JS_SYM'
  if (method_name->Equals(V8JS_SYM(V8JS_V8_INVOKE_FUNC_NAME))) {
                          ^
$HOME/v8js-0.1.5/v8js.cc:303:87: error: no matching function for call to 'v8::Local<v8::Value>::New(v8::Handle<v8::Value>)'
   jsArgv[i] = v8::Local<v8::Value>::New(zval_to_v8js(*argv[i], obj->isolate TSRMLS_CC));
                                                                                       ^
$HOME/v8js-0.1.5/v8js.cc:303:87: note: candidates are:
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:394:29: note: static v8::Local<T> v8::Local<T>::New(v8::Isolate*, v8::Handle<T>) [with T = v8::Value]
   V8_INLINE static Local<T> New(Isolate* isolate, Handle<T> that);
                             ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:394:29: note:   candidate expects 2 arguments, 1 provided
/usr/local/Cellar/v8/3.25.30/include/v8.h:395:29: note: static v8::Local<T> v8::Local<T>::New(v8::Isolate*, const v8::PersistentBase<T>&) [with T = v8::Value]
   V8_INLINE static Local<T> New(Isolate* isolate,
                             ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:395:29: note:   candidate expects 2 arguments, 1 provided
/usr/local/Cellar/v8/3.25.30/include/v8.h:421:29: note: static v8::Local<T> v8::Local<T>::New(v8::Isolate*, T*) [with T = v8::Value]
   V8_INLINE static Local<T> New(Isolate* isolate, T* that);
                             ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:421:29: note:   candidate expects 2 arguments, 1 provided
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:50:23: error: 'GetCurrent' is not a member of 'v8::Context'
 #define V8JS_GLOBAL   v8::Context::GetCurrent()->Global()
                       ^
$HOME/v8js-0.1.5/v8js.cc:306:23: note: in expansion of macro 'V8JS_GLOBAL'
  js_retval = cb->Call(V8JS_GLOBAL, argc, jsArgv);
                       ^
$HOME/v8js-0.1.5/v8js.cc: In function 'int php_v8js_v8_get_closure(zval*, zend_class_entry**, zend_function**, zval**)':
$HOME/v8js-0.1.5/v8js.cc:328:17: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Value>'
  if (!obj->v8obj->IsFunction()) {
                 ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_v8_free_storage(void*, zend_object_handle)':
$HOME/v8js-0.1.5/v8js.cc:355:12: error: 'class v8::Persistent<v8::Value>' has no member named 'Dispose'
   c->v8obj.Dispose();
            ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_create_v8(zval*, v8::Handle<v8::Value>, int, v8::Isolate*)':
$HOME/v8js-0.1.5/v8js.cc:386:58: error: no matching function for call to 'v8::Persistent<v8::Value>::New(v8::Isolate*&, v8::Handle<v8::Value>&)'
  c->v8obj = v8::Persistent<v8::Value>::New(isolate, value);
                                                          ^
$HOME/v8js-0.1.5/v8js.cc:386:58: note: candidate is:
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:5757:4: note: static T* v8::PersistentBase<T>::New(v8::Isolate*, T*) [with T = v8::Value]
 T* PersistentBase<T>::New(Isolate* isolate, T* that) {
    ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5757:4: note:   no known conversion for argument 2 from 'v8::Handle<v8::Value>' to 'v8::Value*'
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_free_storage(void*)':
$HOME/v8js-0.1.5/v8js.cc:406:17: error: 'class v8::Persistent<v8::String>' has no member named 'Dispose'
  c->object_name.Dispose();
                 ^
$HOME/v8js-0.1.5/v8js.cc:410:14: error: 'class v8::Persistent<v8::Context>' has no member named 'Dispose'
   c->context.Dispose();
              ^
$HOME/v8js-0.1.5/v8js.cc:411:14: error: 'class v8::Persistent<v8::Context>' has no member named 'Clear'
   c->context.Clear();
              ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void zim_V8Js___construct(int, zval*, zval**, zval*, int)':
$HOME/v8js-0.1.5/v8js.cc:584:103: error: no matching function for call to 'v8::FunctionTemplate::New()'
  c->global_template = v8::Persistent<v8::FunctionTemplate>::New(c->isolate, v8::FunctionTemplate::New());
                                                                                                       ^
$HOME/v8js-0.1.5/v8js.cc:584:103: note: candidate is:
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:3519:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:3519:34: note:   candidate expects 5 arguments, 0 provided
$HOME/v8js-0.1.5/v8js.cc:585:20: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::FunctionTemplate>'
  c->global_template->SetClassName(V8JS_SYM("V8Js"));
                    ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:38:23: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYM(v)   v8::String::NewSymbol(v, sizeof(v) - 1)
                       ^
$HOME/v8js-0.1.5/v8js.cc:585:35: note: in expansion of macro 'V8JS_SYM'
  c->global_template->SetClassName(V8JS_SYM("V8Js"));
                                   ^
$HOME/v8js-0.1.5/v8js.cc:588:46: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::FunctionTemplate>'
  php_v8js_register_methods(c->global_template->InstanceTemplate(), c);
                                              ^
$HOME/v8js-0.1.5/v8js.cc:591:124: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::FunctionTemplate>'
  c->context = v8::Persistent<v8::Context>::New(c->isolate, v8::Context::New(c->isolate, &extension_conf, c->global_template->InstanceTemplate()));
                                                                                                                            ^
$HOME/v8js-0.1.5/v8js.cc:592:12: error: base operand of '->' has non-pointer type 'v8::Persistent<v8::Context>'
  c->context->SetAlignedPointerInEmbedderData(1, c);
            ^
$HOME/v8js-0.1.5/v8js.cc:606:45: error: no matching function for call to 'v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)'
  v8::Context::Scope context_scope(c->context);
                                             ^
$HOME/v8js-0.1.5/v8js.cc:606:45: note: candidates are:
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note: v8::Context::Scope::Scope(v8::Handle<v8::Context>)
     explicit V8_INLINE Scope(Handle<Context> context) : context_(context) {
                        ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'v8::Handle<v8::Context>'
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note: constexpr v8::Context::Scope::Scope(const v8::Context::Scope&)
   class Scope {
         ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'const v8::Context::Scope&'
$HOME/v8js-0.1.5/v8js.cc:609:72: error: no matching function for call to 'v8::FunctionTemplate::New()'
  v8::Local<v8::FunctionTemplate> php_obj_t = v8::FunctionTemplate::New();
                                                                        ^
$HOME/v8js-0.1.5/v8js.cc:609:72: note: candidate is:
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:3519:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:3519:34: note:   candidate expects 5 arguments, 0 provided
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:617:26: note: in expansion of macro 'V8JS_SYML'
  php_obj_t->SetClassName(V8JS_SYML(class_name, class_name_len));
                          ^
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:629:83: note: in expansion of macro 'V8JS_SYML'
  c->object_name = v8::Persistent<v8::String>::New(c->isolate, (object_name_len) ? V8JS_SYML(object_name, object_name_len) : V8JS_SYM("PHP"));
                                                                                   ^
$HOME/v8js-0.1.5/php_v8js_macros.h:38:23: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYM(v)   v8::String::NewSymbol(v, sizeof(v) - 1)
                       ^
$HOME/v8js-0.1.5/v8js.cc:629:125: note: in expansion of macro 'V8JS_SYM'
  c->object_name = v8::Persistent<v8::String>::New(c->isolate, (object_name_len) ? V8JS_SYML(object_name, object_name_len) : V8JS_SYM("PHP"));
                                                                                                                             ^
$HOME/v8js-0.1.5/php_v8js_macros.h:50:23: error: 'GetCurrent' is not a member of 'v8::Context'
 #define V8JS_GLOBAL   v8::Context::GetCurrent()->Global()
                       ^
$HOME/v8js-0.1.5/v8js.cc:632:2: note: in expansion of macro 'V8JS_GLOBAL'
  V8JS_GLOBAL->Set(c->object_name, php_obj_t->InstanceTemplate()->NewInstance(), v8::ReadOnly);
  ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_timer_thread()':
$HOME/v8js-0.1.5/v8js.cc:698:14: error: no matching function for call to 'v8::Locker::Locker()'
   v8::Locker locker;
              ^
$HOME/v8js-0.1.5/v8js.cc:698:14: note: candidates are:
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:5459:3: note: v8::Locker::Locker(const v8::Locker&)
   Locker(const Locker&);
   ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5459:3: note:   candidate expects 1 argument, 0 provided
/usr/local/Cellar/v8/3.25.30/include/v8.h:5434:22: note: v8::Locker::Locker(v8::Isolate*)
   V8_INLINE explicit Locker(Isolate* isolate) { Initialize(isolate); }
                      ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5434:22: note:   candidate expects 1 argument, 0 provided
$HOME/v8js-0.1.5/v8js.cc: In function 'void zim_V8Js_executeString(int, zval*, zval**, zval*, int)':
$HOME/v8js-0.1.5/v8js.cc:647:49: error: no matching function for call to 'v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)'
  v8::Context::Scope context_scope((ctx)->context);
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:746:2: note: in expansion of macro 'V8JS_BEGIN_CTX'
  V8JS_BEGIN_CTX(c, getThis())
  ^
$HOME/v8js-0.1.5/v8js.cc:647:49: note: candidates are:
  v8::Context::Scope context_scope((ctx)->context);
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:746:2: note: in expansion of macro 'V8JS_BEGIN_CTX'
  V8JS_BEGIN_CTX(c, getThis())
  ^
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note: v8::Context::Scope::Scope(v8::Handle<v8::Context>)
     explicit V8_INLINE Scope(Handle<Context> context) : context_(context) {
                        ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'v8::Handle<v8::Context>'
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note: constexpr v8::Context::Scope::Scope(const v8::Context::Scope&)
   class Scope {
         ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'const v8::Context::Scope&'
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:759:49: note: in expansion of macro 'V8JS_SYML'
  v8::Local<v8::String> sname = identifier_len ? V8JS_SYML(identifier, identifier_len) : V8JS_SYM("V8Js::executeString()");
                                                 ^
$HOME/v8js-0.1.5/php_v8js_macros.h:38:23: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYM(v)   v8::String::NewSymbol(v, sizeof(v) - 1)
                       ^
$HOME/v8js-0.1.5/v8js.cc:759:89: note: in expansion of macro 'V8JS_SYM'
  v8::Local<v8::String> sname = identifier_len ? V8JS_SYML(identifier, identifier_len) : V8JS_SYM("V8Js::executeString()");
                                                                                         ^
$HOME/v8js-0.1.5/v8js.cc:762:33: error: 'New' is not a member of 'v8::String'
  v8::Local<v8::String> source = v8::String::New(str, str_len);
                                 ^
$HOME/v8js-0.1.5/v8js.cc:763:33: error: 'New' is not a member of 'v8::Script'
  v8::Local<v8::Script> script = v8::Script::New(source, sname);
                                 ^
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:50:23: error: 'GetCurrent' is not a member of 'v8::Context'
 #define V8JS_GLOBAL   v8::Context::GetCurrent()->Global()
                       ^
$HOME/v8js-0.1.5/php_v8js_macros.h:72:38: note: in expansion of macro 'V8JS_GLOBAL'
 #define V8JS_GLOBAL_SET_FLAGS(flags) V8JS_GLOBAL->SetHiddenValue(V8JS_SYM("__php_flags__"), V8JS_INT(flags))
                                      ^
$HOME/v8js-0.1.5/v8js.cc:772:2: note: in expansion of macro 'V8JS_GLOBAL_SET_FLAGS'
  V8JS_GLOBAL_SET_FLAGS(flags);
  ^
$HOME/v8js-0.1.5/php_v8js_macros.h:38:23: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYM(v)   v8::String::NewSymbol(v, sizeof(v) - 1)
                       ^
$HOME/v8js-0.1.5/php_v8js_macros.h:72:66: note: in expansion of macro 'V8JS_SYM'
 #define V8JS_GLOBAL_SET_FLAGS(flags) V8JS_GLOBAL->SetHiddenValue(V8JS_SYM("__php_flags__"), V8JS_INT(flags))
                                                                  ^
$HOME/v8js-0.1.5/v8js.cc:772:2: note: in expansion of macro 'V8JS_GLOBAL_SET_FLAGS'
  V8JS_GLOBAL_SET_FLAGS(flags);
  ^
$HOME/v8js-0.1.5/php_v8js_macros.h:42:41: error: no matching function for call to 'v8::Integer::New(long int&)'
 #define V8JS_INT(v)   v8::Integer::New(v)
                                         ^
$HOME/v8js-0.1.5/php_v8js_macros.h:72:93: note: in expansion of macro 'V8JS_INT'
 #define V8JS_GLOBAL_SET_FLAGS(flags) V8JS_GLOBAL->SetHiddenValue(V8JS_SYM("__php_flags__"), V8JS_INT(flags))
                                                                                             ^
$HOME/v8js-0.1.5/v8js.cc:772:2: note: in expansion of macro 'V8JS_GLOBAL_SET_FLAGS'
  V8JS_GLOBAL_SET_FLAGS(flags);
  ^
$HOME/v8js-0.1.5/php_v8js_macros.h:42:41: note: candidate is:
 #define V8JS_INT(v)   v8::Integer::New(v)
                                         ^
$HOME/v8js-0.1.5/php_v8js_macros.h:72:93: note: in expansion of macro 'V8JS_INT'
 #define V8JS_GLOBAL_SET_FLAGS(flags) V8JS_GLOBAL->SetHiddenValue(V8JS_SYM("__php_flags__"), V8JS_INT(flags))
                                                                                             ^
$HOME/v8js-0.1.5/v8js.cc:772:2: note: in expansion of macro 'V8JS_GLOBAL_SET_FLAGS'
  V8JS_GLOBAL_SET_FLAGS(flags);
  ^
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:2074:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:2074:25: note:   candidate expects 2 arguments, 1 provided
In file included from /opt/local/include/php56/php/main/php.h:35:0,
                 from $HOME/v8js-0.1.5/php_v8js_macros.h:20,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_persistent_zval_ctor(zval**)':
/opt/local/include/php56/php/Zend/zend.h:618:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define zend_bailout()  _zend_bailout(__FILE__, __LINE__)
                                                         ^
$HOME/v8js-0.1.5/v8js.cc:897:4: note: in expansion of macro 'zend_bailout'
    zend_bailout();
    ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_persistent_zval_dtor(zval**)':
/opt/local/include/php56/php/Zend/zend.h:618:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define zend_bailout()  _zend_bailout(__FILE__, __LINE__)
                                                         ^
$HOME/v8js-0.1.5/v8js.cc:910:4: note: in expansion of macro 'zend_bailout'
    zend_bailout();
    ^
In file included from /opt/local/include/php56/php/main/php.h:39:0,
                 from $HOME/v8js-0.1.5/php_v8js_macros.h:20,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
$HOME/v8js-0.1.5/v8js.cc: At global scope:
/opt/local/include/php56/php/Zend/zend_API.h:113:30: warning: narrowing conversion of '-1' from 'int' to 'zend_uint {aka unsigned int}' inside { } [-Wnarrowing]
 #define ZEND_END_ARG_INFO()  };
                              ^
$HOME/v8js-0.1.5/v8js.cc:1046:1: note: in expansion of macro 'ZEND_END_ARG_INFO'
 ZEND_END_ARG_INFO()
 ^
/opt/local/include/php56/php/Zend/zend_API.h:113:30: warning: narrowing conversion of '-1' from 'int' to 'zend_uint {aka unsigned int}' inside { } [-Wnarrowing]
 #define ZEND_END_ARG_INFO()  };
                              ^
$HOME/v8js-0.1.5/v8js.cc:1060:1: note: in expansion of macro 'ZEND_END_ARG_INFO'
 ZEND_END_ARG_INFO()
 ^
/opt/local/include/php56/php/Zend/zend_API.h:113:30: warning: narrowing conversion of '-1' from 'int' to 'zend_uint {aka unsigned int}' inside { } [-Wnarrowing]
 #define ZEND_END_ARG_INFO()  };
                              ^
$HOME/v8js-0.1.5/v8js.cc:1063:1: note: in expansion of macro 'ZEND_END_ARG_INFO'
 ZEND_END_ARG_INFO()
 ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_write_property(zval*, zval*, zval*, const zend_literal*)':
$HOME/v8js-0.1.5/v8js.cc:647:49: error: no matching function for call to 'v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)'
  v8::Context::Scope context_scope((ctx)->context);
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:1081:2: note: in expansion of macro 'V8JS_BEGIN_CTX'
  V8JS_BEGIN_CTX(c, object)
  ^
$HOME/v8js-0.1.5/v8js.cc:647:49: note: candidates are:
  v8::Context::Scope context_scope((ctx)->context);
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:1081:2: note: in expansion of macro 'V8JS_BEGIN_CTX'
  V8JS_BEGIN_CTX(c, object)
  ^
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note: v8::Context::Scope::Scope(v8::Handle<v8::Context>)
     explicit V8_INLINE Scope(Handle<Context> context) : context_(context) {
                        ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'v8::Handle<v8::Context>'
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note: constexpr v8::Context::Scope::Scope(const v8::Context::Scope&)
   class Scope {
         ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'const v8::Context::Scope&'
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:50:23: error: 'GetCurrent' is not a member of 'v8::Context'
 #define V8JS_GLOBAL   v8::Context::GetCurrent()->Global()
                       ^
$HOME/v8js-0.1.5/v8js.cc:1086:32: note: in expansion of macro 'V8JS_GLOBAL'
  v8::Local<v8::Object> jsobj = V8JS_GLOBAL->Get(c->object_name)->ToObject();
                                ^
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:1089:18: note: in expansion of macro 'V8JS_SYML'
  jsobj->ForceSet(V8JS_SYML(Z_STRVAL_P(member), Z_STRLEN_P(member)), zval_to_v8js(value, c->isolate TSRMLS_CC), v8::ReadOnly);
                  ^
$HOME/v8js-0.1.5/v8js.cc: In function 'void php_v8js_unset_property(zval*, zval*, const zend_literal*)':
$HOME/v8js-0.1.5/v8js.cc:647:49: error: no matching function for call to 'v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)'
  v8::Context::Scope context_scope((ctx)->context);
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:1098:2: note: in expansion of macro 'V8JS_BEGIN_CTX'
  V8JS_BEGIN_CTX(c, object)
  ^
$HOME/v8js-0.1.5/v8js.cc:647:49: note: candidates are:
  v8::Context::Scope context_scope((ctx)->context);
                                                 ^
$HOME/v8js-0.1.5/v8js.cc:1098:2: note: in expansion of macro 'V8JS_BEGIN_CTX'
  V8JS_BEGIN_CTX(c, object)
  ^
In file included from $HOME/v8js-0.1.5/php_v8js_macros.h:24:0,
                 from $HOME/v8js-0.1.5/v8js.cc:22:
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note: v8::Context::Scope::Scope(v8::Handle<v8::Context>)
     explicit V8_INLINE Scope(Handle<Context> context) : context_(context) {
                        ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5318:24: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'v8::Handle<v8::Context>'
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note: constexpr v8::Context::Scope::Scope(const v8::Context::Scope&)
   class Scope {
         ^
/usr/local/Cellar/v8/3.25.30/include/v8.h:5316:9: note:   no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'const v8::Context::Scope&'
In file included from $HOME/v8js-0.1.5/v8js.cc:22:0:
$HOME/v8js-0.1.5/php_v8js_macros.h:50:23: error: 'GetCurrent' is not a member of 'v8::Context'
 #define V8JS_GLOBAL   v8::Context::GetCurrent()->Global()
                       ^
$HOME/v8js-0.1.5/v8js.cc:1103:32: note: in expansion of macro 'V8JS_GLOBAL'
  v8::Local<v8::Object> jsobj = V8JS_GLOBAL->Get(c->object_name)->ToObject();
                                ^
$HOME/v8js-0.1.5/php_v8js_macros.h:39:26: error: 'NewSymbol' is not a member of 'v8::String'
 #define V8JS_SYML(v, l)  v8::String::NewSymbol(v, l)
                          ^
$HOME/v8js-0.1.5/v8js.cc:1106:21: note: in expansion of macro 'V8JS_SYML'
  jsobj->ForceDelete(V8JS_SYML(Z_STRVAL_P(member), Z_STRLEN_P(member)));
                     ^
make: *** [v8js.lo] Error 1

from v8js.

camspiers avatar camspiers commented on August 25, 2024

@evandrix Sorry that is didn't work for you :( I was on Mavericks

from v8js.

stesie avatar stesie commented on August 25, 2024

@evandrix which version of v8js did you try to compile? The 0.1.5 release from PECL? That one is pretty old and I would no expect it to compile fine against that v8 version.

Please try a fresh Github checkout from this repository

Could you please also tell whether the ./configure call correctly reported the v8 version?
(it indicates whether building against v8 generally works ok)

cheers
~stesie

from v8js.

lexfro avatar lexfro commented on August 25, 2024

cant build on Maverics too.. (

➜  v8js git:(master) pwd
/Users/fro/build/v8js
➜  v8js git:(master) ./configure --with-v8js=/Users/fro/build/v8 CXXFLAGS="-D_GLIBCXX_USE_NANOSLEEP"
checking for grep that handles long lines and -e... /usr/local/bin/ggrep
checking for egrep... /usr/local/bin/ggrep -E
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin14.1.0
checking host system type... x86_64-apple-darwin14.1.0
checking target system type... x86_64-apple-darwin14.1.0
checking for PHP prefix... /usr/local/Cellar/php56/5.6.5
checking for PHP includes... -I/usr/local/Cellar/php56/5.6.5/include/php -I/usr/local/Cellar/php56/5.6.5/include/php/main -I/usr/local/Cellar/php56/5.6.5/include/php/TSRM -I/usr/local/Cellar/php56/5.6.5/include/php/Zend -I/usr/local/Cellar/php56/5.6.5/include/php/ext -I/usr/local/Cellar/php56/5.6.5/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php56/5.6.5/lib/php/extensions/debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/Cellar/php56/5.6.5/include/php
checking if debug is enabled... yes
checking if zts is enabled... yes
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for V8 Javascript Engine... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for V8 version... NONE
configure: error: could not determine libv8 version

➜  v8  pwd
/Users/fro/build/v8
➜  v8  tree
.
├── include
│   ├── v8-debug.h
│   ├── v8-platform.h
│   ├── v8-profiler.h
│   ├── v8-testing.h
│   ├── v8-util.h
│   ├── v8.h
│   └── v8config.h
└── lib
    ├── libicui18n.dylib
    ├── libicuuc.dylib
    └── libv8.dylib

2 directories, 10 files

Why it "could not determine libv8 version"? Thanks in advance!

from v8js.

namjul avatar namjul commented on August 25, 2024

having the same problem like AlexeyFrolov.

from v8js.

vojtech-dobes avatar vojtech-dobes commented on August 25, 2024

Also affected, running Yosemite 10.10.2. I have v8 installed using brew, version 3.30.33.16.

from v8js.

jaromirnyklicek avatar jaromirnyklicek commented on August 25, 2024

Same problem here (Yosemite 10.10.2). I have overridden this by adding dirty hack to my config.m4 file (around line 50):

if (testfile.is_open()) {
        //testfile << v8::V8::GetVersion();
        testfile << "3.30.33.16";
        testfile << "\n";
        testfile.close();
        return 0;
}

then ./configure --with-v8js=/tmp/v8-install CXXFLAGS="-D_GLIBCXX_USE_NANOSLEEP" ends correctly and creates Makefile.

But when I call 'make' I get couple of theese errors

/usr/local/Cellar/php56/5.6.5/include/php/Zend/zend_API.h:112:53: note: expanded from macro 'ZEND_BEGIN_ARG_INFO'
        ZEND_BEGIN_ARG_INFO_EX(name, 0, ZEND_RETURN_VALUE, -1)
                                                           ^~
/usr/local/Cellar/php56/5.6.5/include/php/Zend/zend_API.h:110:20: note: expanded from macro 'ZEND_BEGIN_ARG_INFO_EX'
                { NULL, 0, NULL, required_num_args, 0, return_reference, 0, 0 },
                                 ^
/tmp/v8js/v8js_class.cc:1039:1: error: constant expression evaluates to -1 which cannot be narrowed to type 'zend_uint' (aka 'unsigned int') [-Wc++11-narrowing]
ZEND_BEGIN_ARG_INFO(arginfo_v8js_getextensions, 0)

So I guess there is still something wrong...

from v8js.

tahpot avatar tahpot commented on August 25, 2024

I'm also on OSX 10.10.2 and can't build. Tried @jaromirnyklicek approach of editing config.m4, but I still receive:

configure: error: could not determine libv8 version

However I have v8 version 3.25.30

from v8js.

stesie avatar stesie commented on August 25, 2024

I've finally fetched a MacOS vagrant image from the internet to give it a try myself; I'm usually on just on GNU/Linux boxes so bear with me...

The rpath stuff doesn't seem to be supported by Darwin, hence I've prepared a patched config.m4 file I'll eventually merge.

I used the Apple LLVM 6.0 compiler (clang); in combination with v8 3.28.71.19 (latest one from the 3.28 line) it works for me. I also got the error @jaromirnyklicek mentioned

/tmp/v8js/v8js_class.cc:1039:1: error: constant expression evaluates to -1 which cannot be narrowed to type 'zend_uint' (aka 'unsigned int') [-Wc++11-narrowing]
ZEND_BEGIN_ARG_INFO(arginfo_v8js_getextensions, 0)

... which is caused by PHP internal macros, which cast -1 to unsigned integer. gcc accepts that, but clang doesn't. However you can pass CXXFLAGS="-Wno-c++11-narrowing" to configure.


v8 versions 3.29.36 or later do not currently work. This is because v8 needs a library named libplatform there, which is available but it uses symbols from v8 library that are not externally visible and hence cause runtime problems.

  • v8js.so needs symbol __ZN2v84base5MutexC1Ev (via statically linked libplatform); capital U for "undefined"
vagrant-osx:v8js vagrant$ nm /usr/local/lib/php/extensions/no-debug-non-zts-20131226/v8js.so | grep __ZN2v84base5MutexC1Ev
                 U __ZN2v84base5MutexC1Ev
  • libv8.dylib does even define it ("t" for text segment aka code), but it's a lower case letter (which means internal)
vagrant-osx:v8js vagrant$ nm /usr/local/lib/libv8.dylib | grep __ZN2v84base5MutexC1Ev
00000000003447de t __ZN2v84base5MutexC1Ev
  • on a GNU/Linux system this symbol is public (capital T)
root@97c2d1abbaf4:/# nm /usr/local/v8/lib/libv8.so  | grep -ie ZN2v84base5MutexC1Ev
0000000000677170 T _ZN2v84base5MutexC1Ev

... and hence it's all fine there


TL;DR

  • v8 versions from the 3.28 line supposed to work fine
  • need to dig further regarding how to externalize the above symbol on darwin
  • I have a draft README.md file for MacOS around and will merge it with the config.m4 patch soonish

cheers
~stesie

by the way, I think you all don't need the CXXFLAGS="-D_GLIBCXX_USE_NANOSLEEP" flags, they are just a work around needed for gcc 4.7

from v8js.

tahpot avatar tahpot commented on August 25, 2024

Thanks stesie, much appreciated. Looking forward to the patch.

from v8js.

vojtech-dobes avatar vojtech-dobes commented on August 25, 2024

Awesome :).

from v8js.

stesie avatar stesie commented on August 25, 2024

Ok, I've now merged my changes and I've also fixed the libplatform problem that lead to linking issues with v8 versions 3.29.36 and higher

I've tried the 3.30 version installed by brew install v8 -> works for me (now).
Version 3.32 should work likewise.

Version 4.x are currently known to be broken. So better don't use these for the moment :-)


@evandrix looks like you're using the 0.1.5 release version, please use master instead.

@camspiers (and all others here actually): you shouldn't need to disable snapshots (snapshot=off); indeed the build stops due to libicu*.dylib not being available from /usr/local/lib. However you can just copy these from out/native/ already and re-start make. Then it is able to create the snapshot, which is a big plus IMHO (performance wise)

@alexeyfrolov @namjul I've tested with Yosemite, please try with mavericks again and let me know if it still doesn't work. Thanks!

cheers
~stesie

from v8js.

jaromirnyklicek avatar jaromirnyklicek commented on August 25, 2024

Thanks, works great. You're awesome ;-)

from v8js.

camspiers avatar camspiers commented on August 25, 2024

@stesie Thanks so much for your hard work on this!

from v8js.

tahpot avatar tahpot commented on August 25, 2024

I'm still having problems when compiling v8js:

/tmp/v8js/v8js_class.cc:293:6: error: expected a class or namespace
v8::Debug::ProcessDebugMessages();
~~~~ ^
/tmp/v8js/v8js_class.cc:635:7: error: expected a class or namespace
v8::Debug::DisableAgent();
~~~~ ^
/tmp/v8js/v8js_class.cc:672:6: error: expected a class or namespace
v8::Debug::SetDebugMessageDispatchHandler(DispatchDebugMessages, true);
~~~~ ^
/tmp/v8js/v8js_class.cc:673:6: error: expected a class or namespace
v8::Debug::EnableAgent(str_len ? str : "V8Js", port, auto_break > 0);
~~~~ ^
/tmp/v8js/v8js_class.cc:679:7: error: expected a class or namespace
v8::Debug::DebugBreak(c->isolate);

I tried with "brew install v8" and then tried compiling as per the MacOS.md, both with the same results :(

I'm using 10.10.2

from v8js.

tahpot avatar tahpot commented on August 25, 2024

I've got this working once I upgraded v8 from 3.25.30 to the latest (3.30.33.16) after doing "brew update".

Thanks for your excellent work @stesie

from v8js.

stesie avatar stesie commented on August 25, 2024

@tahpot 3.25.30 should work again as well, just in case should you still care after upgrading :)

from v8js.

TimNZ avatar TimNZ commented on August 25, 2024

Sorry, I'm a noob and frustratingly nothing is working to result in a successful compile.

Followed your README.mac_os instructions, following the guidance here, still get "checking for V8 version... NONE".

brew install v8 is installing v4.x which I did an unlink of and then followed your instructions.
Don't know how to read configure.sh so don't know exactly why it is failing.

I have no idea if I can do a brew install of an earlier version of v8, brew versions doesn't work, and none of the instructions I found worked.

It's like something broke in the last month and now nothing works.

No wonder people use Windows :)

checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin14.3.0
checking host system type... x86_64-apple-darwin14.3.0
checking target system type... x86_64-apple-darwin14.3.0
checking for PHP prefix... /usr/local/Cellar/php55/5.5.22
checking for PHP includes... -I/usr/local/Cellar/php55/5.5.22/include/php -I/usr/local/Cellar/php55/5.5.22/include/php/main -I/usr/local/Cellar/php55/5.5.22/include/php/TSRM -I/usr/local/Cellar/php55/5.5.22/include/php/Zend -I/usr/local/Cellar/php55/5.5.22/include/php/ext -I/usr/local/Cellar/php55/5.5.22/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php55/5.5.22/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /usr/local/Cellar/php55/5.5.22/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.7.5 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for V8 Javascript Engine... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for C standard version... c++11
checking for V8 version... NONE
configure: error: could not determine libv8 version

from v8js.

TimNZ avatar TimNZ commented on August 25, 2024

If this helps:

From config.m4:

AC_TRY_RUN([#include <v8.h>
#include <iostream>
#include <fstream>
using namespace std;

int main ()
{
    ofstream testfile ("conftestval");
    if (testfile.is_open()) {
        testfile << v8::V8::GetVersion();
        testfile << "\n";
        testfile.close();
        return 0;
    }
    return 1;
}], [ac_cv_v8_version=`cat ./conftestval|awk '{print $1}'`], [ac_cv_v8_version=NONE], [ac_cv_v8_version=NONE])

which ends up in configure after phpize:

if test "$cross_compiling" = yes; then :
  ac_cv_v8_version=NONE
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <v8.h>
#include <iostream>
#include <fstream>
using namespace std;

int main ()
{
    ofstream testfile ("conftestval");
    if (testfile.is_open()) {
        testfile << v8::V8::GetVersion();
        testfile << "\n";
        testfile.close();
        return 0;
    }
    return 1;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
  ac_cv_v8_version=`cat ./conftestval|awk '{print $1}'`
else
  ac_cv_v8_version=NONE
fi

The ac_fn_cxx_try fails and the else block is executed => NONE

from v8js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.