vmolsa / webrtc-native

WebRTC for NodeJS
MIT License
169 stars 96 forks source link

Fails to build with Node>7 #49

Open wildekek opened 7 years ago

wildekek commented 7 years ago

When building on Node > v7, I get compilation issues. WeakCallbackData was removed from V8 and is not available anymore in Node.

[2026/2037] CXX ../../src/webrtc.Observers.o
FAILED: ../../src/webrtc.Observers.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF ../../src/webrtc.Observers.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DBUILDING_NODE_EXTENSION -DNODE_GYP_MODULE_NAME=webrtc -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=261368-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DUSE_UDEV -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DWEBRTC_LINUX -DHASH_NAMESPACE=__gnu_cxx -DWEBRTC_POSIX -DDISABLE_DYNAMIC_CAST -D_REENTRANT -DEXPAT_RELATIVE_PATH -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -D_LARGEFILE_SOURCE -DUSE_BACKTRACE -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../../../../third_party/webrtc/src -I../../../../../third_party/webrtc/src -I../../../../../third_party/webrtc/src/third_party -I../../../../../third_party/webrtc/src/third_party/webrtc -I../../../../../third_party/webrtc/src/webrtc -I/home/vagrant/.node-gyp/8.4.0/include/node -I/home/vagrant/.node-gyp/8.4.0/src -I/home/vagrant/.node-gyp/8.4.0/deps/uv/include -I/home/vagrant/.node-gyp/8.4.0/deps/v8/include -I../../../../../third_party/webrtc/src/third_party/jsoncpp/source/include -I../../../../../third_party/webrtc/src/third_party/libsrtp/srtp -I../../../../../third_party/webrtc/src/third_party/libyuv/include -I../../../../../node_modules/nan -fstack-protector --param=ssp-buffer-size=4  -pthread -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -fcolor-diagnostics -B/home/vagrant/webrtc-native/third_party/webrtc/src/third_party/binutils/Linux_x64/Release/bin -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wall -Wextra -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wreorder -Wunused-variable -Wno-address-of-array-temporary -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fPIC -Wno-deprecated-declarations -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-result -m64 -march=x86-64 --sysroot=/home/vagrant/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -O3 -fno-omit-frame-pointer -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wunused-private-field -Wnon-virtual-dtor -Woverloaded-virtual -fno-rtti -fno-exceptions -std=gnu++0x -Wno-non-virtual-dtor -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual  -c ../../../../../src/Observers.cc -o ../../src/webrtc.Observers.o
In file included from ../../../../../src/Observers.cc:28:
In file included from ../../../../../src/DataChannel.h:33:
../../../../../src/ArrayBuffer.h:314:44: error: no template named 'WeakCallbackData' in namespace 'v8'; did you mean 'WeakCallbackInfo'?
    static inline void onDispose(const v8::WeakCallbackData<v8::ArrayBuffer, ArrayBuffer> &info) {
                                       ~~~~^~~~~~~~~~~~~~~~
                                           WeakCallbackInfo
/home/vagrant/.node-gyp/8.4.0/include/node/v8.h:7990:16: note: 'WeakCallbackInfo' declared here
  friend class WeakCallbackInfo;
               ^
In file included from ../../../../../src/Observers.cc:28:
In file included from ../../../../../src/DataChannel.h:33:
../../../../../src/ArrayBuffer.h:314:44: error: too many template arguments for class template 'WeakCallbackInfo'
    static inline void onDispose(const v8::WeakCallbackData<v8::ArrayBuffer, ArrayBuffer> &info) {
                                           ^                                 ~~~~~~~~~~~~
/home/vagrant/.node-gyp/8.4.0/include/node/v8.h:7990:16: note: template is declared here
  friend class WeakCallbackInfo;
               ^
In file included from ../../../../../src/Observers.cc:28:
In file included from ../../../../../src/DataChannel.h:33:
../../../../../src/ArrayBuffer.h:109:20: error: no member named 'SetHiddenValue' in 'v8::ArrayBuffer'
      arrayBuffer->SetHiddenValue(v8::String::NewFromUtf8(isolate, "node::ArrayBuffer"), v8::External::New(isolate, buffer));
      ~~~~~~~~~~~  ^
../../../../../src/ArrayBuffer.h:123:49: error: no member named 'GetHiddenValue' in 'v8::ArrayBuffer'
        v8::Local<v8::Value> ptr = arrayBuffer->GetHiddenValue(v8::String::NewFromUtf8(isolate, "node::ArrayBuffer"));
                                   ~~~~~~~~~~~  ^
../../../../../src/ArrayBuffer.h:142:22: error: no member named 'SetHiddenValue' in 'v8::ArrayBuffer'
        arrayBuffer->SetHiddenValue(v8::String::NewFromUtf8(isolate, "node::ArrayBuffer"), v8::External::New(isolate, buffer));
        ~~~~~~~~~~~  ^
../../../../../src/ArrayBuffer.h:325:24: error: no member named 'DeleteHiddenValue' in 'v8::ArrayBuffer'
          arrayBuffer->DeleteHiddenValue(v8::String::NewFromUtf8(isolate, "node::ArrayBuffer"));
          ~~~~~~~~~~~  ^
6 errors generated.
[2028/2037] CXX obj/webrtc/api/libjingle_peerconnection.webrtcsdp.o
ninja: build stopped: subcommand failed.
danieldonoghue commented 7 years ago

further information can be found at https://codereview.chromium.org/1953263002

WeakCallbackData has been removed from v8. has anybody looked at this yet?