gn: Unresolved dependencies - chromium

I'm attempting to build Chromium on Ubuntu 22.04. I've cloned the git repo, checked out the 102.0.5005.59 branch, added the depot_tools directory to PATH, and run
fetch --nohooks chromium
./build/install-build-deps.sh --no-chromeos-fonts
./build/install-build-deps-android.sh --no-chromeos-fonts
gclient runhooks
I then attempted to generate the ninja files by running gn args out/Default and setting
is_debug = false
is_clang = true
symbol_level = 2
dcheck_always_on = false
is_component_build = false
target_os = "android"
target_cpu = "arm64"
blink_symbol_level = 0
v8_symbol_level = 0
ignore_elf32_limitations = true
as the build parameters. However, this failed with
Generating files...
ERROR Unresolved dependencies.
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__assetres(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__assetres(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__build_config_crbug_908819(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__build_config_crbug_908819(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__dex(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__header(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__dex(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__impl(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__header(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__header(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__process_host(//build/toolchain/android:android_clang_arm64)
needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__impl(//build/toolchain/android:android_clang_arm64)
//third_party/webrtc_overrides:webrtc_component(//build/toolchain/android:android_clang_arm)
needs //third_party/webrtc/rtc_base:rtc_base_approved(//build/toolchain/android:android_clang_arm)
//third_party/webrtc_overrides:webrtc_component(//build/toolchain/android:android_clang_arm64)
needs //third_party/webrtc/rtc_base:rtc_base_approved(//build/toolchain/android:android_clang_arm64)
//third_party/webrtc_overrides:webrtc_component(//build/toolchain/linux:clang_x64)
needs //third_party/webrtc/rtc_base:rtc_base_approved(//build/toolchain/linux:clang_x64)
What's weird is, if I do the same with the 103.0.5060.22 branch, then everything works perfectly. What am I missing?

Looks like you missed to pull all the third-party dependencies needed for Chromium to compile. You should run the following command after checking out or switching to another branch/version/tag of Chromium as each branch/version/tag could have different versions of third-party dependencies:
gclient sync
Now start the compilation process

Related

Visual Studio 2022 Stopped Pushing to Git

Pushing master Error encountered while pushing branch to the remote repository: Git failed with a fatal error. Git failed with a fatal error. unable to access 'https:/: error setting certificate verify locations: CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none Failed to push the branch to the remote repository. See the Output window for more details. vs 2022
If you installed (or reinstalled) Visual Studio to, say, the D: drive, the pointer to the certificate will change. Reinstalling Git desktop won't help in this case.
To Fix: Find the old gitconfig file and open (in admin mode) in a suitable editor and change the path(s) to point to where the new installation is (or, in my case, just the drive letter).
C:\Program Files\Git\etc\gitconfig
The file would look something like so:
[diff "astextplain"]
textconv = astextplain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[http]
sslBackend = openssl
sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
[core]
autocrlf = true
fscache = true
symlinks = false
editor = \"C:\\\\Program Files\\\\Microsoft VS Code\\\\bin\\\\code\" --wait
[pull]
rebase = false
[credential]
helper = manager-core
[credential "https://dev.azure.com"]
useHttpPath = true
[init]
defaultBranch = master
After the changes, it would look something like this:
[diff "astextplain"]
textconv = astextplain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[http]
sslBackend = openssl
sslCAInfo = D:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
[core]
autocrlf = true
fscache = true
symlinks = false
editor = \"D:\\\\Program Files\\\\Microsoft VS Code\\\\bin\\\\code\" --wait
[pull]
rebase = false
[credential]
helper = manager-core
[credential "https://dev.azure.com"]
useHttpPath = true
[init]
defaultBranch = master
A lot of programs (including VS) will install something on the c: drive, and if you had the situation I had (not enough room on C: - so I uninstalled all the space hogging programs and reinstalled onto the D: drive), there is usually some sort of configuration file that points to the new location(s), so, it's a good idea to keep this in mind.
install git https://git-scm.com/download/win again and it will fix the issue.

Running a projetct with IntelliJ gives "Execution failed for task ':npmInstall'." but the same project runs ok when started by command line

I have a jhipster project that runs just fine when started by the command line "./gradlew" (Ubuntu 20.04.3) but when I start the debbug from the IntelliJ (community) it returns the follow message:
What went wrong:
Execution failed for task ':npmInstall'.
A problem occurred starting process 'command 'npm''
And I need to run it on IntelliJ to use breakpoints and debug.
What I have tried:
I have checked the java version on the IntelliJ compiller
I have the PATH's set correct (I can run other projects)
After trying to redefine things, deleting the "node-modules" folder, 'invalidating and restart' on intelliJ and even checking-out the entire project from git, what did the trick was to change the block on build.gradle, from:
if (project.hasProperty("nodeInstall")) {
node {
version = "14.16.0"
npmVersion = "7.8.0"
download = true
}
}
to
node {
version = "14.16.0"
npmVersion = "7.8.0"
download = true
}
That fixed the problem and now I can debbug using intelliJ

How to ignore an example when running tests with cargo?

I'm making a proc_macro crate where I have 2 examples in the directory examples/.
When I run cargo test, the 2 examples are compiled but one of the examples is failing on purpose and it prevents the test from running. I want to make an example that fails to compile to show the user how it works.
According to the doc this behavior is intended:
They must compile as executables (with a main() function) and load in the library by using extern crate <library-name>. They are compiled when you run your tests to protect them from bitrotting.
This is fine but how can I disable the compilation for my failing example?
I found it!
You can disable the automatic discovery of examples by adding autoexamples = false to [package]
Then you can enumerate all the examples yourself in the following way:
[package]
...
autoexamples = false
[[example]]
name = "basic"
path = "examples/basic.rs"

Wix installer uninstaller issue when a bundled app is skipped

I have a bundled application say XYZ-1.0.0.1.exe, with applications A-2.2.0.1.exe and B-1.2.0.1.exe bundled in it. So when we install XYZ, we get A and B as well listed in Add Remove Programs. But when I upgrade XYZ-1.0.0.1 with XYZ-1.0.0.2, which has A-2.2.0.1.exe and B-1.2.0.2.exe, so that A is same and already installed and B needs upgrade. I actually skipped the installation of A by making the install condition false, since the same version is already installed and installed only B while upgrading.
After successfully upgrading I am not able to uninstall the application XYZ, it says some package error, also this happens only if the source file used for upgrading is removed from machine.Actually while uninstalling package has to be referred from program cache, I think since we skipped A package cache has problem.
The error that i get is as follows "Prompt for source of container: WixAttachedContainer, path: C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe Failed to resolve source for file: C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe, error: 0x80070002. Error 0x80070002: Failed while prompting for source (original path 'C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe'). Failed to acquire container: WixAttachedContainer to working path: C:\Users\ABC\AppData\Local\Temp{b4a1c780-306c-40f0-83ad7}, error: 0x80070002. "
This error occurs only when i copy XYZ.exe to any path say desktop and after installation(skip installing A or B since same version of A or B bundled is already installed) and delete the setup file XYZ.exe from saved path ie here Desktop. I am not able to uninstall unless i uninstall A or B which was skipped independently.
Also there is another scenario.
I have a bundled application say XYZ-1.0.0.1.exe, with applications A-2.2.0.1.exe and B-1.2.0.1.exe bundled in it. XYZ-1.0.0.2.exe, which has A-2.2.0.1.exe and B-1.2.0.2.exe. Thes in both versions of XYZ we have the same version of A. When i install XYZ-1.0.0.1.exe i skipped the installation of A-2.2.0.1.exe by setting the install condition to false. So XYZ-1.0.0.1.exe is installed and B-1.2.0.1 is also installed. Further when i upgraded to XYZ-1.0.0.2, I need to install all of the A and B. Installation was successfull and now i have XYZ-1.0.0.2, A-2.2.0.1 and B-1.2.0.2. Now if i delete the installation file of XYZ-1.0.0.2.exe from original path and try to uninstall it breaks.
Initially i thought that the package cache issue arises since A-2.2.0.1.exe was not installed along with XYZ-1.0.0.2.exe since i skipped it as it is already available. But after the second scenario got to know that skipping was not the issue. Since in second scenario A-2.2.0.1.exe was installed along with XYZ-1.0.0.2.exe.
The same issue took huge amount of my time as well. Solved it using a work around. Since the issue is "Prompt for source of container: WixAttachedContainer, path: ", You can copy the exe file XYZ-1.0.0.2 while upgrading to program data or some other path with a default name xyz.exe. At first register for ResolveSource event,then add the following code.Assume the copied exe path is c:/XYZ/xyz.exe
private void OnResolveSource(object sender, ResolveSourceEventArgs e)
{
Application.Engine.SetLocalSource(e.PackageOrContainerId, e.PayloadId, "c:/XYZ/xyz.exe");
e.Result = Result.Retry;
}
If anybody know a better answer, please help.

Bazel quits before building new op without error?

I was building a new Tensorflow op with external libraries yesterday and getting errors. Today when I ran the same code for some reason I ended up with this output instead:
(vent)user#server:/dir/tensorflow/tensorflow/core/user_ops$ bazel build --config opt //tensorflow/core/user_ops:my_op.cc
INFO: Found 1 target...
INFO: Elapsed time: 1.493s, Critical Path: 0.01s
(vent)user#server:/dir/tensorflow/tensorflow/core/user_ops$
I thought it was something wrong with my cache so I did a 'bazel clean' and then tried to rebuild the example op zero_out.so, but I got the same problem even though yesterday I was able to successfully run zero_out.so from //bazel-bin/tensorflow/core/user_ops. There's nothing wrong with bazel since I was able to start building tensorflow from source without it quitting on me. My build file in //tensorflow/core/user_ops looks like this:
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
tf_custom_op_library(
name = "zero_out.so",
srcs = ["zero_out.cc"],
)
tf_custom_op_library(
name = "my_op.so",
srcs = ["my_op.cc"],
deps = ["#t//:libt"]
)
I've been looking around for a couple hours, but I can't find any help and I don't think I'm looking in the right places. Does this have something to do with the bazel clean deleting some important files? None of my BUILD or WORKSPACE files were changed and nothing on my server has changed.
I'm using Bazel v0.5.1 on Linux with TF v1.2.
Solution to the problem was simply because I had accidentally changed my_op.so to my_op.cc in the build command.