Giter Site home page Giter Site logo

tests/stacktrace_test.cc fails about rules_boost HOT 8 OPEN

nelhage avatar nelhage commented on August 25, 2024 1
tests/stacktrace_test.cc fails

from rules_boost.

Comments (8)

reltuk avatar reltuk commented on August 25, 2024 1

Hi @qzmfranklin,

Sorry you're having some issues here. You can find information about different configurations for boost stacktrace and their dependencies here: https://www.boost.org/doc/libs/1_71_0/doc/html/stacktrace/configuration_and_build.html

On linux-x86_64, this repo's BUILD.boost is compiling the library in a non-header-only mode and is compiling with libs/stacktrace/src/backtrace.cpp. That's where the requirement for backtrace.h is coming from, since that file defines #define BOOST_STACKTRACE_USE_BACKTRACE.

backtrace.h itself is expected to come from libbacktrace itself, which is typically part of the compiler I think. I think you're probably running into footnote number (4) on the boost instructions above: https://www.boost.org/doc/libs/master/doc/html/stacktrace/configuration_and_build.html#stacktrace.configuration_and_build.f3.

Let me see if I can reproduce and investigate any possible solutions...

Is a working boost stacktrace relevant to your use of rules_boost in this project, or is this more of an inquiry into the broken test suite under some situations?

from rules_boost.

reltuk avatar reltuk commented on August 25, 2024

I can confirm that CC=clang CXX=clang++ bazel test :stacktrace_test on Ubuntu 18.04.3 fails with the same error.

from rules_boost.

qzmfranklin avatar qzmfranklin commented on August 25, 2024

Wow, thanks for the nicely formatted and informative reply.

Re

Is a working boost stacktrace relevant to your use of rules_boost in this project, or is this more of an inquiry into the broken test suite under some situations?

The latter (a broken test suite). The motivating situation for me was to introduce boost into our build system for building a few other libraries that depend on boost.

We do not actively use boost directly yet. But I view supporting building boost from source as an important milestone for our team as lots of high impact libraries depend on it.

I appreciate your help here.

from rules_boost.

QuantamHD avatar QuantamHD commented on August 25, 2024

Was there any solution to this problem?

from rules_boost.

wijagels avatar wijagels commented on August 25, 2024

Not every OS provides the required library by default. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66570

Should be fixable by installing the package on your system.

Or if rules_boost included https://github.com/ianlancetaylor/libbacktrace

from rules_boost.

QuantamHD avatar QuantamHD commented on August 25, 2024

I'm building libbacktrace in bazel at the moment. I'd be happy to send a PR to this repo

from rules_boost.

QuantamHD avatar QuantamHD commented on August 25, 2024

I managed to get this to work with a hermetic cc toolchain in this commit by building libbstacktrace hermetically.

hdl/bazel_rules_hdl@196706d

from rules_boost.

baryluk avatar baryluk commented on August 25, 2024

I am having same issue. I am trying to use boost::stacktrace , but compilation failes due to missing backtrace.h include. I am using hermetic builds, and I would like to use addr2line instead as a stacktrace backend.

Maybe `:stacktrace_addr2line" , so I can use that insead of backtrace.cpp (which is default on Linux). I only use the stacktrace at top level of main when exiting abnormally, so performance is not horribly important. Also I am trying to make static executable so less library depdendencies the better.

from rules_boost.

Related Issues (20)

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.