我尝试在官方网站上使用 the instruction编译WebRTC。当我输入命令$ clang --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: i386-pc-linux-gnu
Thread model: posix
时,我收到了一个巨大的错误列表。我想,提供整个列表是没有意义的,但是这个字符串有几次出现:
$ ninja -C out/Debug
ninja: Entering directory `out/Debug'
[3/2955] CXX obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_bitrate_estimator_abs_send_time.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_bitrate_estimator_abs_send_time.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DEXPAT_RELATIVE_PATH -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=259396-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -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 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0 -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen -I../.. -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -fcolor-diagnostics -B/home/maximus/workspaces/work/webrtc/webrtc-checkout/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 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -msse2 -mfpmath=sse -mmmx -m32 --sysroot=/home/maximus/workspaces/work/webrtc/webrtc-checkout/src/build/linux/debian_wheezy_i386-sysroot -O0 -g -funwind-tables -Wnon-virtual-dtor -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc -o obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_bitrate_estimator_abs_send_time.o
../../third_party/llvm-build/Release+Asserts/bin/clang++: 1: ../../third_party/llvm-build/Release+Asserts/bin/clang++: Syntax error: "(" unexpected
[3/2955] CXX obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_bitrate_estimator_single_stream.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_bitrate_estimator_single_stream.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DEXPAT_RELATIVE_PATH -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=259396-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -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 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0 -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen -I../.. -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -fcolor-diagnostics -B/home/maximus/workspaces/work/webrtc/webrtc-checkout/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 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -msse2 -mfpmath=sse -mmmx -m32 --sysroot=/home/maximus/workspaces/work/webrtc/webrtc-checkout/src/build/linux/debian_wheezy_i386-sysroot -O0 -g -funwind-tables -Wnon-virtual-dtor -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc -o obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_bitrate_estimator_single_stream.o
../../third_party/llvm-build/Release+Asserts/bin/clang++: 1: ../../third_party/llvm-build/Release+Asserts/bin/clang++: Syntax error: "(" unexpected
[3/2955] CXX obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_estimator_proxy.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_estimator_proxy.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DEXPAT_RELATIVE_PATH -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=259396-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -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 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0 -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen -I../.. -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -fcolor-diagnostics -B/home/maximus/workspaces/work/webrtc/webrtc-checkout/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 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -Wimplicit-fallthrough -Wthread-safety -msse2 -mfpmath=sse -mmmx -m32 --sysroot=/home/maximus/workspaces/work/webrtc/webrtc-checkout/src/build/linux/debian_wheezy_i386-sysroot -O0 -g -funwind-tables -Wnon-virtual-dtor -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc -o obj/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.remote_estimator_proxy.o
../../third_party/llvm-build/Release+Asserts/bin/clang++: 1: ../../third_party/llvm-build/Release+Asserts/bin/clang++: Syntax error: "(" unexpected
ninja: build stopped: subcommand failed.
我机器上的Clang版本:
hmac = crypto.createHmac('sha512', new Buffer(secret, 'hex'))
.update(new Buffer(theString, 'hex'))
.digest('hex');
我不知道该怎么做。请问有人帮帮我吗?
UPD。整个错误列表:
function Step2() {
debugger;
//Get all table rows
var tableRows = $('#ProjectsTable > tbody > tr');
//Remove first two rows
tableRows.splice(0, 2);
var tds = []
tableRows.each(function () {
tds.push($(this).find('td'));
})
var self = new Object();
self.Projects = new Array();
for (var i = 0; i < tds.length; i++) {
self.Projects.push([]);
self.Projects[i].Years = new Array();
self.Projects[i].ProjectName = "";
self.Projects[i].ProjectName = $(tds[i][0]).find('span').text();
for (var j = 1; j < tds[i].length;) {
var Year = new Object();
Year.TimeAllocated = $(tds[i][j++]).text();
Year.Duration = $(tds[i][j++]).text();
Year.Cost = $(tds[i][j++]).text();
self.Projects[i].Years.push(Year);
}
}
return self;
}
function SubmitStep2() {
debugger;
var request = Step2();
var jsonData = JSON.stringify(request);
debugger;
$.ajax({
url: "/ResearchGrant/ProjectManpower",
dataType: 'json',
contentType: "application/json",
type: "POST",
data: jsonData ,
})
.success(function (result) {
ShowSuccessMessage();
})
.error(function (xhr, status) {
alert(status + xhr.error);
})
}
答案 0 :(得分:0)
请检查this article我描述了如何构建WebRTC直线前进。
下载脚本&amp;运行强> https://cs.chromium.org/chromium/src/build/install-build-deps.sh
./build/install-build-deps.sh --no-chromeos-fonts
$ git clone --depth 1
https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=`pwd`/depot_tools:"$PATH"
定义建筑参数
$ export GYP_DEFINES="target_arch=x64 host_arch=x64 build_with_chromium=0 use_openssl=0 use_gtk=0 use_x11=0 include_examples=0 include_tests=1 fastbuild=1 remove_webcore_debug_symbols=1 include_pulse_audio=0 include_internal_video_render=0 clang=1 "
下载源代码
$ mkdir webrtc-checkout
$ cd webrtc-checkout
$ gclient config https://chromium.googlesource.com/external/webrtc.git@branch-heads/50 --name=src
$ gclient sync --force --with_branch_heads
$ gclient sync --force --with_branch_heads --nohooks
$ cd src
$ git checkout branch-heads/50
生成构建脚本
$ rm -rf ./out/
$ gclient runhooks
编译
$ ninja -C ./out/Release
现在生成完整的Libs&amp;头强>
$ mkdir ../lib/
$ find ./ -name "*.o" -and -not -name do_not_use -and -not -name protoc -and -not -name genperf -exec ar crs ../lib/libwebrtc.a {} +
$ mkdir ../include
$ find ./ -name *.h -exec cp --parents '{}' ../include ';'