From 26cae9d18f3c87d162553244fe4dc41a8e2a892a Mon Sep 17 00:00:00 2001 From: Yuxuan Kuang <1535820963@qq.com> Date: Wed, 10 May 2023 20:10:57 +0800 Subject: [PATCH 1/6] add proxy --- Makefile | 6 +++--- dockers/Dockerfile.compile | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 70e88127ad..75a3c5fc5e 100644 --- a/Makefile +++ b/Makefile @@ -20,13 +20,13 @@ gn_flags := --args='is_debug=false' all: init sync app release init: - docker build dockers --build-arg UID=$(shell id -u) --build-arg GUID=$(shell id -g) -f $(build_dockerfile) -t $(compile_docker) + docker build dockers --build-arg UID=$(shell id -u) --build-arg GUID=$(shell id -g) -f $(build_dockerfile) -t $(compile_docker) --network host release: docker build $(target_dir) -f $(release_dockerfile) -t $(release_docker) sync: - docker run $(docker_flags) $(compile_docker) \ + docker run --network host $(docker_flags) $(compile_docker) \ make docker-$@ \ output_dir=$(output_dir) \ gn_flags=$(gn_flags) @@ -34,7 +34,7 @@ sync: app: peerconnection_serverless peerconnection_serverless: - docker run $(docker_flags) $(compile_docker) \ + docker run --network host $(docker_flags) $(compile_docker) \ make docker-$@ \ output_dir=$(output_dir) \ target_lib_dir=$(target_lib_dir) \ diff --git a/dockers/Dockerfile.compile b/dockers/Dockerfile.compile index e207f3339c..b3c06a1be9 100644 --- a/dockers/Dockerfile.compile +++ b/dockers/Dockerfile.compile @@ -15,6 +15,9 @@ RUN useradd ${USER} -l -u ${UID} -g ${GUID} -m -s /bin/bash || true ARG DEPOT_TOOLS=/opt/depot_tools ARG DOCKER_WORKDIR=/app/AlphaRTC/ +ENV HTTP_PROXY "http://127.0.0.1:15777" +ENV HTTPS_PROXY "http://127.0.0.1:15777" + RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ${DEPOT_TOOLS} RUN chown ${USER} -R ${DEPOT_TOOLS} ENV PATH="${DEPOT_TOOLS}/:${PATH}" From 2431c7ff5c111287d8edd5b9100534d9026050f2 Mon Sep 17 00:00:00 2001 From: Yuxuan Kuang <1535820963@qq.com> Date: Wed, 10 May 2023 22:58:37 +0800 Subject: [PATCH 2/6] install ninja --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 75a3c5fc5e..cf2280dd02 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ sync: app: peerconnection_serverless peerconnection_serverless: + apt install ninja-build docker run --network host $(docker_flags) $(compile_docker) \ make docker-$@ \ output_dir=$(output_dir) \ From 6af1725117c2cdf44ff4835db5f18707da3ec2b0 Mon Sep 17 00:00:00 2001 From: Yuxuan Kuang <1535820963@qq.com> Date: Thu, 11 May 2023 09:30:04 +0800 Subject: [PATCH 3/6] successfully compile --- .gclient_previous_sync_commits | 1 + Makefile | 1 - dockers/Dockerfile.compile | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gclient_previous_sync_commits diff --git a/.gclient_previous_sync_commits b/.gclient_previous_sync_commits new file mode 100644 index 0000000000..732d1093de --- /dev/null +++ b/.gclient_previous_sync_commits @@ -0,0 +1 @@ +{".": "2431c7ff5c111287d8edd5b9100534d9026050f2", "src/buildtools": "204a35a2a64f7179f8b76d7a0385653690839e21", "src/buildtools/clang_format/script": "96636aa0e9f047f17447f2d45a094d0b59ed7917", "src/buildtools/third_party/libunwind/trunk": "d999d54f4bca789543a2eb6c995af2d9b5a1f3ed", "src/buildtools/third_party/libc++abi/trunk": "196ba1aaa8ac285d94f4ea8d9836390a45360533", "src/build": "f70e3b9685e03176b131ef03d185ba367e981c1d", "src/base": "e6c0c5b9adccfbc6d1f810cf15b300c3ce19107b", "src/testing": "5a5fb44e80d7fa2a1bb7c86467d7217335e6bae8", "src/tools": "b64de32dc94866c1446065a6ce8703c856dd518b", "src/tools/swarming_client": "160b445a44e0daacf6f3f8570ca2707ec451f374", "src/buildtools/third_party/libc++/trunk": "d9040c75cfea5928c804ab7c235fed06a63f743a", "src/third_party": "57686d64cb3c949799993d7732c981c64d9d47f4", "src/third_party/gtest-parallel": "df0b4e476f98516cea7d593e5dbb0fca44f6ee7f", "src/third_party/libFuzzer/src": "debe7d2d1982e540fbd6bd78604bf001753f9e74", "src/third_party/colorama/src": "799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8", "src/third_party/lss": "f70e2f1641e280e777edfdad7f73a2cfa38139c7", "src/third_party/ced/src": "ba412eaaacd3186085babcd901679a48863c7dd5", "src/third_party/libsrtp": "650611720ecc23e0e6b32b0e3100f8b4df91696c", "src/third_party/fontconfig/src": "452be8125f0e2a18a7dfef469e05d19374d36307", "src/third_party/usrsctp/usrsctplib": "a8c51df76caae94254b1e59999405f739467490e", "src/third_party/nasm": "4fa54ca5f7fc3a15a8c78ac94688e64d3e4e4fa1", "src/third_party/freetype/src": "3f70e6d20c82b28174096adcd0657b3c998b007b", "src/third_party/jsoncpp/source": "645250b6690785be60ab6780ce4b58698d884d11", "src/third_party/libjpeg_turbo": "7e3ad79800a7945fb37173149842b494ab8982b2", "src/third_party/depot_tools": "30ef5cb43761b8536b071a26ca59fca17e6a7de6", "src/third_party/breakpad/breakpad": "2ffe116322aa4373d408a72b665fa7fe7a504d4a", "src/third_party/libyuv": "6afd9becdf58822b1da6770598d8597c583ccfad", "src/third_party/googletest/src": "a09ea700d32bab83325aff9ff34d0582e50e3997", "src/third_party/libvpx/source/libvpx": "77960f37b3d328cf7552f6cd69a083f4005aed7b", "src/third_party/harfbuzz-ng/src": "100d40c827eb8336b2b671856f151275d47e71ad", "src/third_party/openh264/src": "a5473711f3e20c6bd1c33d81b6c7b9a0618aa18f", "src/third_party/ffmpeg": "587a3f48499df05d3c65f1529fd08b0783217b39", "src/third_party/boringssl/src": "a810d82575ecbde26406fa583371f807f8721ed7", "src/third_party/catapult": "087cffcba472d70f3d0b1115d0b9100c365073d1", "src/third_party/libaom/source/libaom": "c810066815b80dd1ac8ade15170ce962d6646368", "src/third_party/icu": "f2223961702f00a8833874b0560d615a2cc42738"} \ No newline at end of file diff --git a/Makefile b/Makefile index cf2280dd02..75a3c5fc5e 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,6 @@ sync: app: peerconnection_serverless peerconnection_serverless: - apt install ninja-build docker run --network host $(docker_flags) $(compile_docker) \ make docker-$@ \ output_dir=$(output_dir) \ diff --git a/dockers/Dockerfile.compile b/dockers/Dockerfile.compile index b3c06a1be9..3ce7c4a39a 100644 --- a/dockers/Dockerfile.compile +++ b/dockers/Dockerfile.compile @@ -18,6 +18,7 @@ ARG DOCKER_WORKDIR=/app/AlphaRTC/ ENV HTTP_PROXY "http://127.0.0.1:15777" ENV HTTPS_PROXY "http://127.0.0.1:15777" +RUN apt install ninja-build RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ${DEPOT_TOOLS} RUN chown ${USER} -R ${DEPOT_TOOLS} ENV PATH="${DEPOT_TOOLS}/:${PATH}" From 2178038280b4247d5ea45797db24009f2de79859 Mon Sep 17 00:00:00 2001 From: Yuxuan Kuang <1535820963@qq.com> Date: Sun, 14 May 2023 17:07:30 +0800 Subject: [PATCH 4/6] debug for timeout error --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75a3c5fc5e..1e3a147cab 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ gn_flags := --args='is_debug=false' all: init sync app release init: - docker build dockers --build-arg UID=$(shell id -u) --build-arg GUID=$(shell id -g) -f $(build_dockerfile) -t $(compile_docker) --network host + docker build dockers --network host --build-arg UID=$(shell id -u) --build-arg GUID=$(shell id -g) -f $(build_dockerfile) -t $(compile_docker) release: docker build $(target_dir) -f $(release_dockerfile) -t $(release_docker) From 59c82fe16f765f0c37f4661af469c10cebeb32f9 Mon Sep 17 00:00:00 2001 From: Yuxuan Kuang <1535820963@qq.com> Date: Sun, 14 May 2023 17:16:49 +0800 Subject: [PATCH 5/6] mod docs --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9529ed53f7..a2c519353b 100644 --- a/README.md +++ b/README.md @@ -84,12 +84,22 @@ To compile AlphaRTC, please refer to the following steps 3. Build Docker images - ``` shell - cd AlphaRTC - make all - ``` - - You should then be able to see two Docker images, `alphartc` and `alphartc-compile` using `sudo docker images` + 1. Change line 18, 19 of `AlphaRTC/dockers/Dockerfile.compile` to [your own proxy port](https://github.com/alanhg/others-note/issues/503) + + ```Dockerfile + # in `AlphaRTC/dockers/Dockerfile.compile` + ENV HTTP_PROXY "http://127.0.0.1:" + ENV HTTPS_PROXY "http://127.0.0.1:" + ``` + + 2. Compile AlphaRTC (about 10min+) + + ``` shell + cd AlphaRTC + make all + ``` + + You should then be able to see two Docker images, `alphartc` and `alphartc-compile` using `sudo docker images` ### Option 2: Compile from Scratch If you don't want to use Docker, or have other reasons to compile from scratch (e.g., you want a native Windows build), you may use this method. From fada479447276c026270570b168867f8e9650da0 Mon Sep 17 00:00:00 2001 From: Yuxuan Kuang <1535820963@qq.com> Date: Sun, 14 May 2023 19:11:51 +0800 Subject: [PATCH 6/6] mod gitignore --- .gclient_previous_sync_commits | 1 - .gitignore | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .gclient_previous_sync_commits diff --git a/.gclient_previous_sync_commits b/.gclient_previous_sync_commits deleted file mode 100644 index 732d1093de..0000000000 --- a/.gclient_previous_sync_commits +++ /dev/null @@ -1 +0,0 @@ -{".": "2431c7ff5c111287d8edd5b9100534d9026050f2", "src/buildtools": "204a35a2a64f7179f8b76d7a0385653690839e21", "src/buildtools/clang_format/script": "96636aa0e9f047f17447f2d45a094d0b59ed7917", "src/buildtools/third_party/libunwind/trunk": "d999d54f4bca789543a2eb6c995af2d9b5a1f3ed", "src/buildtools/third_party/libc++abi/trunk": "196ba1aaa8ac285d94f4ea8d9836390a45360533", "src/build": "f70e3b9685e03176b131ef03d185ba367e981c1d", "src/base": "e6c0c5b9adccfbc6d1f810cf15b300c3ce19107b", "src/testing": "5a5fb44e80d7fa2a1bb7c86467d7217335e6bae8", "src/tools": "b64de32dc94866c1446065a6ce8703c856dd518b", "src/tools/swarming_client": "160b445a44e0daacf6f3f8570ca2707ec451f374", "src/buildtools/third_party/libc++/trunk": "d9040c75cfea5928c804ab7c235fed06a63f743a", "src/third_party": "57686d64cb3c949799993d7732c981c64d9d47f4", "src/third_party/gtest-parallel": "df0b4e476f98516cea7d593e5dbb0fca44f6ee7f", "src/third_party/libFuzzer/src": "debe7d2d1982e540fbd6bd78604bf001753f9e74", "src/third_party/colorama/src": "799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8", "src/third_party/lss": "f70e2f1641e280e777edfdad7f73a2cfa38139c7", "src/third_party/ced/src": "ba412eaaacd3186085babcd901679a48863c7dd5", "src/third_party/libsrtp": "650611720ecc23e0e6b32b0e3100f8b4df91696c", "src/third_party/fontconfig/src": "452be8125f0e2a18a7dfef469e05d19374d36307", "src/third_party/usrsctp/usrsctplib": "a8c51df76caae94254b1e59999405f739467490e", "src/third_party/nasm": "4fa54ca5f7fc3a15a8c78ac94688e64d3e4e4fa1", "src/third_party/freetype/src": "3f70e6d20c82b28174096adcd0657b3c998b007b", "src/third_party/jsoncpp/source": "645250b6690785be60ab6780ce4b58698d884d11", "src/third_party/libjpeg_turbo": "7e3ad79800a7945fb37173149842b494ab8982b2", "src/third_party/depot_tools": "30ef5cb43761b8536b071a26ca59fca17e6a7de6", "src/third_party/breakpad/breakpad": "2ffe116322aa4373d408a72b665fa7fe7a504d4a", "src/third_party/libyuv": "6afd9becdf58822b1da6770598d8597c583ccfad", "src/third_party/googletest/src": "a09ea700d32bab83325aff9ff34d0582e50e3997", "src/third_party/libvpx/source/libvpx": "77960f37b3d328cf7552f6cd69a083f4005aed7b", "src/third_party/harfbuzz-ng/src": "100d40c827eb8336b2b671856f151275d47e71ad", "src/third_party/openh264/src": "a5473711f3e20c6bd1c33d81b6c7b9a0618aa18f", "src/third_party/ffmpeg": "587a3f48499df05d3c65f1529fd08b0783217b39", "src/third_party/boringssl/src": "a810d82575ecbde26406fa583371f807f8721ed7", "src/third_party/catapult": "087cffcba472d70f3d0b1115d0b9100c365073d1", "src/third_party/libaom/source/libaom": "c810066815b80dd1ac8ade15170ce962d6646368", "src/third_party/icu": "f2223961702f00a8833874b0560d615a2cc42738"} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9ac76d8fac..66e1db0246 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ target/ src/ .gclient_entries +.gclient_previous_sync_commits