Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with Bazel 8.0.0 #2400

Open
davidzchen opened this issue Dec 31, 2024 · 2 comments
Open

Fails to build with Bazel 8.0.0 #2400

davidzchen opened this issue Dec 31, 2024 · 2 comments

Comments

@davidzchen
Copy link

Required information

Operating system

macOS Sequoia 15.2

Compiler version:

$ clang --version
Homebrew clang version 19.1.1
Target: arm64-apple-darwin24.2.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.1/bin

Eclipse iceoryx version:

main

Observed result or behaviour

First, I get an error about both --enable_bzlmod and --enable_workspace being disabled:

$ bazel build //...
Starting local Bazel server and connecting to it...
WARNING: ignoring JAVA_TOOL_OPTIONS in environment.
ERROR: Error computing the main repository mapping: error loading package 'external': Both --enable_bzlmod and --enable_workspace are disabled, but one of them must be enabled to fetch external dependencies.

If I set --enable_bzlmod, I get the following errors:

$ bazel build --enable_bzlmod //...
WARNING: For repository 'rules_cc', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_hoofs/test/stresstests/BUILD.bazel", line 49, column 16, in <toplevel>
                srcs = glob([
Error in glob: glob pattern '*.hpp' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_platform/test/BUILD.bazel", line 21, column 16, in <toplevel>
                srcs = glob([
Error in glob: glob pattern 'moduletests/*.hpp' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_hoofs/test/BUILD.bazel", line 48, column 16, in <toplevel>
                srcs = glob([
Error in glob: glob pattern 'integrationtests/*.hpp' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_posh/BUILD.bazel", line 118, column 16, in <toplevel>
                srcs = glob(
Error in glob: glob pattern 'source/log/**' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: package contains errors: iceoryx_platform/test
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_hoofs/BUILD.bazel", line 34, column 16, in <toplevel>
                srcs = glob([
Error in glob: glob pattern 'design/source/*.cpp' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: package contains errors: iceoryx_hoofs/test/stresstests
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_posh/test/BUILD.bazel", line 28, column 16, in <toplevel>
                data = glob(["input/**"]),
Error in glob: glob pattern 'input/**' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: package contains errors: iceoryx_hoofs/test
ERROR: package contains errors: iceoryx_posh/test
ERROR: package contains errors: iceoryx_hoofs
ERROR: package contains errors: iceoryx_posh
ERROR: Traceback (most recent call last):
        File "/Users/dzc/Repos/github/eclipse-iceoryx/iceoryx/iceoryx_binding_c/test/BUILD.bazel", line 53, column 16, in <toplevel>
                srcs = glob([
Error in glob: glob pattern 'integrationtests/*.hpp' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: package contains errors: iceoryx_binding_c/test
WARNING: Target pattern parsing failed.
ERROR: Skipping '//...': Error evaluating '//...': error loading package 'iceoryx_binding_c/test': Package 'iceoryx_binding_c/test' contains errors
ERROR: Error evaluating '//...': error loading package 'iceoryx_binding_c/test': Package 'iceoryx_binding_c/test' contains errors
INFO: Elapsed time: 6.459s
INFO: 0 processes.
ERROR: Build did NOT complete successfully

Expected result or behaviour

Build succeeds

Conditions where it occurred / Performed steps:

  1. Update Bazel to 8.0.0 LTS
  2. bazel build //...

Additional helpful information

None

@elfenpiff
Copy link
Contributor

@davidzchen we are aware of this. We support only bazel up to 7.4 - porting iceoryx to the newest bazel version requires some effort and is currently not on our top prio list.

We would happily receive some support and a pull request here.

@elBoberido
Copy link
Member

@davidzchen iceoryx2 does not yet support bzlmod, only the legacy workspace approach. We have users which still rely on bazel 6.2 and cannot use bzlmod. But we would appreciate a patch to introduce bzlmod to iceoryx2 as long as the legacy workspace approach remains functioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants