bazelbuild / bazelbuild/bazel

Freebsd 13 bazel release 5.0.0 does not compile any code and examples also

Open
#14,891 23 comments 1 reaction 0 assignees View on GitHub
help wanted P3 team-OSS type: support / not a bug (process)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 18h
Merged PRs (30d)
75

Description

### Description of the problem / feature request:

> when i want to compile any project even bazel examples,
it gives jdk related error.

### Feature requests: what underlying problem are you trying to solve with this feature?

> I am not sure but can it be openjdk11 not recognized by bazel?

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

> just install bazel on port tree for freebsd 13 release version and try examples and envoy proxy to compile.

### What operating system are you running Bazel on?

> FreeBSD 13

### What's the output of `bazel info release`?

> release 5.0.0

### Have you found anything relevant by searching the web?

> yes i tried and nothing found useful.

### Any other information, logs, or outputs that you want to share?

> root@fbsd_bazel:~/envoy # bazel build //:envoy --sandbox_debug --host_javabase=@local_jdk//:jdk
WARNING: Option 'host_javabase' is deprecated
INFO: Build option --host_javabase has changed, discarding analysis cache.
ERROR: /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/external/bazel_tools/tools/jdk/BUILD:432:8: In rule 'proguard_whitelister_test', size 'medium' is not a valid size.
ERROR: /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/external/bazel_tools/tools/jdk/BUILD:432:8: In rule 'proguard_whitelister_test', timeout 'illegal' is not a valid timeout.
ERROR: Analysis of target '//:envoy' failed; build aborted: error loading package '@bazel_tools//tools/jdk': Package 'tools/jdk' contains errors
INFO: Elapsed time: 0,372s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 6 targets configured)

https://docs.bazel.build/versions/main/tutorial/cpp.html

> examples/cpp-tutorial/stage1 # bazel build //main:hello-world
WARNING: Running Bazel server needs to be killed, because the startup options are different.
Starting local Bazel server and connecting to it...
... still trying to connect to local Bazel server after 10 seconds ...
... still trying to connect to local Bazel server after 20 seconds ...
... still trying to connect to local Bazel server after 30 seconds ...
... still trying to connect to local Bazel server after 40 seconds ...
ERROR: /root/.cache/bazel/_bazel_root/033bfece9530ea7f1b2e1c399eea4938/external/bazel_tools/tools/jdk/BUILD:432:8: In rule 'proguard_whitelister_test', size 'medium' is not a valid size.
ERROR: /root/.cache/bazel/_bazel_root/033bfece9530ea7f1b2e1c399eea4938/external/bazel_tools/tools/jdk/BUILD:432:8: In rule 'proguard_whitelister_test', timeout 'illegal' is not a valid timeout.
ERROR: Analysis of target '//main:hello-world' failed; build aborted: error loading package '@bazel_tools//tools/jdk': Package 'tools/jdk' contains errors
INFO: Elapsed time: 50,453s
INFO: 0 processes.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure on FreeBSD 13 with Bazel release 5.0.0 using the C++ tutorial and the reported Envoy command. Start with external/bazel_tools/tools/jdk/BUILD at the reported proguard_whitelister_test errors, then compare the local JDK setup and --host_javabase behavior. Done means the examples and Envoy target complete analysis and compile successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.