open-webrtc-toolkit / owt-server

General server (streaming/conference/transcoding/anayltics) for OWT. (A.k.a. MediaServer)
https://01.org/open-webrtc-toolkit
Apache License 2.0
1.14k stars 375 forks source link

quicIO compile failure #363

Open zhouhuirun2015 opened 5 years ago

zhouhuirun2015 commented 5 years ago

./scripts/build.js -t quicIO /root/owt-server/build/libdeps/build/lib/pkgconfig:/root/owt-server/build/libdeps/build/lib64/pkgconfig: Following targets will be built: quicIO Building addon - quicIO make: Entering directory /root/owt-server/source/agent/addons/quicIO/build' CXX(target) Release/obj.target/quicIO/QuicTransport.o ../QuicTransport.cc: In member function ‘virtual void QuicOut::onFrame(const owt_base::Frame&)’: ../QuicTransport.cc:138:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (data.length > INIT_BUFF_SIZE + 4) { ^ In file included from /usr/include/boost/assert.hpp:50:0, from /usr/include/boost/smart_ptr/shared_array.hpp:25, from /usr/include/boost/shared_array.hpp:17, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp: In instantiation of ‘void boost::shared_array<T>::reset(Y*) [with Y = char; T = unsigned char]’: ../QuicTransport.cc:75:48: required from here /usr/include/boost/smart_ptr/shared_array.hpp:173:9: error: comparison between distinct pointer types ‘char*’ and ‘unsigned char*’ lacks a cast [-fpermissive] BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors ^ In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp: In instantiation of ‘boost::shared_array<T>& boost::shared_array<T>::operator=(const boost::shared_array<Y>&) [with Y = unsigned char; T = char]’: ../QuicTransport.cc:79:34: required from here /usr/include/boost/smart_ptr/shared_array.hpp:143:9: error: no matching function for call to ‘boost::shared_array<char>::shared_array(const boost::shared_array<unsigned char>&)’ this_type( r ).swap( *this ); ^ /usr/include/boost/smart_ptr/shared_array.hpp:143:9: note: candidates are: /usr/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array<T>::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*) shared_array( shared_array<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) ^ /usr/include/boost/smart_ptr/shared_array.hpp:126:5: note: template argument deduction/substitution failed: /usr/include/boost/smart_ptr/shared_array.hpp:143:9: note: candidate expects 2 arguments, 1 provided this_type( r ).swap( *this ); ^ In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array<T>::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type) shared_array( shared_array<Y> const & r, typename boost::detail::sp_enable_if_convertible< Y[], T[] >::type = boost::detail::sp_empty() ) ^ /usr/include/boost/smart_ptr/shared_array.hpp:111:5: note: template argument deduction/substitution failed: /usr/include/boost/smart_ptr/shared_array.hpp: In substitution of ‘template<class Y> boost::shared_array<T>::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type) [with Y = unsigned char]’: /usr/include/boost/smart_ptr/shared_array.hpp:143:9: required from ‘boost::shared_array<T>& boost::shared_array<T>::operator=(const boost::shared_array<Y>&) [with Y = unsigned char; T = char]’ ../QuicTransport.cc:79:34: required from here /usr/include/boost/smart_ptr/shared_array.hpp:111:5: error: no type named ‘type’ in ‘struct boost::detail::sp_enable_if_convertible<unsigned char [], char []>’ /usr/include/boost/smart_ptr/shared_array.hpp: In instantiation of ‘boost::shared_array<T>& boost::shared_array<T>::operator=(const boost::shared_array<Y>&) [with Y = unsigned char; T = char]’: ../QuicTransport.cc:79:34: required from here /usr/include/boost/smart_ptr/shared_array.hpp:98:5: note: boost::shared_array<T>::shared_array(boost::shared_array<T>&&) [with T = char] shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn() ^ /usr/include/boost/smart_ptr/shared_array.hpp:98:5: note: no known conversion for argument 1 from ‘const boost::shared_array<unsigned char>’ to ‘boost::shared_array<char>&&’ /usr/include/boost/smart_ptr/shared_array.hpp:94:5: note: boost::shared_array<T>::shared_array(const boost::shared_array<T>&) [with T = char] shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) ^ /usr/include/boost/smart_ptr/shared_array.hpp:94:5: note: no known conversion for argument 1 from ‘const boost::shared_array<unsigned char>’ to ‘const boost::shared_array<char>&’ /usr/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array<T>::shared_array(Y*, D, A) template<class Y, class D, class A> shared_array( Y * p, D d, A a ): px( p ), pn( p, d, a ) ^ /usr/include/boost/smart_ptr/shared_array.hpp:83:41: note: template argument deduction/substitution failed: In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:143:9: note: mismatched types ‘Y*’ and ‘boost::shared_array<unsigned char>’ this_type( r ).swap( *this ); ^ In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array<T>::shared_array(Y*, D) template<class Y, class D> shared_array( Y * p, D d ): px( p ), pn( p, d ) ^ /usr/include/boost/smart_ptr/shared_array.hpp:76:32: note: template argument deduction/substitution failed: In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:143:9: note: mismatched types ‘Y*’ and ‘boost::shared_array<unsigned char>’ this_type( r ).swap( *this ); ^ In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array<T>::shared_array(Y*) explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter<Y>() ) ^ /usr/include/boost/smart_ptr/shared_array.hpp:65:14: note: template argument deduction/substitution failed: In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:143:9: note: mismatched types ‘Y*’ and ‘boost::shared_array<unsigned char>’ this_type( r ).swap( *this ); ^ In file included from /usr/include/boost/shared_array.hpp:17:0, from ../QuicTransport.h:14, from ../QuicTransport.cc:5: /usr/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = char] shared_array() BOOST_NOEXCEPT : px( 0 ), pn() ^ /usr/include/boost/smart_ptr/shared_array.hpp:60:5: note: candidate expects 0 arguments, 1 provided make: *** [Release/obj.target/quicIO/QuicTransport.o] Error 1 make: Leaving directory/root/owt-server/source/agent/addons/quicIO/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/node-gyp/lib/build.js:194:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 3.10.0-957.21.3.el7.x86_64 gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "build" "-j" "8" "--loglevel=error" gyp ERR! cwd /root/owt-server/source/agent/addons/quicIO gyp ERR! node -v v8.16.2 gyp ERR! node-gyp -v v6.0.0 gyp ERR! not ok child_process.js:650 throw err; ^

Error: Command failed: node-gyp build -j 8 --loglevel=error at checkExecSyncError (child_process.js:607:13) at execSync (child_process.js:647:13) at buildTarget (/root/owt-server/scripts/build.js:132:5) at buildList.map (/root/owt-server/scripts/build.js:160:10) at Array.map () at Object. (/root/owt-server/scripts/build.js:155:23) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12)

zhouhuirun2015 commented 5 years ago

change /master/source/agent/addons/quicIO/QuicTransport.cc line 74: boost::shared_array new_buffer; to: boost::shared_array < char > new_buffer; solved.

starwarfan commented 4 years ago

Thanks. #374