Compiling WebRTC Linux ARM on Windows Host - linux

I spent 2 days trying to compile WebRTC for Raspbery PI.
I'm on Windows host and there is absolutely zero info in internet how to do this.
Linux WebRTC requires to run sysroot installation script. It just fails on windows due to some tar wrong options.
Somehow I managed to manually run tar though it gave me several hundreds errors regarding some symbolic links creation.
Next error is about some ptoto_library:
ERROR at //build/toolchain/win/BUILD.gn:15:1: Assertion failed.
assert(is_win)
^-----
See //third_party/protobuf/proto_library.gni:413:14: which caused the file to be included.
deps = [ _protoc_label ]
If I disable proto library it fails on compilation because of clang++ is not found.
Is there way to compile WebRTC for Linux from Windows host?
Strange that there is no any info about such possibility at all.

Related

Building Node.js Binary with `pkg` for ARMv7 / Ubuntu 14 fails when running output with libstdc++.so.6 Error

Cross compile? I have a device my company still manufacturers and deploys world-wide, running Ubuntu 14.04.3 ... on an ARMv7 Processor. I have a node app I'm creating for the product family, and I'd like to run it on this device as well. Tried going the whole nvm route to install-and-run node directly on it, but gyphy fails to build some deps from the project locally on the device. I'd really much rather use pkg to build a binary to deploy to the device.
If you aren't familiar, pkg is: https://www.npmjs.com/package/pkg
However, building the examples/express example from the pkg repo with pkg 4.4.9 like pkg . --targets node10.15.3-linux-armv7 --no-bytecode (on a linux box) and scp'ing the resulting binary over to the IOT device running the armv7 / Ubuntu 14 setup, I get the following error when trying to run the binary:
./express-example: relocation error: ./express-example: symbol
_ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE,
version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
(Line wraps added to break long line)
Googling the error (specifically with regards to GLIBC and libstdc++.so.6) has gotten me nowhere. I can't figure out if the libstdc++ on the device is too old or too new. Tried updating libstdc++ but it said it was already at the latest version (for that OS.) I've got no clue where to go from here... Is there some way to compile the binary via pkg with different options, or statically link the libraries it needs instead of relying on system libraries?
Also, when I try to use a newer node version (like 10.21.0, etc) - it fails with an "unable to build" message. I know I can crosscompile regular C/C++ code on that linux box for ARM (we do that currently with Jenkins in the cloud on a linux box), so is there a way to get crosscompile working at buildtime?
Here's the error for building with 10.21:
[root#decidr ~/devel/pkg/examples/express]# ./node_modules/.bin/pkg . --targets node10-linux-armv7 --no-bytecode
> pkg#4.4.9
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v10.21.0-linux-armv7 [ ] 0%
> Error! 404 Not Found
https://github.com/zeit/pkg-fetch/releases/download/v2.6/uploaded-v2.6-node-v10.21.0-linux-armv7
> Asset not found by direct link:
{"tag":"v2.6","name":"uploaded-v2.6-node-v10.21.0-linux-armv7"}
> Not found in GitHub releases:
{"tag":"v2.6","name":"uploaded-v2.6-node-v10.21.0-linux-armv7"}
> Building base binary from source:
built-v10.21.0-linux-armv7
> Error! Not able to build for 'armv7' here, only for 'x64'
I find myself rather stuck - can't run node directly on the device, and the device won't run the pkg-built binary, even though it builds ARMv7 code. No idea how to proceed forward - any assistance or ideas? :)

How to make self-contained or java-bundled JavaFX application package for ARM

Where could I acquire a working copy of compiled JavaFX app bundled with JRE so I could execute this app on ARM linux?
or
How can I create my JavaFX app + JRE bundle that would work on ARM Linux
Best case scenario for me would be to be ableto create copy-paste enabled folder tree or single executable file..
I do understand that this question might be too vague, but I desperately need some help on this. I have spent more than 6 evenings + 2 nights searching how to get a compiled JavaFX application ( .jar file) to run on ARM linux on UDOO (RPi2-like) board.
I have been more of an .NET guy a long time, and now I had to make WPF-like rich UX app that would run on this specific hardware, and I chose JavaFX due to its likeliness to WPF. It does run fine on my desktop PCs but I absolutely can not get it to run on ARM linux.
I am trying to do this too. Did you get it working? My solution is to package the JAR using tools provided by IntelliJ or any other IDE, include the JRE in a folder within the app, then write a script that invokes the JAR from the included JRE like:
lib/jre/bin/java -jar runthis.jar
I also tried it for two days now but didn't get it to work.
I use maven in combination with the javafx-maven-plugin to build native installers of an application.
At first I got the error, that the javafx-ant.jar tools are missing:
[ERROR] Failed to execute goal build-jar(create-jfxjar) on project foo:
Execution create-jfxjar of goal build-jar failed: Plugin javafx-maven-plugin or
one of its dependencies could not be resolved: Could not find artifact
javafx-packager:javafx-packager:jar:1.8.0 at specified path
/opt/jdk1.8.0/jre/../lib/ant-javafx.jar
Then I found the ant-javafx.jar in a windows JDK but then another error was reported that linux is not supported with this one. Ok so I downloaded a linux JDK and used that ant-javafx.jar. Now it could build and create a *.deb file successfully!
However when I started the installer it failed with a message and when checking the log (/var/log/apt/term.log)
Log started: 2021-04-29 00:40:01
dpkg: Error creating archive
/home/pi/Foo/target/jfx/native/foo.deb (--unpack):
package architecture (amd64) does not match system (armhf)
Then I did research and found the following mailing list entry:
[...] the Java Packager isn’t shipped with any ARM builds that I’m aware of. Currently it is only for X86 Windows, Linux and Mac. [...]
This basically explains it: The packager doesn't work on ARM for now. Maybe we should write the guy to encurage him to add it...
=> So for now I work with the jar directly.

Ubuntu/Darling - dyld: Failed to load native library: libSimpleWebKit.so

I'm attempting to use Darling directly built from source on Github, I ran in to a few issues with building and dependencies, but with the help of apt-file I got through all the little problems. Now, I'm trying to run Sourcetree From Atlassian (as Wine can't seem to handle the windows version) and am getting the following error. Would anyone happen to have an idea on why? Currently running Ubuntu 13.04 64bit.
dyld: Cannot execute binary file: Failed to load native library: libSimpleWebKit.so: cannot open shared object file: No such file or directory
I just had this error myself. The error message tells you already everything you need to know: The appropriate library - libsimplewebkit - was not found and needs to be installed. Just search for simplewebkit with your distros package manager and install the appropriate package. If it doesn't find anything you will need to compile it yourself.

OpenCV keeps "uninstalling" itself (Linux)

Really annoying issue here. On Linux Mint OS. Every so often, I'll get this error when running OpenCV code:
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp, line 180
terminate called after throwing an instance of 'cv::Exception'
what(): /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp:180: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow
The way to fix this, I've found, it to do the following:
cd OpenCV/
cd build/
cmake ..
make
sudo make install
sudo ldconfig
<restart computer>
Then I'll come back, start running my OpenCV code again, and it'll be fine. But then a few hours later, or possibly between turning cpu on/off, I'll be back to the same stupid error!
Does anyone have any idea what's going on here and how I can prevent this? It's frustrating as hell.
It sounds like a general critical error in the program code. Is there a specific task that is done when the error occurs? You might want to use strace to get the output of the program as it runs or enable application memory dumps for the user you are running the process as. This would be passed to the developer for debugging and inspection.
I believe the problem was solved by paying attention to where my USB camera was actually located in /dev/. Giving a faulty path to the get video source functions causes this type of error; restarting my computer occasionally shifted which /dev/video# my device was attached to.
Please do ls /dev/vid* to find out if you're using the right video source!

Issue compiling kernel modules

I bought a new Toshiba Satellite C855 and installed Ubuntu 12.10 on it only to find that the preinstalled drivers for wifi and ethernet do not work. As a result, this new computer has absolutely no internet access. I downloaded the source for the correct drivers and I am currently working on installing them. When I build the modules I get the following error
make -C /lib/modules/3.5.0-17-generic/build M=/home/<user>/Desktop/rtl_92ce_92se_8723ae_88ee_linux_mac80211_0012.0207.2013 modules
make[1]: Entering directory `/lib/modules/3.5.0-17-generic/build`
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.5.0-17-generic/build`
make: *** [all] Error 2
I had to make the /lib/modules/3.5.0-17-generic/build directory. I DO have the headers installed (at /usr/src/linux-headers-3.5.0-17/). I have also done a lot of googling on this subject before posting this question, but everything I found was either dead or left unanswered.
Note: I would much rather avoid showing outputs. Since this computer that I am posting from is not the Toshiba machine and the new machine does not have internet access, I have to manually type outputs or hassle with a flash drive. Also, if I need any to install any packages, I also need links to .deb packages, not apt-get install commands.
Thanks ahead.
I managed to fix it on my own and figured I'd post my solution:
In my original question I said that I had to mkdir the build directory. What I didn't realize was this was supposed to be a symlink to the kernel source directory. Once I did that, everything (including my ethernet, wifi is still a bit iffy) suddenly works.
I would advice you to stop your efforts compiling this on the destination PC.
you are missing all the essential tools to compile the kernel, and obtaining them without an Internet connection is a tedious job, handling all dependencies, it's a nightmare.
You have two options:
Search for a binary module, that was pre-compiled for you target PC.
Compile it yourself, on another machine, I would suggest doing it under virtualbox / vmware, so you can install the exact version of Ubuntu, you're trying to compile for. then just copy the .ko to your target, insmod, and you're ready to go.

Resources