webrtcbuilds icon indicating copy to clipboard operation
webrtcbuilds copied to clipboard

ERROR Unresolved dependencies (webrtc_tests)

Open robagar opened this issue 7 years ago • 4 comments

My (previously working) build fails, now complaining that //webrtc:webrtc_tests(//build/toolchain/linux:x64) has not been built. Is rtc_include_tests=false correct?

build.sh -d output:

Compiling WebRTC
+ compile linux /home/rob/libs/webrtcbuilds/out linux x64
+ local platform=linux
+ local outdir=/home/rob/libs/webrtcbuilds/out
+ local target_os=linux
+ local target_cpu=x64
+ local 'common_args=is_component_build=false rtc_include_tests=false'
+ local 'target_args=target_os="linux" target_cpu="x64"'
+ pushd /home/rob/libs/webrtcbuilds/out/src
+ case $platform in
+ '[' linux = linux ']'
+ target_args+=' is_clang=false use_sysroot=false'
+ gn gen out/Debug '--args=is_component_build=false rtc_include_tests=false target_os="linux" target_cpu="x64" is_clang=false use_sysroot=false'
ERROR Unresolved dependencies.
//:default(//build/toolchain/linux:x64)
  needs //webrtc:webrtc(//build/toolchain/linux:x64)
//:default(//build/toolchain/linux:x64)
  needs //webrtc:webrtc_tests(//build/toolchain/linux:x64)

robagar avatar Nov 03 '16 11:11 robagar

Hi, I'm also get the same error now on Ubuntu 16.04, x64 builds. I'll have to dig in further but removing rtc_include_tests=false (so that tests would be included) gets past this.

Unfortunately on my 16.04 build, the test later fails at this point:

FAILED: obj/webrtc/rtc_unittests/swap_queue_unittest.o 
g++ -MMD -MF obj/webrtc/rtc_unittests/swap_queue_unittest.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DWEBRTC_RESTRICT_LOGGING -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DEXPAT_RELATIVE_PATH -DWEBRTC_BUILD_LIBEVENT -DWEBRTC_POSIX -DWEBRTC_LINUX -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGTEST_HAS_RTTI=0 -DGTEST_RELATIVE_PATH -DUNIT_TEST -DFEATURE_ENABLE_VOICEMAIL -I../.. -Igen -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../testing/gtest/include -I../../testing/gmock/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -m64 -march=x86-64 -Wall -Werror -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -O0 -g2 -gsplit-dwarf -fvisibility=hidden -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -fno-rtti -fno-exceptions -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/base/swap_queue_unittest.cc -o obj/webrtc/rtc_unittests/swap_queue_unittest.o
../../webrtc/base/swap_queue_unittest.cc: In member function ‘virtual void webrtc::SwapQueueTest_UnsuccessfulItemVerifyFunctor_Test::TestBody()’:
../../webrtc/base/swap_queue_unittest.cc:146:8: error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]
   bool result;
        ^
../../webrtc/base/swap_queue_unittest.cc: In member function ‘virtual void webrtc::SwapQueueTest_UnSuccessfulItemVerifyInsert_Test::TestBody()’:
../../webrtc/base/swap_queue_unittest.cc:156:8: error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]
   bool result;
        ^
../../webrtc/base/swap_queue_unittest.cc: In member function ‘virtual void webrtc::SwapQueueTest_UnSuccessfulItemVerifyRemove_Test::TestBody()’:
../../webrtc/base/swap_queue_unittest.cc:169:8: error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]
   bool result;
        ^
cc1plus: all warnings being treated as errors

which is a unit test, since building the tests is now included :) Does the build continue for you without errors?

Either way, I think this is something to look into further - either making rtc_include_tests=true the default but I'll have to figure out why this test is not building by default, or by fixing the build with rtc_include_tests=false

Not including the tests did have the benefit of saving compile times, etc.

vsimon avatar Nov 04 '16 22:11 vsimon

Nope, mine falls over building another one of the tests :\

[1576/3208] CXX obj/webrtc/rtc_unittests/array_view_unittest.o
FAILED: obj/webrtc/rtc_unittests/array_view_unittest.o 
g++ -MMD -MF obj/webrtc/rtc_unittests/array_view_unittest.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_SUPERVISED_USERS=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DEXPAT_RELATIVE_PATH -DWEBRTC_POSIX -DWEBRTC_LINUX -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DWEBRTC_BUILD_LIBEVENT -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DGTEST_RELATIVE_PATH -DUNIT_TEST -DFEATURE_ENABLE_VOICEMAIL -I../.. -Igen -I../../testing/gtest/include -I../../testing/gmock_custom -I../../testing/gmock/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -m64 -march=x86-64 -Wall -Werror -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -O0 -fno-omit-frame-pointer -g2 -gsplit-dwarf -fvisibility=hidden -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -fno-rtti -fno-exceptions -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/base/array_view_unittest.cc -o obj/webrtc/rtc_unittests/array_view_unittest.o
../../webrtc/base/array_view_unittest.cc: In member function ‘virtual void rtc::ArrayViewTest_TestRtcBuffer_Test::TestBody()’:
../../webrtc/base/array_view_unittest.cc:136:26: error: use of deleted function ‘rtc::BufferT<T>::BufferT(const rtc::BufferT<T>&) [with T = unsigned char]’
   const rtc::Buffer cb = "very const";
                          ^
In file included from ../../webrtc/base/array_view_unittest.cc:16:0:
../../webrtc/base/buffer.h:67:3: error: declared here
   BufferT(const BufferT&) = delete;

robagar avatar Nov 07 '16 09:11 robagar

Wacky. I just tried building the current WebRTC head (rev b05fa2466a21ad0dfb4c750ebbb260675bce592f) with rtc_include_tests=false to see if anything upstream had fixed the problem, and it now fails fails with this:

Compiling WebRTC
ERROR Unresolved dependencies.
//:default(//build/toolchain/linux:x64)
  needs //webrtc:webrtc(//build/toolchain/linux:x64)

robagar avatar Nov 11 '16 13:11 robagar

Ah ha! building with rtc_include_test=true succeeds with clang. Perhaps that should be the default compiler on Linux now?

diff --git a/util.sh b/util.sh
index 62932c9..f4a5a8a 100644
--- a/util.sh
+++ b/util.sh
@@ -230,7 +230,7 @@ function compile() {
   local outdir="$2"
   local target_os="$3"
   local target_cpu="$4"
-  local common_args="is_component_build=false rtc_include_tests=false"
+  local common_args="is_component_build=false rtc_include_tests=true"
   local target_args="target_os=\"$target_os\" target_cpu=\"$target_cpu\""

   pushd $outdir/src >/dev/null
@@ -248,9 +248,9 @@ function compile() {
   *)
     # On Linux, use clang = false and sysroot = false to build using gcc.
     # Comment this out to use clang.
-    if [ $platform = 'linux' ]; then
-      target_args+=" is_clang=false use_sysroot=false"
-    fi
+    # if [ $platform = 'linux' ]; then
+    #   target_args+=" is_clang=false use_sysroot=false"
+    # fi

     # Debug builds are component builds (shared libraries) by default unless
     # is_component_build=false is passed to gn gen --args. Release builds are

robagar avatar Nov 11 '16 15:11 robagar