GithubHelp home page GithubHelp logo

reproduce_drake_bazel_installed's Introduction

Repo that reproduces the bugs that I encounter when using installed drake as external with bazel build system

  • This repo is a copy of the official drake_bazel_installed example.
  • I also add several targets from the official drake_bazel_external to produce the bugs.
  • I use an apt installed drake, which is located at /opt/drake. The bugs persists when I change to use the http_archive drake.
  • I can build and run the original targets in drake_bazel_installed successfully with both the apt installed drake and the http_archive installed drake.

To reproduce the bug, run

bazel build //...

The error info that I see is:

DEBUG: Rule 'drake_artifacts' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "073219cda0ee55fc302395d6dbdd8c703d4734774b1cc3a8d3c8289e5024b071"
DEBUG: Repository drake_artifacts instantiated at:
  /home/chenwang/repro_drake_bazel_external/drake_bazel_installed/WORKSPACE:63:13: in <toplevel>
Repository rule http_archive defined at:
  /home/chenwang/.cache/bazel/_bazel_chenwang/026752f2886d35384cb1076d1dc9796d/external/bazel_tools/tools/build_defs/repo/http.bzl:353:31: in <toplevel>
INFO: Analyzed 8 targets (55 packages loaded, 3114 targets configured).
INFO: Found 8 targets...
ERROR: /home/chenwang/repro_drake_bazel_external/drake_bazel_installed/apps/BUILD.bazel:98:11: Compiling apps/simple_adder.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 27 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from bazel-out/k8-opt/bin/external/drake/_virtual_includes/.drake_headers/drake/common/default_scalars.h:3,
                 from bazel-out/k8-opt/bin/external/drake/_virtual_includes/.drake_headers/drake/systems/framework/leaf_system.h:14,
                 from apps/simple_adder.h:41,
                 from apps/simple_adder-inl.h:41,
                 from apps/simple_adder.cc:41:
bazel-out/k8-opt/bin/external/drake/_virtual_includes/.drake_headers/drake/common/autodiff.h:12:10: fatal error: Eigen/Core: No such file or directory
   12 | #include <Eigen/Core>
      |          ^~~~~~~~~~~~
compilation terminated.
INFO: Elapsed time: 38.676s, Critical Path: 0.15s
INFO: 12 processes: 12 internal.
FAILED: Build did NOT complete successfully

Update:
By adding

build --cxxopt=-I/usr/include/eigen3

to the .bazelrc file, I can solve the above problem. However, when I try to build the new added connection_test.cc which uses iiwa_status_receiver.h, I encounter a similar header not found error:

ERROR: /home/chenwang/repro_drake_bazel_external/drake_bazel_installed/apps/BUILD.bazel:102:10: Compiling apps/connection_test.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 32 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from apps/connection_test.cc:10:
bazel-out/k8-opt/bin/external/drake/_virtual_includes/.drake_headers/drake/manipulation/kuka_iiwa/iiwa_status_receiver.h:6:10: fatal error: drake/lcmt_iiwa_status.hpp: No such file or directory
    6 | #include "drake/lcmt_iiwa_status.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
INFO: Elapsed time: 2.967s, Critical Path: 0.24s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully

To reproduce the bug, run

bazel build //...

This will use the installed drake in /opt/drake

reproduce_drake_bazel_installed's People

Contributors

cwezio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.