Comments (10)
After doing the steps freshly, when I try to complete the step of "Running the stratum_bmv2 binary
"
I face following problem
bazel build //stratum/hal/bin/bmv2:stratum_bmv2
ERROR: /home/deba/stratum/bazel/workspace_rule.bzl:19:1: load() statements must be called before any other statement. First non-load() statement appears at /home/deba/stratum/bazel/workspace_rule.bzl:17:1. Use --incompatible_bzl_disallow_load_after_statement=false to temporarily disable this check.
ERROR: error loading package '': in /home/deba/stratum/bazel/rules/build_tools.bzl: Extension 'bazel/workspace_rule.bzl' has errors
ERROR: error loading package '': in /home/deba/stratum/bazel/rules/build_tools.bzl: Extension 'bazel/workspace_rule.bzl' has errors
INFO: Elapsed time: 0.075s
INFO: 0 processes.
Any help ?
from stratum.
Hi @drobinkent , We are using Bazel version 0.23.2 in our environment and plain to upgrade the Bazel version to 1.0.0
If you want to try new version of Bazel, please follow the suggestion from your Bazel log to build it:
Use --incompatible_bzl_disallow_load_after_statement=false to temporarily disable this check.
from stratum.
I have a problem when I executed "bazel build //stratum/hal/bin/bmv2:stratum_bmv2"
bazel build //stratum/hal/bin/bmv2:stratum_bmv2 --incompatible_bzl_disallow_load_after_statement=false --incompatible_disable_deprecated_attr_params=false
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/096eb34d74939df26d8ec3f987c86d06/command.profile.gz'
ERROR: /root/stratum/stratum/hal/bin/bmv2/BUILD:24:1: file '//bazel:rules.bzl' does not contain symbol 'stratum_cc_binary'
ERROR: /root/stratum/stratum/hal/bin/bmv2/BUILD:26:1: name 'stratum_cc_binary' is not defined
ERROR: error loading package 'stratum/hal/bin/bmv2': Package 'stratum/hal/bin/bmv2' contains errors
INFO: Elapsed time: 3.141s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)
from stratum.
I would suggest using the containerized environment to build the Stratum. It should include every necessary libraries and tool to build the binary.
https://github.com/stratum/stratum#development-environment
The ./setup_dev_env.sh
script mounts the Stratum dir into the container, so you can edit the code using your IDE on your host machine and get the binary from the host machine after it compiled.
from stratum.
Closing for now. Please reopen if the issues still persist.
from stratum.
The issue persists.
DEBUG: Call stack for the definition of repository 'build_stack_rules_proto' which is a http_archive (rule definition at /home/deba/.cache/bazel/_bazel_deba/867697089ae78c5b510d61904b21961d/external/bazel_tools/tools/build_defs/repo/http.bzl:262:16):
- /home/deba/stratum/bazel/workspace_rule.bzl:62:5
- /home/deba/stratum/bazel/workspace_rule.bzl:144:22
- /home/deba/stratum/bazel/deps.bzl:87:9
- /home/deba/stratum/WORKSPACE:55:1
ERROR: /home/deba/stratum/stratum/hal/bin/bmv2/BUILD:24:1: file '//bazel:rules.bzl' does not contain symbol 'stratum_cc_binary'
ERROR: /home/deba/stratum/stratum/hal/bin/bmv2/BUILD:26:1: name 'stratum_cc_binary' is not defined
ERROR: error loading package 'stratum/hal/bin/bmv2': Package 'stratum/hal/bin/bmv2' contains errors
INFO: Elapsed time: 25.817s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)
Any help will be highly appreciated.
I need to work with the bmv2 project and stratum project together. If you have the script for building the whole project with bmv2, that would be really great.
from stratum.
Can you confirm you are using Bazel 0.23.2? (bazel version
)
I also think the README is outdated about installing PI and bmv2 first. Building bmv2 (//stratum/hal/bin/bmv2:stratum_bmv2
) in the dev container just works out-of-the-box.
Are you trying a native build?
from stratum.
Returning back to bazel 0.23.2 solves the problem of installing bmv2.
Yes, I am trying a native build.
from stratum.
Where to find the details of native installation?
from stratum.
There are no instructions for that. Your best bet is mimicking the build docker image as close as possible.
I was also wrong about the PI/bmv2 deps, we still install them.
I might be easier to build in docker and then copy the binary out.
from stratum.
Related Issues (20)
- Invalid error code on P4RT write request with unknown device ID HOT 3
- Stratum does not report `FAILED_PRECONDITION` for reads without a pipeline
- Write fix function table when stratum runs HOT 2
- Could I run statum with the functionality to set mirror fixed table? HOT 1
- Build failure, any suggestion pls HOT 1
- Bug : syntax error
- Unable to forward PacketIn messages to ONOS controller from Tofino switch
- How to install stratum on Edgecore Switch??
- bazel build command failed as it does not have root privileges HOT 1
- getting ONOS controller container to communicate with mininet container HOT 3
- Building the stratum_bmv2 package fails at bazel build HOT 4
- Problem with protobuf at start stratum under asterfusion switch HOT 1
- symbol lookup error: /usr/bin/stratum_bf: undefined symbol: onlp_sw_init HOT 3
- When I start stratum by stratum/hal/bin/barefoot/docker/start-stratum-container.sh,It will report error info,Should I ignore it or fix it HOT 7
- tar ball bf-sde-9.5.2-install.tgz VERION issues HOT 2
- Connect ONOS with Stratum HOT 9
- Connect ONOS with Tofino using pipeconf fabric-tna HOT 45
- Issues for changing node_id for stratum, how to fix it? HOT 3
- Update dependency versions
- [Question]symbol lookup error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stratum.