sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.31k stars 344 forks source link

Unable to build WebRtcRecoder on Ubuntu 16.04.6 LTS #270

Closed ludothetester closed 5 years ago

ludothetester commented 5 years ago

I'm not able to build the WebRtcRecoder library.

When lauching npm install I got the following output. Attached is the file with the full log.

msgpackBinding.target.mk:120: recipe for target 'Release/obj.target/msgpackBinding/src/msgpack.o' failed make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1 make: Leaving directory '/home/ludovicvelu/webrtcbuilds/libsourcey/src/webrtc/samples/webrtcrecorder/client/node_modules/msgpack/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:200:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Linux 4.4.0-142-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ludovicvelu/webrtcbuilds/libsourcey/src/webrtc/samples/webrtcrecorder/client/node_modules/msgpack gyp ERR! node -v v12.4.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN symple-webrtc-native-video-demo@0.1.0 No description npm WARN symple-webrtc-native-video-demo@0.1.0 No repository field. npm WARN symple-webrtc-native-video-demo@0.1.0 No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! msgpack@1.0.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the msgpack@1.0.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2019-06-10T14_04_33_995Z-debug.log

I wonder if it's linked to the following errors: ../src/msgpack.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE pack(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/msgpack.cc:279:13: error: ‘v8_to_msgpack’ was not declared in this scope v8_to_msgpack(info[i], &mo, &mz._mz, 0); ^~~~~ ../src/msgpack.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE unpack(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/msgpack.cc:308:43: error: no matching function for call to ‘v8::Value::ToObject()’ Local buf = info[0]->ToObject(); ^ If yes....how can I solve this ?

Thanks a lot

ludothetester commented 5 years ago

I was due to a combination between npm version and nodejs.

Solved now.

yxlao commented 3 years ago

removing package-lock.json solves it for me, npm will try to find the corresponding version