Getting BlazeInfoException in IntelliJ from the Bazel plugin - intellij-idea

I just installed the Bazel plugin for IntelliJ, and I keep getting this exception:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
java.util.concurrent.ExecutionException:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:502)
[...]
at com.google.idea.blaze.base.async.FutureUtil$Builder.lambda$run$0(FutureUtil.java:93)
[...]
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:108)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:105)
[...]
Caused by: com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.runBlazeInfo(BlazeInfoRunnerImpl.java:105)
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.lambda$runBlazeInfo$2(BlazeInfoRunnerImpl.java:75)
... 6 more
Edit: I am using IntelliJ 2017.3 on MacOS El Capitan 10.11.6, Java JRE 1.8.0, and the Bazel version is 0.8.1-homebrew (the plugin version is 2017.11.20.0.4). I get this error when I try to setup a new Java project (an Hello World with only one class and one BUILD file containing a java_binary similar to this tutorial), and it appears when I click on the Bazel sync button.
The output in the Bazel console is:
Syncing project: Sync (incremental)...
Updating VCS...
Running Bazel info...
Command: info --tool_tag=ijwb:IDEA:community --curses=no --color=no --experimental_ui=no --progress_in_terminal_title=no --
==== TIMING REPORT ====
Sync: 47ms
BazelInfo: 4ms
Timing summary:
BlazeInvocation: 4ms
Sync failed
Command: git diff --name-status --no-renames abc8913346474d12ad45226503438848011929ae
Does anybody have an idea about what is it and/or how to fix it? Thanks!

I found my answer, thanks to this post.
In IntelliJ > Settings > Other Settings > Bazel Settings, the field "Bazel binary location" was empty. For my case, I entered /usr/local/bin/bazel and now it works!

Related

Karate Performance testing : Getting build failure with error "Unrecognized VM option 'UseBiasedLocking'

I am trying to reuse Karate tests for performance testing with Gatling and Scala.
I have configured everything as described in documentation. But then when I run the mvn command I am getting error "Unrecognized VM option 'UseBiasedLocking' Error: Could not create the Java Virtual Machine."
mvn command used to run tests: mvn test-compile gatling:test
Tried with looking at Env path variables and running the mvn command with different options. But still getting same error
Failed to execute goal io.gatling:gatling-maven-plugin:4.1.5:test (default-cli) on project PerformanceTesting: Gatling failed.: Process exited with an error: 1 (Exit value: 1)
Below is the POM file
Scala File
The issue is resolved after upgrading the gatling.plugin.version to 4.2.7 as my Java version 19 is not supporting old gatling plugin.
Below article helped to resolve
Unrecognized VM option 'UseBiasedLocking' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit

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.

Problems with absl dependencies in TensorFlow print_selective_registration_header building

I'm trying to build //tensorflow/python/tools:print_selective_registration_header and get following output:
$ bazel build --copt="-DUSE_GEMM_FOR_CONV" tensorflow/python/tools:print_selective_registration_header
...
INFO: Analyzed target //tensorflow/python/tools:print_selective_registration_header (377 packages loaded, 24256 targets configured).
INFO: Found 1 target...
INFO: Deleting stale sandbox base /private/var/tmp/_bazel_glebdavydov/01d4cf1f69cd2606674d307a7a455e95/sandbox
ERROR: /Users/glebdavydov/Downloads/tensorflow-master/tensorflow/c/BUILD:372:1: undeclared inclusion(s) in rule '//tensorflow/c:ops':
this rule is missing dependency declarations for the following files included by 'tensorflow/c/ops.cc':
'tensorflow/contrib/makefile/downloads/absl/absl/strings/string_view.h'
'tensorflow/contrib/makefile/downloads/absl/absl/types/optional.h'
Target //tensorflow/python/tools:print_selective_registration_header failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 54.737s, Critical Path: 13.10s
INFO: 4 processes: 4 local.
FAILED: Build did NOT complete successfully
How can I fix this?
I fixed that issue by installing version of bazel corresponding to this build configurations.

IntelliJ Python Debugging with Blaze

I'm currently trying to transition a project to Bazel, but I'm running into problems running the debugger for Python in IntelliJ. I have the current version of the Bazel plugin (v2019.06.17.0.1), and am using the current Bazel version (0.28.0). When I attempt to run a test in debug, I see
/usr/local/bin/python3.6 "/path/redacted" --multiproc --qt-support=auto --client 127.0.0.1 --port 53571 --file /path/also/redacted
pydev debugger: process 24526 is connecting
Connected to pydev debugger (build #.#.#.#)
Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
Has anyone found a good solution to this problem?

tensorflow-magenta bazel error running first test

I have installed the C++ protobuf library on Ubuntu 15.10. When I run the first magenta test within the magenta workspace directory I get this error (changed url to protobuf, cant post not enough reputation points. What a great problem reporting system this is):
root#ubuntu-VirtualBox:/home/ubuntu/magenta# bazel test magenta/...
..
ERROR: package contains errors: magenta.
ERROR: error loading package 'magenta': Encountered error while reading extension file 'protobuf.bzl': no such package '#protobuf//': Error cloning repository: protobuf: cannot open git-upload-pack caused by protobuf: cannot open git-upload-pack caused by protobuf: cannot open git-upload-pack caused by protobuf: cannot open git-upload-pack caused by protobuf: cannot open git-upload-pack.
INFO: Elapsed time: 2.305s
ERROR: Couldn't start the build. Unable to run tests.