-
Notifications
You must be signed in to change notification settings - Fork 191
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
Linux: Support ARM architecture #5
Comments
The porting to cmake was a great job, however we lack ARM support. I'm willing to take on the task if provided some indication where to start as I'm fairly new to chromium and webrtc. |
Should be done easily for this weekend, hoping I can find some time for it. I have to make sure that the Android dependencies are included inside the aisouard/libwebrtc-chromium-deps repository ( https://github.com/aisouard/libwebrtc-chromium-deps ) |
Okay, would it also work for a rasperry pi, nvidia jetson and other SBC? |
It could for Raspberry Pi if we can add these steps inside CMake: https://github.com/mpromonet/webrtc-streamer/wiki/Cross-compile-WebRTC-for-Raspberry-Pi Not sure for the others, I hope that we would just have to change some values depending on these. |
The only maintained webrtc builds are for linux ARM, iOS and android. Anything else, you are on your own. You can look at tutorials, but they are likely outdated. for arm on android, linux or iOS, you have to change two GN flags: target_os and target_cpu. see the following pages for more info: The link axel gave for raspberry pie pre-date GN, it won t work with depot_tool. |
@agouaillard thanks very much it worked for the target linux arm :). I managed to compile the sample code too. Though I had to disable the tests for rtc otherwise it runs into an llvm bug 😕 @aisouard gclient is throwing some errors at me :/ |
copy the error messages, maybe we can help.
…On Fri, Jan 20, 2017 at 9:31 AM, Nolaan ***@***.***> wrote:
@agouaillard <https://github.com/agouaillard> thanks very much it worked
for the target linux arm :). I managed to compile the sample code too.
Though I had to disable the tests for rtc otherwise it runs into an llvm
bug 😕
Thanks also for the blog posts, they got me that far 👍
@aisouard <https://github.com/aisouard> gclient is throwing some errors
at me :/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAT1nqMlYrvUT95m-EWpKdJ8ddDAmGG9ks5rUA5VgaJpZM4KWuIA>
.
--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------
sg.linkedin.com/agouaillard
-
|
Android support done, need to test with a CMake Android toolchain. @Nolaan, feel free to tell me if it's working out of the box for Raspberry Pi, or if extra steps are required, such as specifying an ARM toolchain instead of just doing |
Does not build for arm, had to do: |
Great find! I'll fix it once I find the time for it, ARM support is planned in the next release. |
Also package is not good, if you try it to install on armbian |
Adding into CPackConfig.cmake SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf") solved the problem, deb can be installed on armbian |
Looks like LibWebRTC.pc is not distributed in package |
It's not added yet since I'm not sure about rpm/deb package structure and absolute paths. |
Armbian and ubunut have /usr/lib/pkgconfig/ |
Man pkg-config says: |
What about the default lib directory ? CMake's default prefix seems to be |
You also have to adapt LibWebRTC.pc as it contains for Libs: |
I see, the directory is the same, depending on the target. |
Deb package it creates for arm have library in /usr/lib even my cmake is my own build and installed in /usr/local. Also headers are in /usr/include/webrtc But, deb contains also /usr/local/src/libwebrtc/out/lib/cmake/LibWebRTC with 3 *.cmake files, guess those are wrong, but not so familiar with cmake to tell where it should go. |
Also rc file contains -I/usr/local/include, for deb package is not needed |
To build latest webrtc master I had to remove libjingle_peerconnection target in webrtc/build/CMakeFiles/webrtc-build.dir/build.make |
this is a temporary file you are trying to modify....
…On Mon, Apr 3, 2017 at 2:53 PM, 9a4gl ***@***.***> wrote:
To build latest webrtc master I had to remove libjingle_peerconnection
target in
webrtc/build/CMakeFiles/webrtc-build.dir/build.make
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAT1njOhzg_fNf6-G5WDlotnVqpr3Nn8ks5rsKxwgaJpZM4KWuIA>
.
--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------
sg.linkedin.com/agouaillard
-
|
I know, my point was this target is probably removed in newer webrtc releases and we have to adapt to this change |
Another issue, related to ARM. Linking application with libwebrtc.a fails on armbian complaining a lot about missing protobuf. Linking with system one (protobuf or protobuf-lite) does not help. |
I'm not used to ARM at all, I just have a raspberry pi 2 model B, but I'd gladly work on its support as soon as I can. In the meantime, could you please state the toolchain you're using so I can setup Travis to build for ARM efficiently ? Would that one be enough: https://github.com/raspberrypi/tools ? I also hope that it won't take a lot of time to boot QEMU with an ARM image to test the library under Travis. |
Well, I just bought Orange Pi Zero few days ago and started to play with it. I bought the smallest one as it has to fit in my electric rack to control light in house :) I have installed Armbian (Ubuntu Xenial). I wanted also to run webrtc-streamer on it, to show camera on webpage next to buttons to controll lights. So far failed with webrtc on arm. I think libwebrtc use toolchain from ./webrtc/src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm. Should I use something else, I have no idea. But so far I am experiencing crashes relaeted to stdlib (stl) in calls between webrtc-streamer and libwebrtc. Looks stl on ubuntu xeinal is not compatible with one linked with libwebrtc. |
I prepared sysroot based on ubuntu xenial, is there an easy way to tell libwebrtc build system to use my sysroot ? |
I was going to suggest you to replace the whole downloaded sysroot folder inside the Some In the meantime, you can add these arguments to
Don't forget to check if you need the neon stuff. === Looks like these arguments are ignored, we have to put these inside Last attempt:
args.gn file:
Getting
Perhaps the ARM dependencies are required. |
I noticed you have sometimes bcm2708 and sometimes bcm27080 in path, check you do not have issues bacause of this typo. I do not have cortex-a7 and bcm2708, so I am afraid I cannot use sysroot as you. My device has allwinner A2+ cpu. I even created ubuntu xenial sysroot, built with it and still have crashes related to stl. I think I will give up, until someone smarter finds solution. |
You mentioned about the Orange Pi Zero, that's why I thought about using cortex-a7 as an example. I'll have more time to build a sysroot during this week, it looks like I'll have to find a microSD card to boot my raspberry pi, install the required development packages such as gtk, then copy all files on my machine. I want this to be done. |
Just in case you already do not know, you cannot build webrtc on arm. Build system do not support that and if you try it will soon tell you that. Only way is crosscompile. |
Testing under branch arm-support, needs to use an arm gnueabi gcc linker for the static libs. Got the unit tests working under Raspberry Pi 2, using the provided sysroot located inside the Built with the following command
/proc/cpuinfo contents
/etc/issue contents
uname -a contents
It seems that BoringSSL does not support ARMv6, I'll try again and see if I can let the developer provide an external SSL library like WolfSSL. |
Attaching rtc_pc_unittests.zip in case someone is interested. |
Compiled it successfully for ARMv6
BoringSSL is failing because of these lines inside
I have to remove these for now, or use an external sysroot. Maybe I can find a workaround, like specifying the same sysroot in a way that it won't check the value of the |
@aisouard Could you please upload your libwebrtc.a for raspberry pi 1 somewhere? It's impossible for me to get it to build. |
I also had quite some difficulties building for ARM (odroid sbc with ubuntu 18.04), this is how I got the code to at least crosscompile:
Protobuf is disabled because enabling it tries to run an executable that was build for ARM on the compiling machine for some reason (I have no idea if/how this affects functionality). Dont treat warnings as errors because newer versions of GCC give a couple of extra warnings. Inspiration: https://github.com/mpromonet/webrtc-streamer/wiki/Cross-compile-WebRTC-for-Raspberry-Pi
Unfortunalely, the result still does not seem to work properly. Using the result caused segfaults and allocation errors.. I also tried building on the ARM machine itself, but Maybe I will try with some newer versions, because I'm personally only interested in datachannels and apparently v63 has some way of only building those and leaving out the media stuff.. |
I would like to build libwebrtc, for use with node-webtrc, to run on Raspberry Pi 3 B+ (armv7), on the latest raspbian stretch OS. I tried a couple variations of instructions for building this, but have not had any luck. I get errors about finding not sysroot for jesse. Even if I had a working jesse sysroot for the build to reference, would a lib built for that be able to run on stretch? Would the most reliable thing be to link sysroot directly to a running pi using sshfs, as described here? |
I've made some progress with using sshfs on the Rpi3 B+, but I've reached another error that I'm not sure about. My steps to reproduce are as follows. Checkout libwebrtc and made branch
(no conflicts) Created sshfs mount point, pointing to my raspberry pi 3 running raspbian stretch
Note there are two paths listed for Appended lines to my
I wanted to see if I got the same errors as @RemcoTukker before disabling I also edited
My call to cmake is:
Using version 60 since that's what I couldn't figure out how to override the sysroot related variables from outside of the webrtc project, so I have to run make, let it fail, then replace my
Basically simplified hardcoded values for target_sysroot and sysroot. I know this is all terribly hacky, is there some more proper way to override these? I'm really unfamiliar with this build system. I think that's all the relevant changes I had to make to get this far. And the output I get now is:
It feels like I'm close. Not sure what the |
Hey @thehans -- I was wondering if you were able to get this working. |
No description provided.
The text was updated successfully, but these errors were encountered: