hhvm-ext-uv icon indicating copy to clipboard operation
hhvm-ext-uv copied to clipboard

Not working on HHVM 3.9

Open steelbrain opened this issue 10 years ago • 4 comments

In file included from /steel/Sources/hhvm-ext-uv/src/ext.h:6:0,
                 from /steel/Sources/hhvm-ext-uv/src/ext.cpp:1:
/steel/Sources/hhvm-ext-uv/src/util.h: In function ‘HPHP::ObjectData* HPHP::makeObject(const HPHP::String&, HPHP::Array, bool)’:
/steel/Sources/hhvm-ext-uv/src/util.h:18:53: error: conversion from ‘HPHP::ObjectData*’ to non-scalar type ‘HPHP::Object’ requested
         Object o = ret = ObjectData::newInstance(cls);        
                                                     ^
CMakeFiles/uv.dir/build.make:54: recipe for target 'CMakeFiles/uv.dir/src/ext.cpp.o' failed
make[2]: *** [CMakeFiles/uv.dir/src/ext.cpp.o] Error 1
CMakeFiles/Makefile2:161: recipe for target 'CMakeFiles/uv.dir/all' failed
make[1]: *** [CMakeFiles/uv.dir/all] Error 2
Makefile:107: recipe for target 'all' failed
make: *** [all] Error 2

steelbrain avatar Sep 14 '15 11:09 steelbrain

After some patching on ext.cpp I get this

/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp: In function ‘HPHP::ObjectData HPHP::c_UVTcp_ni_accept(HPHP::ObjectData*)’:
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:157:58: error: could not convert ‘HPHP::make_accepted_uv_tcp_object(((HPHP::ObjectData*)this_), (* & HPHP::String(((const char*)"UVTcp"))))’ from ‘HPHP::ObjectData*’ to ‘HPHP::ObjectData’
         return make_accepted_uv_tcp_object(this_, "UVTcp");
                                                          ^
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp: In function ‘HPHP::String HPHP::c_UVTcp_ni_getSockname(HPHP::ObjectData*)’:
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:221:34: error: use of deleted function ‘HPHP::String::String(const HPHP::StringData*)’
         return data->tcp_handle->sockAddr;
                                  ^
In file included from /usr/include/hphp/runtime/base/debuggable.h:19:0,
                 from /usr/include/hphp/runtime/ext/extension.h:21,
                 from /steel/Sources/hhvm-ext-uv/src/hhvm_include.h:9,
                 from /steel/Sources/hhvm-ext-uv/src/ext.h:3,
                 from /steel/Sources/hhvm-ext-uv/src/uv_tcp.h:4,
                 from /steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:1:
/usr/include/hphp/runtime/base/type-string.h:143:18: note: declared here
   /* implicit */ String(const StringData*) = delete;
                  ^
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp: In function ‘HPHP::String HPHP::c_UVTcp_ni_getPeername(HPHP::ObjectData*)’:
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:240:34: error: use of deleted function ‘HPHP::String::String(const HPHP::StringData*)’
         return data->tcp_handle->peerAddr;
                                  ^
In file included from /usr/include/hphp/runtime/base/debuggable.h:19:0,
                 from /usr/include/hphp/runtime/ext/extension.h:21,
                 from /steel/Sources/hhvm-ext-uv/src/hhvm_include.h:9,
                 from /steel/Sources/hhvm-ext-uv/src/ext.h:3,
                 from /steel/Sources/hhvm-ext-uv/src/uv_tcp.h:4,
                 from /steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:1:
/usr/include/hphp/runtime/base/type-string.h:143:18: note: declared here
   /* implicit */ String(const StringData*) = delete;
                  ^
In file included from /usr/include/hphp/runtime/ext/extension.h:23:0,
                 from /steel/Sources/hhvm-ext-uv/src/hhvm_include.h:9,
                 from /steel/Sources/hhvm-ext-uv/src/ext.h:3,
                 from /steel/Sources/hhvm-ext-uv/src/uv_tcp.h:4,
                 from /steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:1:
/usr/include/hphp/runtime/vm/native.h: In instantiation of ‘HPHP::Native::NativeSig::NativeSig(Ret (*)(Args ...)) [with Ret = HPHP::ObjectData; Args = {HPHP::ObjectData*}]’:
/usr/include/hphp/runtime/vm/native.h:344:29:   required from ‘HPHP::Native::BuiltinFunctionInfo::BuiltinFunctionInfo(Func) [with Func = HPHP::ObjectData (*)(HPHP::ObjectData*)]’
/usr/include/hphp/runtime/vm/native.h:375:46:   required from ‘void HPHP::Native::registerBuiltinFunction(const char*, Fun) [with Fun = HPHP::ObjectData (*)(HPHP::ObjectData*)]’
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:316:9:   required from here
/usr/include/hphp/runtime/vm/native.h:333:39: error: ‘value’ is not a member of ‘HPHP::Native::detail::native_ret_type<HPHP::ObjectData>’
   , args(detail::build_args<Args...>())
                                       ^
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:241:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp: In function ‘HPHP::String HPHP::c_UVTcp_ni_getSockname(HPHP::ObjectData*)’:
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:222:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp: In function ‘HPHP::ObjectData HPHP::c_UVTcp_ni_accept(HPHP::ObjectData*)’:
/steel/Sources/hhvm-ext-uv/src/uv_tcp.cpp:158:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
CMakeFiles/uv.dir/build.make:146: recipe for target 'CMakeFiles/uv.dir/src/uv_tcp.cpp.o' failed
make[2]: *** [CMakeFiles/uv.dir/src/uv_tcp.cpp.o] Error 1
CMakeFiles/Makefile2:161: recipe for target 'CMakeFiles/uv.dir/all' failed
make[1]: *** [CMakeFiles/uv.dir/all] Error 2
Makefile:107: recipe for target 'all' failed
make: *** [all] Error 2

steelbrain avatar Sep 14 '15 11:09 steelbrain

@RickySu the work you are doing here is super-awesome (especially that multiloop branch). I have a very little C++ knowledge, otherwise I would be doing my part in helping you maintain this extension.

steelbrain avatar Sep 14 '15 12:09 steelbrain

Using single loop is not a good idea.So I create a multiloop branch to handle different loop instance. master branch is deprecated ;)

RickySu avatar Sep 15 '15 01:09 RickySu

bump... This is not working in HHVM 3.12.1. @RickySu Can you please take a look?

RaeesBhatti avatar Jun 24 '16 20:06 RaeesBhatti