Hello Ed!
I've been struggling with similar issues for many-many days and I'm getting quite disappointed... my target is iMX53 (ARMv7).
I have a checkout of 'trunk' dated on 2014-Apr-18 which I've managed to compile both to x86 and ARMv7. This version doesn't have that "gyp: undefined variable android_nkd_root in trunk/third_party/openmap_dl/dl/dl.gyp" issue yet. I wrote my test applications using the native API in C/C++. App A calls app B, app A's microphone signals are transmitted to app B which play it back. Works like a charm - on x86.
However, I could successfully compile to many ARM versions (ARMv6, ARMv7 hfp, ARMv7 sfp, with and without NEON) including the dependencies (there are a lot!), neither of the ARM versions were capable of performing the same task as the x86 version. More precisely, my ARM versions keep on freezing. Using gdb/valgrind to locate the root of the issue I only know that it corrupts the stack for some reason; the source of SIGSEGV is not constant, sometimes Opus, sometimes NetEQ, sometimes something completely different. I'm really not in the mood to debug such a big source code. By the way, I believe it's rather a configuration/compilation issue, but I was still unable to figure it out.
I can also imagine that this project just supports Android and x86 targets and this specific "ARM Linux" is not really maintained, therefore the reasons for the runtime issues. The codebase appears to be under heavy development.
I also would be very happy to get some help. At least a WebRTC developer may tell us an exact version number/stable release we can rely on. Or a WebRTC developer may share the details with us how to correctly compile for Linux (not Android!) ARM target.
Regards,
Tamas
Nice progress. I used to compile the version from ~Apr-18 and it also had an issue with the mentioned function. I also fixed it the similar way you did it now.
As I stated above, I have runtime problems with WebRTC on ARM. I'm curious whether your app or even the test apps will work correctly on your ARM device. My app crashes when SetRemoteDescription or SetLocalDescription (I can't recall it now exactly) is called. Perhaps there's an issue with that <scoped_refptr> and similar stuff since when the crash occurs the stack is usually corrupted.
--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/yzuk8wATMU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guys, the big deal is not to compile WebRTC, but to get it running on ARMv6/ARMv7 :)
Would you be so kind and share with me the results of execution? WebRTC on my machine crashes when reaches SetLocalDescription or SetRemoteDescription call and the stack is totally corrupted. The location of crash is also not constant. Very suspicious...
Guys, the big deal is not to compile WebRTC, but to get it running on ARMv6/ARMv7 :)
Would you be so kind and share with me the results of execution? WebRTC on my machine crashes when reaches SetLocalDescription or SetRemoteDescription call and the stack is totally corrupted. The location of crash is also not constant. Very suspicious...
I have been trying to build webrtc for a Beaglebone Black target, with no Command /usr/bin/python trunk/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0 returned non-zero exit status success so far: it looks like some parts of the build system assume that an ARM target automatically means that we are doing an Android build - namely, openmax_dl.
If I can recall it correctly then I also used to attempt to compile the stable branch, with no success. You'd better avoid using trunk, since I believe it's simply broken and outdated.
Many people would appreciate if there were (at least) partially stable and (fully) compilable releases of WebRTC...
clock_gettime(...) is implemented in librt.so*, that's true, so in principle the solution would be just simply adding "-lrt" to linker flags and it's done.
Unfortunately the situation is not that simple, I've also followed the similar way for the first attempt like you. When you downloaded the precompiled ARM sysroot from Chromium build you did it in order to save on manually recompiling the huge amount of dependencies (libraries (*.so)) needed by WebRTC (glib, xorg packages etc.). The problem is that your cross compiler is not the exact same as the one which was used to compile Chromium sysroot. Apparently the libc version also differs in your toolchain and in the Chromium sysroot. So now you have a couple of precompiled binaries which tie to glibc-x.y, while your compiler attempts to tie to glibc-x.z. There are runtime linking dependencies in Chromium libs as well (like clock_gettime), your compiler wants to satisfy them by linking to your libs and it causes problems.
In many cases using this precompiled Chromium sysroot can work, but it has a lot of pitfalls and you have to be quite prepared developer to overcome these.
I've finally chosen to compile all the dependencies. It took ~1.5 days to collect the packages, find the correct configuration options, compile etc but the issues described by you have gone away.
Copy from Raspberry to ~/webrtcrpi/trunk/arm-sysroot folders:
lib/
include/
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
But the unrecognized flags problem still appears.
It seems to be related to system software installation, maybe version compatibility on the cross compilers vs webrtc flags.
If anybody knows a solution to this point...
I may add some recommendations on the system used for cross compiling :
prefer a virtualized Lubuntu14.04 64bit on at least 20Gb virtual drive space :
_Lubuntu is fast to use when virtualized and it is based on ubuntu which is necessary since installation scripts rely on ubuntu software packages names
_64bit is necessary since scripts like install-build-deps.sh expect 64bit system and install specific 32bit libraries
_20Gb at least because standard (non cross compiling) webrtc requires at least 10Gb but when adding all cross compiling stuff, drive space explodes !
Hope it starts to help.
Anyone can complete the last step ?
Regards.
gyp: name 'arm_arch' is not defined while evaluating condition 'clang==1 and arm_arch!="" and OS!="android"' in all.gypexport GYP_DEFINES="OS=linux target_arch=arm arm_version=5"On my side i will switch to ubuntu 14.04 for the cross compilation and i m sort of confident that it will work ...
stay tuned and thanksthanks, i now test from a clean install.necessary too?then isHi, as i understand your suggestion, target_os including 'android' is only usefull to fetch ndroid_tools (but now, we have to ger it separetely).so, no more need to add it ?
source ./build/android/envsetup.sh
--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/yzuk8wATMU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
--Alexandre BENOIT,
Associate Professor / Maître de Conférence
Image processing and visual scene classification,
LISTIC Lab / IUT Annecy
https://sites.google.com/site/benoitalexandrevision/
target_os = ['android', 'linux']
GYP_DEFINES=OS=linux target_arch=arm arm_version=7 arm_neon=0 arm_float_abi=hard clang=0 werror=
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/yzuk8wATMU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
...
['clang==0', {
'include_dirs': [
'<(DEPTH)/arm-sysroot/usr/include',
'<(DEPTH)/arm-sysroot/usr/include/arm-linux-gnueabihf',
'<(DEPTH)/arm-sysroot/usr/lib/arm-linux-gnueabihf',
],
...--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/yzuk8wATMU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
ssy@cj:~/cj$ gclient config http://webrtc.googlecode.com/svn/trunk
ssy@cj:~/cj$ echo "target_os = ['android', 'unix']" >> .gclientssy@cj:~$ vi .bashrc
export JAVA_HOME=`pwd`/cj/jdk1.7.0_71
export PATH=`pwd`/cj/depot_tools:$JAVA_HOME/bin:"$PATH"
ssy@cj:~/cj$ gclient sync --revision 7244
.....
Syncing projects: 100% (3/3), done.
ssy@cj:~/cj/trunk$ ./build/install-build-deps.shssy@cj:~$ vi .bashrc
export GYP_DEFINES="OS=linux target_arch=arm arm_version=7 arm_neon=0 arm_float_abi=hard clang=0 werror="
export CC_host=gcc
export CXX_host=g++ssy@cj:~/cj$ ln -s trunk/build buildssy@cj:~/cj/trunk$ ./build/linux/install-arm-sysroot.py
Installing ARM root image: /home/ssy/cj/trunk/arm-sysroot
######################################################################## 100.0%
ssy@cj:~/cj$ vi trunk/chromium/src/third_party/openmax_dl/dl/dl.gyp
{
'variables' : {
# Override this value to build with small float FFT tables
'android_ndk_root' : '/home/ssy/cj/trunk/third_party/android_tools/ndk',
'big_float_fft%' : 1,
},
'targets': [ssy@cj:~/cj$ vi trunk/build/common.gypi
['clang==0 and host_clang==1', {
'target_conditions': [
['_toolset=="host"', {
'cflags_cc': [ ], # [ '-std=gnu++11', ],
}],
],
}],
['chromium_code==1', {
# Non-chromium code is not guaranteed to compile cleanly
# with _FORTIFY_SOURCE. Also, fortified build may fail
# when optimizations are disabled, so only do that for Release
# build.
'defines': [
# '_FORTIFY_SOURCE=2',
],
['OS=="linux" or OS=="android"', {
'target_conditions': [
['_toolset=="target"', {
'cflags': [
'-U_FORTIFY_SOURCE',
'<@(release_extra_cflags)',
],
'conditions': [
['enable_resource_whitelist_generation==1', {
'cflags': [
'-Wunknown-pragmas -Wno-error=unknown-pragmas',
'clang_warning_flags': [
#'-Wheader-hygiene',
# Don't die on dtoa code that uses a char as an array index.
# This is required solely for base/third_party/dmg_fp/dtoa.cc.
'-Wno-char-subscripts',
# TODO(thakis): This used to be implied by -Wno-unused-function,
# which we no longer use. Check if it makes sense to remove
# this as well. http://crbug.com/316352
'-Wno-unneeded-internal-declaration',
# Warns on switches on enums that cover all enum values but
# also contain a default: branch. Chrome is full of that.
'-Wno-covered-switch-default',
# Warns when a const char[] is converted to bool.
#'-Wstring-conversion',ssy@cj:~/cj/trunk/webrtc/system_wrappers/source$ vi cpu_features.cc
uint64_t WebRtc_GetCPUFeaturesARM(void) {
return kCPUFeatureARMv7; // Or whatever reflects your hardware
}ssy@cj:~/cj$ gclient runhooks --forcessy@cj:~/cj/trunk$ ninja -C out/Release peerconnection_server
ninja: Entering directory `out/Release'
[168/168] LINK peerconnection_server
ssy@cj:~/cj/trunk$
ssy@cj:~/cj/trunk$ ninja -C out/Release peerconnection_client
ninja: Entering directory `out/Release'
[1536/1536] LINK peerconnection_client--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/yzuk8wATMU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.