Chromium single executable build - chromium

I've been following the documentation here to build Chromium on Ubuntu 18.
I've been able to successfully build using these flags gn gen out/amd64 --args='is_official_build=true is_debug=false'
and this command to build
autoninja -C out/amd64 chrome
The problem is that the outputting chrome file has dependencies on all the other files in the directory. When I copy the chrome file to another directory and execute it, I get this error
[0608/170138.585281:ERROR:icu_util.cc(165)] Invalid file descriptor to ICU data received.
Trace/breakpoint trap (core dumped)
How do I go about building Chromium so I can execute it from a single file like how Puppeteer is a single executable?

Related

Error installing MoveIt 2 from source on Ubuntu 20.04 VM

I'm trying to get involved in open source and also am quite interested in robotics, so I thought about contributing to MoveIt 2. As a first step, I'm installing MoveIt 2 from source on my Ubuntu 20.04 VM in VirtualBox.
I've run through all the instructions here: https://moveit.ros.org/install-moveit2/source/#:~:text=colcon%20build%20%2D%2Devent%2Dhandlers%20desktop_notification%2D%20status%2D%20%2D%2Dcmake%2Dargs%20%2DDCMAKE_BUILD_TYPE%3DRelease
However, the build is failing on the highlighted part. The error message is as follows:
Starting >>> geometric_shapes
--- stderr: geometric_shapes
CMake Error at CMakeLists.txt:47 (find_package):
By not providing "Findeigen3_cmake_module.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"eigen3_cmake_module", but CMake did not find one.
Could not find a package configuration file provided by
"eigen3_cmake_module" with any of the following names:
eigen3_cmake_moduleConfig.cmake
eigen3_cmake_module-config.cmake
Add the installation prefix of "eigen3_cmake_module" to CMAKE_PREFIX_PATH
or set "eigen3_cmake_module_DIR" to a directory containing one of the above
files. If "eigen3_cmake_module" provides a separate development package or
SDK, be sure it has been installed.
---
Failed <<< geometric_shapes [1.20s, exited with code 1]
Summary: 0 packages finished [1.46s]
1 package failed: geometric_shapes
1 package had stderr output: geometric_shapes
33 packages not processed
Any help is really appreciated. Thanks!
You have to install ROS2 before building Move It 2. After installing the ROS2 binaries, the error doesn't occur.

How to debug the openjdk9 by netbeans8.2 in win10?

When I tried to debug the openjdk9 by netbeans8.2 in win10, I got the following error:
"\"D:/jdk9/jdk9/build/windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe\":
not in executable format: File format not recognized"
How can I fix it?
I build the source code by command "./configure -with-freetype=/cygdrive/c/freetype -enable-debug -with-target-bits=64", then run make all, I also tried slowdebug, however, that also failed.
If I "run" the project instead of "debug", it runs successfully like below, so there is no issue for the file windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe, it seems the gdb doesn't recognize the java.exe file.
Also I opened the openjdk source code from the location D:/jdk9/jdk/common/nb_native by netbeans, see below:
And tried to build it by netbeans, however, it produces the following error:
cd 'D:\jdk9\jdk\common'
sh ../configure --with-freetype=/cygdrive/c/freetype --with-debug-level=slowdebug --with-target-bits=64
/cygdrive/d/jdk9/jdk/configure: /cygdrive/d/jdk9/jdk/common/autoconf/configure: No such file or directory
PRE-BUILD FAILED (exit value 1, total time: 743ms)
I know that both paths /cygdrive/d/jdk9/jdk/configure and /cygdrive/d/jdk9/jdk/common/autoconf/configure exist.
This is how I configured the pre-built commands:
If you build the openjdk -with-target-bits = 64, then make sure that you installed a 64-bit gdb, or build the openjdk in 32-bit mode.
Your steps to import the nbproject looks correct.
Change Build => Pre-Build properties:
Set "Working Directory" to ../..
Set "Command Line" to sh ./configure ...

Installing Tensorflow GPU/CUDA dependencies on a machine with no internet access

I have 2 machines -
dccten1a with no internet access where I need to install Tensorflow with GPU support
dccten1b with internet access so that I can download packages and transfer to dccten1a
In the final step of installing Tensorflow, when running the bazel build command to produce a whl file, I get an error which says that it can't find a file in a folder it is looking in, and also cannot download, obviously, as 1a doesn't have internet access.
bazel build --config=opt --config=cuda /home/tensorflow/Documents/tf_dependencies/tensorflow-master/tensorflow/tools/pip_package:build_pip_package --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': Error downloading [http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz, https://github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz] to /home/xyzuser/.cache/bazel/_bazel_xyzuser/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz: All mirrors are down: [Unknown host: github.com, Unknown host: mirror.bazel.build]
I checked in the system, and there is no such directory as shown in the error message (i.e., /home/xyzuser/.cache/bazel/_bazel_xyzuser/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure/). So, I created it, searched and found the requisite (?) file online, downloaded the file in the machine with internet, transferred it to the target machine, moved the file to the just created directory, and tried running the command again:
(tensorflow#dccten1a):
mkdir -p /home/tensorflow/.cache/bazel/_bazel_tensorflow/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure
(tensorflow#dccten1b):
http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz
sudo scp -r /home/tensorflow/Downloads/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz tensorflow#160.88.114.17:/home/tensorflow/Documents/tf_dependencies
(tensorflow#dccten1a):
mv /home/tensorflow/Documents/tf_dependencies/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz /home/tensorflow/.cache/bazel/_bazel_tensorflow/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure
Then I run the bazel build command again, but the same error persists.
Use --experimental_repository_cache to download the dependencies on the machine with internet access, transfer the cache to the machine without internet access, and use --experimental_repository_cache to refer to the same cache.
e.g.
1) On the machine with internet access, run
tensorflow#dccten1b $ bazel build --experimental_repository_cache=/path/to/some/folder --config=opt --config=cuda /home/tensorflow/Documents/tf_dependencies/tensorflow-master/tensorflow/tools/pip_package:build_pip_package --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0""
2) Copy the cache at /path/to/some/folder to the machine without internet access using a SD card or flash drive.
3) On the machine without internet access, run the same command again and setting the flag to the cache's location.
tensorflow#dccten1a $ bazel build --experimental_repository_cache=/path/to/some/folder --config=opt --config=cuda /home/tensorflow/Documents/tf_dependencies/tensorflow-master/tensorflow/tools/pip_package:build_pip_package --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0""

Error when try to compile Chromium

I try to use the command ninja -C out/Debug chrome to compile Chromium.
However the error msg says that:
ninja error loading 'build.ninja': the system cannot find the file specified
ninja Entering dictory 'out/Debug'
Could I know what's the problem?
Thanks.
The out directory and its contents (including build.ninja) are created by running
python build\gyp_chromium
or
gclient runhooks
Executing either command from within /src should allow your compile to proceed.
On Windows machine!
When I was running gn gen out/Default it also gave me an error:
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: D:/Chromium/src/out/Goma/
Command: C:/Python27/python.exe -- D:/Chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1 and printed out:
Please follow the instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
I did the following steps and it worked for me.
Set this variable. Reference (not sure about its purpose yet)
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
Run the command gn gen out/Default
Run the build command again
autoninja -C out/Default chrome
It is also recommended to run gclient sync from out/Default directory.
After the switch to "gn" you could try:
gn gen out/Debug

Debian package bug on squeeze?

My hand-made debian package wont install if i build it on Squeeze (well, a squeezechroot)?
If i built it on a wheezy box though it builds installable packages.
Note that it builds fine in either case. Im generating the debian packages using CMake/CPack.
The error message i get is:
user#buildbox:/builddir/packagename# dpkg -i packagename_1.0.3.deb
(Reading database ... 35116 files and directories currently installed.)
Unpacking packagename (from packagename_1.0.3.deb) ...
dpkg: error processing packagename_1.0.3.deb (--install):
unable to create `/usr/share/packagename/builddir/mixer_devices.txt.dpkg-new' (while processing `./usr/share/packagename/builddir/mixer_devices.txt'): No such file or directory
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
packagename_1.0.3.deb
Might it be that mixer_devices is not contained within the created deb file for some reason?
Just do an ar x packagename_1.0.3.deb and see what the tar file contains.