ATTENTION! Please read and follow:
- if this is a _question_ about how to build / test / query / deploy using Bazel, ask it on StackOverflow instead: https://stackoverflow.com/questions/tagged/bazel
- if this is a _discussion starter_, send it to [email protected]
- if this is a _bug_ or _feature request_, fill the form below as best as you can.
After I typed './bazel-0.16.0-installer-linux-x86_64.sh --user' in my Ubuntu 16.04 terminal
Bazel installer
---------------
Bazel is bundled with software licensed under the GPLv2 with Classpath exception.
You can find the sources next to the installer on our release page:
https://github.com/bazelbuild/bazel/releases
# Release 0.16.0 (2018-07-31)
Baseline: 4f64b77a3dd8e4ccdc8077051927985f9578a3a5
Cherry picks:
+ 4c9a0c82d308d5df5c524e2a26644022ff525f3e:
reduce the size of bazel's embedded jdk
+ d3228b61f633cdc5b3f740b641a0836f1bd79abd:
remote: limit number of open tcp connections by default. Fixes
#5491
+ 8ff87c164f48dbabe3b20becd00dde90c50d46f5:
Fix autodetection of linker flags
+ c4622ac9205d2f1b42dac8c598e83113d39e7f11:
Fix autodetection of -z linker flags
+ 10219659f58622d99034288cf9f491865f818218:
blaze_util_posix.cc: fix order of #define
+ ab1f269017171223932e0da9bb539e8a17dd99ed:
blaze_util_freebsd.cc: include path.h explicitly
+ 68e92b45a37f2142c768a56eb7ecfa484b8b22df:
openjdk: update macOS openjdk image. Fixes #5532
+ f45c22407e6b00fcba706eb62141cb9036bd38d7:
Set the start time of binary and JSON profiles to zero correctly.
+ bca1912853086b8e9a28a85a1b144ec0dc9717cc:
remote: fix race on download error. Fixes #5047
+ 3842bd39e10612c7eef36c6048407e81bcd0a8fb:
jdk: use parallel old gc and disable compact strings
Incompatible changes:
- The $(ANDROID_CPU) Make variable is not available anymore. Use
$(TARGET_CPU) after an Android configuration transition instead.
- The $(JAVA_TRANSLATIONS) Make variable is not supported anymore.
- Skylark structs (using struct()) may no longer have to_json and
to_proto overridden.
- The mobile-install --skylark_incremental_res flag is no longer
available, use the --skylark flag instead.
New features:
- android_local_test now takes advantage of Robolectric's binary
resource processing which allows for faster tests.
- Allow @ in package names.
Important changes:
- Option --glibc is removed, toolchain selection relies solely on
--cpu and --compiler options.
- Build support for enabling cross binary FDO optimization.
- The --distdir option is no longer experimental. This
option allows to specify additional directories to look for
files before trying to fetch them from the network. Files from
any of the distdirs are only used if a checksum for the file
is specified and both, the filename and the checksum, match.
- Java coverage works now with multiple jobs.
- Flip default value of --experimental_shortened_obj_file_path to
true, Bazel now generates short object file path by default.
- New rules for importing Android dependencies:
`aar_import_external` and `aar_maven_import_external`.
`aar_import_external` enables specifying external AAR
dependencies using a list of HTTP URLs for the artifact.
`aar_maven_import_external` enables specifying external AAR
dependencies using the artifact coordinate and a list of server
URLs.
- The BAZEL_JAVAC_OPTS environment variable allows arguments, e.g.,
"-J-Xmx2g", may be passed to the javac compiler during bootstrap
build. This is helpful if your system chooses too small of a max
heap size for the Java compiler during the bootstrap build.
- --noexpand_configs_in_place is deprecated.
- A tool to parse the Bazel execution log.
- Support for LIPO has been fully removed.
- Remove support for --discard_actions_after_execution.
- Add --materialize_param_files flag to write parameter files even
when actions are executed remotely.
- Windows default system bazelrc is read from the user's
ProgramData if present.
- --[no]allow_undefined_configs no longer exists, passing undefined
configs is an error.
- In remote caching we limit the number of open
TCP connections to 100 by default. The number can be adjusted
by specifying the --remote_max_connections flag.
## Build informations
- [Commit](https://github.com/bazelbuild/bazel/commit/fb9215a)
Uncompressing......Error: LinkageError occurred while loading main class com.google.devtools.build.lib.bazel.Bazel
java.lang.ExceptionInInitializerError: null
I google it, search in the stackoverflow and github issue
- start the Ubuntu 16.04 in 'VirtualBox'.
- Installing Bazel on Ubuntu following this link
- open the terminal and type 'sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python'. The terminal shows
zip python
[sudo] ssq 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
g++ 已经是最新版 (4:5.3.1-1ubuntu1)。
pkg-config 已经是最新版 (0.29.1-0ubuntu1)。
unzip 已经是最新版 (6.0-20ubuntu1)。
zip 已经是最新版 (3.0-11)。
python 已经是最新版 (2.7.12-1~16.04)。
zlib1g-dev 已经是最新版 (1:1.2.8.dfsg-2ubuntu4.1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 177 个软件包未被升级。
- Download Bazel
- Type 'chmod +x bazel-0.16.0-installer-linux-x86_64.sh' in the terminal, nothing happened.
- Type './bazel-0.16.0-installer-linux-x86_64.sh --user'. Error occured.
Ubuntu 16.04 in Oracle VM VirtualBox
What's the output of
bazel info release
?
Error: LinkageError occurred while loading main class com.google.devtools.build.lib.bazel.Bazel
java.lang.ExceptionInInitializerError: null
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.Replace this line with your answer.
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
No, I have searched the following 3 websites.
Places to look:
- StackOverflow: http://stackoverflow.com/questions/tagged/bazel
- GitHub issues: https://github.com/bazelbuild/bazel/issues
- email threads on https://groups.google.com/forum/#!forum/bazel-discuss
No
If the files are large, upload as attachment or provide link.
Since that looks like a Java error, have you tried installing the JDK before running the installer?
From: https://docs.bazel.build/versions/master/install-ubuntu.html#using-bazel-custom-apt-repository
sudo apt-get install openjdk-8-jdk
Hi aiuto,
Thanks for your reply. I tried 'sudo apt-get install openjdk-8-jdk' as you suggested, it still occured the same error message.
But I tried the second method titled
Thanks for your help. Hope you have a nice day : )
I have the the problem. Moving the *.sh to a non-chinese path fix the problem.
I can confirm the bug, and, this is really strange, it occurs if I am in a greek-named path. Everything runs smoothly if paths are in english. (bazel doesn't like non english speakers apparently :D )
Most helpful comment
I have the the problem. Moving the *.sh to a non-chinese path fix the problem.