Open aisouard opened 7 years ago
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. This can help: https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cross_compiles.md
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: https://webrtc.org/native-code/android/ https://webrtc.org/native-code/ios/
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 😕 Thanks also for the blog posts, they got me that far 👍
@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 notifications@github.com 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 https://github.com/aisouard/libwebrtc/issues/5#issuecomment-273951857, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT1nqMlYrvUT95m-EWpKdJ8ddDAmGG9ks5rUA5VgaJpZM4KWuIA .
sg.linkedin.com/agouaillard
-
Android support done, need to test with a CMake Android toolchain.
Can build for arm64 under Linux with the following command:
cmake -DTARGET_OS="android" -DTARGET_CPU="arm64" ..
@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
cmake -DTARGET_OS="linux" -DTARGET_CPU="arm" ..
Does not build for arm, had to do: ./webrtc/src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm
Great find! I'll fix it once I find the time for it, ARM support is planned in the next release. Thanks.
Also package is not good, if you try it to install on armbian sudo dpkg -i libwebrtc-1.0.0-linux-arm.deb dpkg: error processing archive libwebrtc-1.0.0-linux-arm.deb (--install): package architecture (amd64) does not match system (armhf)
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. Should I hardcode the prefix to "/usr/lib" depending on the Linux distrib ?
Armbian and ubunut have /usr/lib/pkgconfig/
Man pkg-config says: On most systems, pkg-config looks in /usr/lib/pkgconfig, /usr/share/pkgconfig, /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files
What about the default lib directory ?
CMake's default prefix seems to be /usr/local/lib
, I don't remember having any deb or rpm package installing their lib inside /usr/local/lib
, that directory was always empty when I was exclusively installing packages instead of building from source.
You also have to adapt LibWebRTC.pc as it contains for Libs: -L/usr/lib/x86_64-linux-gnu it should be /usr/lib/arm-linux-gnueabihf/ in my case
I see, the directory is the same, depending on the target. I'll maintain a list for .deb first.
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 notifications@github.com 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 https://github.com/aisouard/libwebrtc/issues/5#issuecomment-291078351, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT1njOhzg_fNf6-G5WDlotnVqpr3Nn8ks5rsKxwgaJpZM4KWuIA .
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. But linking with ./webrtc/src/out/Release/obj/third_party/protobuf/libprotobuf_lite.a created with libwebrtc helped. IMO, this libprotobuf_lite.a should be part of libwebrtc.a at least for arm.
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 ?
Is it enough to just focus on gcc-linaro-arm-linux-gnueabihf-raspbian
and gcc-linaro-arm-linux-gnueabihf-raspbian-x64
to support all ARM cpus ? Or are there a lot of variants to take care ?
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 libwertc/out/webrtc/src/build/linux
directory, until I found something interesting over there: https://github.com/kclyu/rpi-webrtc-streamer/blob/master/BUILD_ubuntu.md
Some gn
arguments are very interesting: https://github.com/kclyu/rpi-webrtc-streamer/blob/master/misc/webrtc_build_args.gn
In the meantime, you can add these arguments to gn
with the GN_EXTRA_ARGS
CMake config variable, for instance:
cmake -DGN_EXTRA_ARGS="arm_float_abi=\"hard\" arm_use_neon=true arm_tune=\"cortex-a7\" \
target_sysroot=\"/path/to/rpi_rootfs\" \
system_libdir=\"/path/to/rpi_rootfs/usr/lib/arm-linux-gnueabihf\" \
gold_path=\"/path/to/rpi_rootfs/tools/arm-linux-gnueabihf/bin\"" ..
Don't forget to check if you need the neon stuff.
===
Looks like these arguments are ignored, we have to put these inside build/webrtc/src/out/Release/args.gn
before running gn gen
. I'll try harder tonight.
Last attempt:
cmake -DTARGET_CPU=arm -DGN_EXTRA_ARGS="arm_float_abi=\"hard\" arm_use_neon=true arm_tune=\"cortex-a7\" \
target_sysroot=\"/home/aisouard/libwebrtc/tools/arm-bcm27080/gcc-linaro-arm-linux-gnueabihf-raspbian\"
system_libdir=\"/home/aisouard/libwebrtc/tools/arm-bcm27080/gcc-linaro-arm-linux-gnueabihf-raspbian/lib/gcc/arm-linux-gnueabihf/4.8.3\" \
gold_path=\"/home/aisouard/libwebrtc/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin\" use_sysroot=true is_clang=false host_toolchain=\"//build/toolchain/linux:arm\"" ..
args.gn file:
use_gold = false
target_cpu = "arm"
target_os = "linux"
is_component_build = false
is_debug = false
rtc_include_tests = false
arm_float_abi="hard"
arm_use_neon=true arm_tune="cortex-a7"
target_sysroot="/home/aisouard/libwebrtc/tools/arm-bcm27080/gcc-linaro-arm-linux-gnueabihf-raspbian"
system_libdir="/home/aisouard/libwebrtc/tools/arm-bcm27080/gcc-linaro-arm-linux-gnueabihf-raspbian/lib/gcc/arm-linux-gnueabihf/4.8.3"
gold_path="/home/aisouard/libwebrtc/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
use_sysroot=true
is_clang=false
host_toolchain="//build/toolchain/linux:arm"
Getting
ninja: Entering directory `out/Release'
[1/1] Regenerating ninja files
FAILED: build.ninja
/home/aisouard/libwebrtc/out/webrtc/src/buildtools/linux64/gn --root=/home/aisouard/libwebrtc/out/webrtc/src -q gen .
ERROR at //build/config/linux/pkg_config.gni:85:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /home/aisouard/libwebrtc/out/webrtc/src/out/Release/
Command: python -- /home/aisouard/libwebrtc/out/webrtc/src/build/config/linux/pkg-config.py -s /home/aisouard/libwebrtc/tools/arm-bcm27080/gcc-linaro-arm-linux-gnueabihf-raspbian -a arm --system_libdir /home/aisouard/libwebrtc/tools/arm-bcm27080/gcc-linaro-arm-linux-gnueabihf-raspbian/lib/gcc/arm-linux-gnueabihf/4.8.3 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
Returned 1.
stderr:
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
Package gmodule-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gmodule-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gmodule-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Traceback (most recent call last):
File "/home/aisouard/libwebrtc/out/webrtc/src/build/config/linux/pkg-config.py", line 219, in <module>
sys.exit(main())
File "/home/aisouard/libwebrtc/out/webrtc/src/build/config/linux/pkg-config.py", line 138, in main
prefix = GetPkgConfigPrefixToStrip(args)
File "/home/aisouard/libwebrtc/out/webrtc/src/build/config/linux/pkg-config.py", line 80, in GetPkgConfigPrefixToStrip
env=os.environ)
File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pkg-config', '--variable=prefix', 'glib-2.0', 'gmodule-2.0', 'gobject-2.0', 'gthread-2.0']' returned non-zero exit status 1
See //build/config/linux/BUILD.gn:88:3: whence it was called.
pkg_config("glib") {
^-------------------
See //build/config/compiler/BUILD.gn:159:18: which caused the file to be included.
configs += [ "//build/config/linux:compiler" ]
^------------------------------
ninja: error: rebuilding 'build.ninja': subcommand failed
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 webrtc/src/build/linux/debian_wheezy_arm-sysroot/
folder.
Built with the following command
$ cmake -DTARGET_CPU=arm -DARM_VERSION=7 -DARM_FLOAT_ABI=hard \
-DARM_THUMB=ON -DARM_FPU=neon-vfpv4 ..
/proc/cpuinfo contents
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
/etc/issue contents
Raspbian GNU/Linux 8 \n \l
uname -a contents
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
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
cmake -DTARGET_CPU=arm -DARM_VERSION=6 -DARM_FLOAT_ABI=hard -DARM_FPU=vfp \
-DARM_USE_NEON=OFF -DARM_USE_THUMB=OFF ..
BoringSSL is failing because of these lines inside
third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S
#if defined(__thumb2__) || defined(__clang__)
#define ldrhsb ldrbhs
#endif
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 is_clang
variable.
@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:
sshfs -o idmap=user,follow_symlinks odroid@192.168.2.7:/ /odroid-sshfs-mount/
. I suppose the following also works with one of the supplied sysroots, but didnt try.cmake -DTARGET_CPU=arm -DARM_VERSION=7 -DARM_FLOAT_ABI=hard -DARM_USE_THUMB=ON -DARM_FPU=neon-vfpv4 -DWEBRTC_BRANCH_HEAD=refs/branch-heads/60 ..
CMakeModules/Gn.cmake
, added:
set(_GEN_ARGS ${_GEN_ARGS} system_libdir=\\"/odroid-sshfs-mount/usr/lib/gcc/arm-linux-gnueabihf/8.0.1\\")
set(_GEN_ARGS ${_GEN_ARGS} gold_path=\\"/odroid-sshfs-mount/usr/bin\\")
set(_GEN_ARGS ${_GEN_ARGS} use_sysroot=true)
set(_GEN_ARGS ${_GEN_ARGS} is_clang=false)
set(_GEN_ARGS ${_GEN_ARGS} host_toolchain=\\"//build/toolchain/linux:arm\\")
set(_GEN_ARGS ${_GEN_ARGS} rtc_enable_protobuf=false)
set(_GEN_ARGS ${_GEN_ARGS} treat_warnings_as_errors=false)
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
export PKG_CONFIG_PATH=/odroid-sshfs-mount/usr/lib/arm-linux-gnueabihf/pkgconfig
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 gn.py
uses the gen
executable that is supplied for linux x64 and i couldnt figure out how to get an arm executable there.
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?
https://wiki.dlang.org/GDC/Cross_Compiler/Existing_Sysroot#Sysroot_over_SSH
sshfs -o idmap=user,follow_symlinks user@targethost:/ $SYSROOT
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 arm-support
up to date with dev
:
git checkout arm-support
git rebase dev
(no conflicts)
Created sshfs mount point, pointing to my raspberry pi 3 running raspbian stretch
sudo apt install sshfs
sudo mkdir /rpi3-sshfs-mount
sudo chown `whoami`:`whoami` /rpi3-sshfs-mount
sshfs -o idmap=user,follow_symlinks pi@192.168.1.31:/ /rpi3-sshfs-mount/
export PKG_CONFIG_PATH=/rpi3-sshfs-mount/usr/lib/arm-linux-gnueabihf/pkgconfig:/rpi3-sshfs-mount/usr/share/pkgconfig
Note there are two paths listed for PKG_CONFIG_PATH
, otherwise it would fail on finding xproto.pc which is on the second path on the rpi3.
Appended lines to my CMakeModules/Gn.cmake
set(_GEN_ARGS ${_GEN_ARGS} system_libdir=\\"/rpi3-sshfs-mount/usr/lib/gcc/arm-linux-gnueabihf/6.3.0\\")
set(_GEN_ARGS ${_GEN_ARGS} gold_path=\\"/rpi3-sshfs-mount/usr/bin\\")
set(_GEN_ARGS ${_GEN_ARGS} use_sysroot=true)
set(_GEN_ARGS ${_GEN_ARGS} target_sysroot=\\"/rpi3-sshfs-mount\\")
set(_GEN_ARGS ${_GEN_ARGS} is_clang=false)
set(_GEN_ARGS ${_GEN_ARGS} host_toolchain=\\"//build/toolchain/linux:arm\\")
#set(_GEN_ARGS ${_GEN_ARGS} rtc_enable_protobuf=false)
#set(_GEN_ARGS ${_GEN_ARGS} treat_warnings_as_errors=false)
I wanted to see if I got the same errors as @RemcoTukker before disabling rtc_enable_protobuf
and 'treat_warnings_as_errors' so I commented those lines out. Also is it really necessary to set gold_path
, because it appears use_gold=false
is a default setting anyways? Not sure what "gold" does to be honest.
I also edited /webrtc/CMakeLists.txt.in
, under libwebrtc_command, I replaced the COMMAND
line, which would normally run install-sysroot.py
script, with a do-nothing command:
COMMAND echo skipped
My call to cmake is:
cmake -DTARGET_CPU=arm -DTARGET_OS=linux -DARM_VERSION=7 -DARM_FLOAT_ABI=hard -DARM_USE_THUMB=ON -DARM_FPU=neon-vfpv4 -DWEBRTC_BRANCH_HEAD=refs/branch-heads/60 ..
Using version 60 since that's what node-webrtc
expects as I understand (building node-webrtc
is my end goal).
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 out/webrtc/src/build/config/sysroot.gni
with this:
import("//build/config/chrome_build.gni")
declare_args() {
# The absolute path of the sysroot that is applied when compiling using
# the target toolchain.
target_sysroot = "//rpi3-sshfs-mount"
# The absolute path to directory containing linux sysroot images
use_sysroot = current_cpu != "s390x" && current_cpu != "s390" &&
current_cpu != "ppc64" && current_cpu != "ppc"
}
sysroot = target_sysroot
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:
$ make clean
$ make
[ 4%] Creating directories for 'depot-tools'
[ 8%] Performing download step (git clone) for 'depot-tools'
-- Avoiding repeated git clone, stamp file is up to date: '/home/thehans/libwebrtc/out/depot_tools/src/depot-tools-stamp/depot-tools-gitclone-lastrun.txt'
[ 12%] No patch step for 'depot-tools'
[ 16%] No update step for 'depot-tools'
[ 20%] No configure step for 'depot-tools'
[ 25%] No build step for 'depot-tools'
[ 29%] No install step for 'depot-tools'
[ 33%] Completed 'depot-tools'
[ 33%] Built target depot-tools
[ 37%] Creating directories for 'webrtc-src'
[ 41%] Performing download step (git clone) for 'webrtc-src'
-- Avoiding repeated git clone, stamp file is up to date: '/home/thehans/libwebrtc/out/webrtc/stamp/webrtc-src-gitclone-lastrun.txt'
[ 45%] Performing patch step for 'webrtc-src'
[ 50%] No update step for 'webrtc-src'
[ 54%] Performing configure step for 'webrtc-src'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/thehans/libwebrtc/out/webrtc/build
[ 58%] Performing build step for 'webrtc-src'
[ 14%] Built target webrtc-sync
[ 28%] Built target webrtc-gn
[ 42%] Built target webrtc-clang
[ 57%] Built target webrtc-toolchain
[ 71%] Built target webrtc-clang-format
[ 85%] Generating build files
Done. Made 262 targets from 111 files in 1223ms
[ 85%] Built target webrtc-generate
Scanning dependencies of target webrtc-build
[100%] Running ninja
ninja: Entering directory `out/Release'
[1/2098] CC obj/third_party/boringssl/boringssl/cpu-ppc64le.o
FAILED: obj/third_party/boringssl/boringssl/cpu-ppc64le.o
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/boringssl/boringssl/cpu-ppc64le.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"303369-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBORINGSSL_IMPLEMENTATION -DBORINGSSL_NO_STATIC_INITIALIZER -DOPENSSL_SMALL -D_XOPEN_SOURCE=700 -I../.. -Igen -I../../third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -pthread -mfpu=neon-vfpv4 -mthumb -O2 -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -g0 --sysroot=../../rpi3-sshfs-mount -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -std=c99 -c ../../third_party/boringssl/src/crypto/cpu-ppc64le.c -o obj/third_party/boringssl/boringssl/cpu-ppc64le.o
In file included from ../../third_party/boringssl/src/crypto/cpu-ppc64le.c:15:
In file included from ../../third_party/boringssl/src/include/openssl/cpu.h:64:
../../third_party/boringssl/src/include/openssl/base.h:61:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
^~~~~~~~~~~~~
1 error generated.
[2/2098] CC obj/third_party/boringssl/boringssl/crypto.o
FAILED: obj/third_party/boringssl/boringssl/crypto.o
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/boringssl/boringssl/crypto.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"303369-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBORINGSSL_IMPLEMENTATION -DBORINGSSL_NO_STATIC_INITIALIZER -DOPENSSL_SMALL -D_XOPEN_SOURCE=700 -I../.. -Igen -I../../third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -pthread -mfpu=neon-vfpv4 -mthumb -O2 -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -g0 --sysroot=../../rpi3-sshfs-mount -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -std=c99 -c ../../third_party/boringssl/src/crypto/crypto.c -o obj/third_party/boringssl/boringssl/crypto.o
In file included from ../../third_party/boringssl/src/crypto/crypto.c:15:
In file included from ../../third_party/boringssl/src/include/openssl/crypto.h:18:
../../third_party/boringssl/src/include/openssl/base.h:61:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
^~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
CMakeFiles/webrtc-build.dir/build.make:60: recipe for target 'CMakeFiles/webrtc-build-complete' failed
make[5]: *** [CMakeFiles/webrtc-build-complete] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/webrtc-build.dir/all' failed
make[4]: *** [CMakeFiles/webrtc-build.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/webrtc-src.dir/build.make:112: recipe for target 'webrtc/stamp/webrtc-src-build' failed
make[2]: *** [webrtc/stamp/webrtc-src-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/webrtc-src.dir/all' failed
make[1]: *** [CMakeFiles/webrtc-src.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
It feels like I'm close. Not sure what the sys/types.h
error is about, but it appears to be attempting something related to ppc64
which is definitely not what I want. Any ideas on this?
Hey @thehans -- I was wondering if you were able to get this working.
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.