Closed bfishman closed 8 years ago
Hi,
I have updated the code to the latest WebRTC branch but my Tux box is down for now. So i'cant create prebuilt modules. Let me know if it worked? Btw there is so much changes, and therefore it is better to remove whole webrtc-native and rebuild it.
Thanks!
Hello @vmolsa !
Thank you for the update. Unfortunately the build failed. I received a warning, then an outright failure:
The warning:
[306/2044] CC obj/chromium/src/third_party/yasm/source/patched-yasm/modules/objfmts/bin/yasm.bin-objfmt.o
../../chromium/src/third_party/yasm/source/patched-yasm/modules/objfmts/bin/bin-objfmt.c: In function ‘dosexe_objfmt_output’:
../../chromium/src/third_party/yasm/source/patched-yasm/modules/objfmts/bin/bin-objfmt.c:1869:9: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fileno(f), EXE_HEADER_SIZE + size);
The Error:
[441/2044] LINK psnr_ssim_analyzer
FAILED: c++ -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 --sysroot=/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot -L/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/lib/x86_64-linux-gnu -Wl,-rpath-link=/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/lib/x86_64-linux-gnu -L/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath-link=/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu -L/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -Wl,-rpath-link=/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib -Wl,-rpath-link=/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib -Wl,--detect-odr-violations -Wl,--icf=all -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -o psnr_ssim_analyzer -Wl,--start-group obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o obj/webrtc/tools/libcommand_line_parser.a obj/webrtc/tools/libvideo_quality_analysis.a obj/webrtc/common_video/libcommon_video.a obj/webrtc/libwebrtc_common.a obj/webrtc/system_wrappers/libsystem_wrappers.a obj/webrtc/base/librtc_base_approved.a libyuv.a obj/chromium/src/third_party/libjpeg_turbo/libjpeg_turbo.a -Wl,--end-group -lrt
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.20]: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function CompareFiles(char const*, char const*, char const*, int, int): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const'
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function main: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)'
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function main: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)'
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function main: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)'
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function main: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)'
obj/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.psnr_ssim_analyzer.o:psnr_ssim_analyzer.cc:function main: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.44]: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::IsFlagWellFormed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::IsFlagWellFormed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::GetCommandLineFlagName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::GetCommandLineFlagName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::GetCommandLineFlagName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::GetCommandLineFlagValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::GetCommandLineFlagValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::PrintEnteredFlags(): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::SetUsageMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::SetFlag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::ProcessFlags(): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
obj/webrtc/tools/libcommand_line_parser.a(obj/webrtc/tools/command_line_parser.simple_command_line_parser.o):simple_command_line_parser.cc:function webrtc::test::CommandLineParser::ProcessFlags(): error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)'
collect2: error: ld returned 1 exit status
[441/2044] CC obj/webrtc/modules/audio_coding/codecs/isac/main/source/isac.entropy_coding.o
ninja: build stopped: subcommand failed.
action_before_build.target.mk:13: recipe for target '.' failed
make: *** [.] Error 1
make: Leaving directory '/home/bfishman/webroot/libs/webrtc-native/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/bfishman/webroot/libs/webrtc-native/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.2.0-30-generic
gyp ERR! command "/home/bfishman/.nvm/versions/node/v4.3.1/bin/node" "/home/bfishman/webroot/libs/webrtc-native/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bfishman/webroot/libs/webrtc-native
gyp ERR! node -v v4.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
It looks like I'm missing some C++ libraries. I did install the prerequisites you have listed on the front page:
sudo apt-get install --yes build-essential python2.7 git pkg-config libnss3-dev libasound2-dev libpulse-dev libjpeg62-dev libxv-dev libgtk2.0-dev libexpat1-dev default-jdk libxtst-dev libxss-dev libpci-dev libgconf2-dev libgnome-keyring-dev libudev-dev
EDIT: I don't think it should matter, but I'm running Ubuntu 15.10. Will update the issue's title. I'm actually running lubuntu, which I thought was built off the LTS, aparently it's not.
More info:
c++ version 5.2.1
node version 4.3.1
I installed GCC 4.8 and set that as the default for C++, build still failed, this time with a series of errors looking like this:
ninja: Entering directory `/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/out/Release'
[6/2044] CXX obj/webrtc/modules/video_coding/codecs/h264/webrtc_h264.h264.o
FAILED: c++ -MMD -MF obj/webrtc/modules/video_coding/codecs/h264/webrtc_h264.h264.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=262839-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_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 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DEXPAT_RELATIVE_PATH -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-extra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -B/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/third_party/binutils/Linux_x64/Release/bin -Wno-unused-local-typedefs -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -m64 -march=x86-64 --sysroot=/home/bfishman/webroot/libs/webrtc-native/third_party/webrtc/src/build/linux/debian_wheezy_amd64-sysroot -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -std=gnu++11 -Wno-narrowing -c ../../webrtc/modules/video_coding/codecs/h264/h264.cc -o obj/webrtc/modules/video_coding/codecs/h264/webrtc_h264.h264.o
In file included from ../../webrtc/modules/video_coding/codecs/h264/include/h264.h:26:0,
from ../../webrtc/modules/video_coding/codecs/h264/h264.cc:12:
../../webrtc/modules/video_coding/include/video_codec_interface.h:14:18: fatal error: vector: No such file or directory
#include <vector>
So, for the sake of fullness, I created a fresh lubuntu 14.04 installation. Build still failed:
________ running '/usr/bin/python src/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook' in '/home/bryan/lib/webrtc-native/third_party/webrtc/src/chromium'
Error: Command '/usr/bin/python src/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook' returned non-zero exit status 1 in /home/bryan/lib/webrtc-native/third_party/webrtc/src/chromium
Installing Debian Wheezy amd64 root image: /home/bryan/lib/webrtc-native/third_party/webrtc/src/chromium/src/build/linux/debian_wheezy_amd64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/c52471d9dec240c8d0a88fa98aa1eefeee32e22f/debian_wheezy_amd64_sysroot.tgz
Traceback (most recent call last):
File "src/build/linux/sysroot_scripts/install-sysroot.py", line 221, in <module>
sys.exit(main(sys.argv[1:]))
File "src/build/linux/sysroot_scripts/install-sysroot.py", line 150, in main
InstallDefaultSysroots()
File "src/build/linux/sysroot_scripts/install-sysroot.py", line 124, in InstallDefaultSysroots
InstallSysroot(host_arch)
File "src/build/linux/sysroot_scripts/install-sysroot.py", line 207, in InstallSysroot
['curl', '--fail', '--retry', '3', '-L', url, '-o', tarball])
File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Error: Command '/usr/bin/python -u src/sync_chromium.py --target-revision db8316d619295609307a1f6aca8ff13b0b1734c4' returned non-zero exit status 2 in /home/bryan/lib/webrtc-native/third_party/webrtc
Hook '/usr/bin/python -u src/sync_chromium.py --target-revision db8316d619295609307a1f6aca8ff13b0b1734c4' took 1367.40 secs
make: *** [.] Error 1
make: Leaving directory `/home/bryan/lib/webrtc-native/build'
gyp ERR! build error
We could add a travisc-ci support for the project (Ubuntu 14.04 trusty) but I did not get it to compile either.
Here is my travis branch: https://github.com/ax3l/webrtc-native/tree/topic-addTravisCI
Building WebRTC takes too long for travis and thats why it's failing?
I guess so, it's about 1 hr build time. Can we download a pre-build WebRTC somehow first?
For now webrtc-native is integrated with WebRTC. Splitting that webrtc part from webrtc-native requires shared library and i prefer don't do that.
Ok I see. Is there something problematic about shared libs in our case?
I'm also getting build failures on Ubuntu 15.04. I was able to get past the missing includes by doing this:
// Apparently needs g++ 4.8, not the included 4.9
sudo apt-get install g++-4.8 sudo rm /usr/bin/g++ sudo ln -s g++-4.8 /usr/bin/g++
// These paths are missing
export CPATH=/usr/include/c++/4.8:/usr/include/x86_64-linux-gnu/c++/4.8:/usr/include/c++/4.8/backward
// Build webrtc-native
git clone https://github.com/vmolsa/webrtc-native cd webrtc-native export BUILD_WEBRTC=true npm install
However, now I'm getting errors that I can't make much sense of:
../../../../../src/GetSources.cc: In static member function ‘static rtc::scoped_refptr<webrtc::VideoTrackInterface> WebRTC::GetSources::GetVideoSource(constrtc::scoped_refptr<WebRTC::MediaConstraints>&)’: ../../../../../src/GetSources.cc:91:26: error: ‘VideoSourceInterface’ is not a member of ‘webrtc’ rtc::scoped_refptr<webrtc::VideoSourceInterface> src = factory->CreateVideoSource(capturer, constraints->ToConstraints());
@alangibson Thanks!
Fixed now. I enabled clang but node versions v0.10.x and v0.12 can't to be compiled because those versions doesn't support clang. Rest of node versions have now prebuilt modules so i'm closing this one..
Awesome, thank you! Prebuilt binaries work great on Ubuntu 15.10!
Hello!
Build is failing in multiple places. I'm trying to fix by manually installing libs, etc, and have made 2 changes so far, but as a result I don't have the exact error messages from those earlier failures (don't really feel like re-downloading chromium on my current internet connection!) - so I'm going to paraphrase.
Error 1:
missing .../third_party/icu/icu.gyp
. The entire icu directory is missing. I pulled it from an earlier branch of chromium and put it in the expected location, which seems to have resolved the error message.Error 2:
missing libvpx_new/libvpx.gyp
Can't remember the exact details, but same idea - no libvpx_new folder was present. I also manually tried to install this, but am probably using the wrong version (I grabbed one from a day prior to your last commit ~26 October). Likely, that's the source of my current error:Error 3: I haven't been able to fix this yet:
ninja: error: '../../third_party/libvpx_new/source/libvpx/vp9/encoder/x86/vp9_error_intrin_avx2.c', needed by obj/third_party/libvpx_new/source/libvpx/vp9/encoder/x86/libvpx_intrinsics_avx2.vp9_error_intrin_avx2.o', missing and no known rule to make it
I read in another (closed) issue that you're planning to update to the latest WebRTC build. I'm looking forward to that, and thank you for your efforts!