-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Builtin Test Audio Module #11
Conversation
linux-x64 build may broken. #2 (comment) on linux-x64, building ec0ea06 fails:
Reverting part of d4aceff fixes this fail on linux-x64.
|
1 similar comment
linux-x64 build may broken. #2 (comment) on linux-x64, building ec0ea06 fails:
Reverting part of d4aceff fixes this fail on linux-x64.
|
Everything was working well on darwin but not on linux yes (for build), was debugging at the same time as you ! @nakagawa424 can you publish a small pr that point to this one with your fix please 🙏 |
@nakagawa424 @MatthD I've updated this PR with the script to download the sysroot on Linux, do you mind testing if it works for you? |
I am testing on darwin/linux right now ;) seems not able to compile via npm run build on docker via linux arm 64 I had too pass |
So for linux-x64 it's ok it build Running cmake-js build
info TOOL Using Ninja generator, because ninja is available.
info CMD BUILD
info RUN [ 'cmake', '--build', '/app/build-linux-arm64', '--config', 'Release' ]
[7/106] Performing update step for 'project_depot_tools'
Previous HEAD position was a7c97f78 Roll recipe dependencies (trivial).
HEAD is now at 4eaefabc Roll recipe dependencies (trivial).
[13/106] Performing configure step for 'project_libwebrtc'
FAILED: external/libwebrtc/stamp/project_libwebrtc-configure /app/build-linux-arm64/external/libwebrtc/stamp/project_libwebrtc-configure
cd /app/build-linux-arm64/external/libwebrtc/build/Release && /usr/bin/cmake -E env BINARY_DIR=/app/build-linux-arm64/external/libwebrtc/build/Release DEPOT_TOOLS=/app/build-linux-arm64/external/depot_tools/src "GN_GEN_ARGS=rtc_build_examples=false rtc_use_x11=false rtc_enable_protobuf=false rtc_include_pulse_audio=false rtc_include_tests=false use_lld=false use_custom_libcxx=false target_cpu=\"arm64\" rtc_build_tools=true is_debug=false" SOURCE_DIR=/app/build-linux-arm64/external/libwebrtc/download/src /app/scripts/configure-webrtc.sh && /usr/bin/cmake -E touch /app/build-linux-arm64/external/libwebrtc/stamp/project_libwebrtc-configure
export PATH=$DEPOT_TOOLS:$PATH
cd ${SOURCE_DIR}
if [ "$TARGET_ARCH" == "arm" ]; then
python build/linux/sysroot_scripts/install-sysroot.py --arch=arm
elif [ "$TARGET_ARCH" == "arm64" ]; then
python build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
else
python build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
fi
Installing Debian sid arm64 root image: /app/build-linux-arm64/external/libwebrtc/download/src/build/linux/debian_sid_arm64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2befe8ce3e88be6080e4fb7e6d412278ea6a7625/debian_sid_arm64_sysroot.tar.xz
# NOTE(mroberts): Running hooks generates this file, but running hooks also
# takes too long in CI; so do this manually.
(cd build/util && python lastchange.py -o LASTCHANGE)
/app/build-linux-arm64/external/libwebrtc/download/src/build/util/lastchange.py:307: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
lastchange_year = datetime.datetime.utcfromtimestamp(
gn gen ${BINARY_DIR} "--args=${GN_GEN_ARGS}"
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
ninja: build stopped: subcommand failed.
ERR! OMG Process terminated: 1
/app/scripts/build-from-source.js:41
throw new Error("cmake-js build failed for wrtc"); I am using UPDATE: Result is similar with a full ubuntu arm 64 image python src/tools/clang/scripts/update.py
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-14-init-1002-gb5e470aa-1.tgz .......... Done.
rm -f webrtc
ln -s src webrtc
[21/114] Performing configure step for 'project_libwebrtc'
FAILED: external/libwebrtc/stamp/project_libwebrtc-configure /home/app/build-linux-arm64/external/libwebrtc/stamp/project_libwebrtc-configure
cd /home/app/build-linux-arm64/external/libwebrtc/build/Release && /usr/bin/cmake -E env BINARY_DIR=/home/app/build-linux-arm64/external/libwebrtc/build/Release DEPOT_TOOLS=/home/app/build-linux-arm64/external/depot_tools/src "GN_GEN_ARGS=rtc_build_examples=false rtc_use_x11=false rtc_enable_protobuf=false rtc_include_pulse_audio=false rtc_include_tests=false use_lld=false use_custom_libcxx=false target_cpu=\"arm64\" rtc_build_tools=true is_debug=false" SOURCE_DIR=/home/app/build-linux-arm64/external/libwebrtc/download/src /home/app/scripts/configure-webrtc.sh && /usr/bin/cmake -E touch /home/app/build-linux-arm64/external/libwebrtc/stamp/project_libwebrtc-configure
export PATH=$DEPOT_TOOLS:$PATH
cd ${SOURCE_DIR}
if [ "$TARGET_ARCH" == "arm" ]; then
python build/linux/sysroot_scripts/install-sysroot.py --arch=arm
elif [ "$TARGET_ARCH" == "arm64" ]; then
python build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
else
python build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
fi
Installing Debian sid arm64 root image: /home/app/build-linux-arm64/external/libwebrtc/download/src/build/linux/debian_sid_arm64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2befe8ce3e88be6080e4fb7e6d412278ea6a7625/debian_sid_arm64_sysroot.tar.xz
# NOTE(mroberts): Running hooks generates this file, but running hooks also
# takes too long in CI; so do this manually.
(cd build/util && python lastchange.py -o LASTCHANGE)
gn gen ${BINARY_DIR} "--args=${GN_GEN_ARGS}"
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
ninja: build stopped: subcommand failed.
ERR! OMG Process terminated: 1
/home/app/scripts/build-from-source.js:41
throw new Error("cmake-js build failed for wrtc");
^
Error: cmake-js build failed for wrtc
at main (/home/app/scripts/build-from-source.js:41:11)
at Object.<anonymous> (/home/app/scripts/build-from-source.js:50:3)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v20.12.2
root@5b265b95b365:/home/app |
FROM ubuntu:22.04
USER root
WORKDIR /home/app
COPY . .
RUN apt-get update
RUN apt-get -y install curl gnupg g++ gcc make cmake build-essential ninja-build python3 python-is-python3 gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static qemu-system-i386 qemu-system-arm qemu-system-mips qemu-efi-aarch64 qemu-kvm
RUN apt-get install -y \
apparmor \
automake \
bash-completion \
build-essential \
cmake \
curl \
g++ \
gcc \
git \
iptables \
jq \
libapparmor-dev \
libc6-dev \
libcap-dev \
libsystemd-dev \
libyaml-dev \
mercurial \
net-tools \
parallel \
pkg-config \
golang-go \
iproute2 \
iputils-ping \
vim-common \
vim \
wget \
curl \
--no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Install Mantatory tools (curl git python3) and optional tools (vim sudo)
RUN apt-get update && \
apt-get install -y curl git lsb-release python3 git file vim sudo && \
rm -rf /var/lib/apt/lists/*
# Configure git for safe.directory
RUN git config --global --add safe.directory /depot_tools
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get -y install nodejs
RUN node -p "process.arch"
RUN mkdir /app
ENV SKIP_DOWNLOAD=true
# ENV CC=clang
RUN npm install
CMD ["sleep","3600"] The I just run the image, exect in it and |
@MatthD The issues with building libwebrtc on Arm Linux are unique to the WebRTC codebase, not to this. I don't think there's much I can do about this unfortunately. I'm going to close the PR for now, if you'd like help setting up a cross-compile environment please see #3 and https://github.com/WonderInventions/node-webrtc/blob/d567298049d8e6efd2a4a4d9ff0d6658476adb9f/toolchains/linux-arm64.toolchain . I do realize the docs are a bit lacking in that regard, sorry about that... |
hey @duvallj thanks for this ! yes did not realize because the build are present for arm64 on 0.7.2. |
Today I've been trying to build
When it says:
I'm not quite sure what it's referring to. I potentially could be missing a dependency that's causing this to fail, if someone could give me a pointer I'd be very grateful! Thanks! |
Hi @duvallj, Thank you very much for getting back to me, no worries and thanks for sharing the commit to hopefully fix it. I tried cherry picking
It looks like it's trying to pull some dependencies relating to macOS/Darwin (I see Xcode mentioned, which might be something?) I have a bit of an odd setup trying to build this which might be related, I'm on an M1 Mac, but want to build for Linux x64 (for AWS Lambda). I'm using Docker to launch a container, the
And I then do:
I do a tiny bit of local config in the container to setup my Git credentials, but that's it. Would you still expect this issue to be present? I'm wondering maybe there's another dependency I'm missing? The good news with this is when running Thank you very much for your help, please let me know if there's anything else you'd like me to test or if there's any more information I can provide. |
Sounds like the python installation is missing setuptools. Not quite sure how that happens since it should be using the depot_tools python, but would you humor me by trying I am still worried about it trying to do Mac stuff inside a docker container though... |
How did I miss that?! 🤦 Thank you @duvallj 🙌 I'm on it now! Thanks very much for the suggestion, I'll report back when I have an update 👍 |
Okay it got way further! 🥳 Which is fantastic news, unfortunately right at the end of building I hit this error:
I think this is probably caused by me not having The other issued seemed to be I'm going to check if I have |
Actually I don't think it was |
Okay good and bad news 😅 (mostly good!) I've been able to get things to build!! 🥳 The one last change I needed to make was to install After running this script, and then running
🕺 Huge thanks for your help in getting to this stage, I just need to now upload this executable and |
You have to note that on my side this PR did broke the audio quality, maybe the owner has fixed it if the dev branch ! I did uploaded those artifact on my side for linux/darwin arm64 and x64 for both https://www.npmjs.com/package/@avahq/wrtc Thanks to everyone helping on all this node-webrtc ;) |
@MatthD This should also fix #2 ; do you mind testing this locally? I've also cherry-picked your other relevant changes from #10