Comments (7)
I haven't worked on the cmake side of things. I really don't understand shit about cmake. I think you could try removing the ${BACKWARD_ENABLE}
.
from backward-cpp.
@edisongustavo maybe you have some insight.
from backward-cpp.
(As an aside, the logic located in BackwardConfig.cmake makes it seem like HAS_DW or HAS_BFD could only be true mutually exclusively, was this the intention?)
Not really, if you look at the code in BackwardConfig.cmake
you will see that those only represent the detection of each library (libdw and libbfd respectively).
The order that they're applied can be seen on the series of if
, elseif
:
if (LIBDW_FOUND)
LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBDW_INCLUDE_DIRS})
LIST(APPEND BACKWARD_LIBRARIES ${LIBDW_LIBRARIES})
set(STACK_DETAILS_DW TRUE)
set(STACK_DETAILS_BFD FALSE)
set(STACK_DETAILS_BACKTRACE_SYMBOL FALSE)
elseif(LIBBFD_FOUND)
LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIRS})
LIST(APPEND BACKWARD_LIBRARIES ${LIBBFD_LIBRARIES})
set(STACK_DETAILS_DW FALSE)
set(STACK_DETAILS_BFD TRUE)
set(STACK_DETAILS_BACKTRACE_SYMBOL FALSE)
else()
set(STACK_DETAILS_DW FALSE)
set(STACK_DETAILS_BFD FALSE)
set(STACK_DETAILS_BACKTRACE_SYMBOL TRUE)
endif()
So in your case what should be done is linking with the libdw
library.
I'm curious why you're getting those linking errors. What were the commands you issued? If you used make
, could you re-run it with:
VERBOSE=1 make
from backward-cpp.
Sorry, I had stopped working on the problem I needed this for.
I messed around with it, and adding
target_link_libraries(backward PUBLIC ${BACKWARD_LIBRARIES})
to backward's CMakeLists.txt solved my problem. Not sure I could totally explain why.
from backward-cpp.
Just kidding, this made my stack traces bad:
30: backward::SignalHandling sh;
31:
> 32: } // namespace backward
Whatever, I will be satisfied with the old stack traces
from backward-cpp.
Else simply do not bother embedding the cmake config. Simply copy backward.hpp
and backward.cpp
in your project. Add some basic library detection in your build system if you fancy, else just set the list of libraries, set the corresponding #define
and be done with it ;)
from backward-cpp.
Good point; thanks
from backward-cpp.
Related Issues (20)
- Add Support for Baremetal
- Libunwind on ARM Mac can't compile
- Make print_***() ostream arguments templated HOT 1
- Default source line format compatible with compiler error format HOT 1
- How to suppress clang-tidy warnings HOT 1
- Problem calling load_here() in a parent constructor
- Load stack trace into user-provided storage HOT 1
- using "backward" in Windows OS HOT 4
- build error
- new tagged Release
- Slow stacktraces in large projects HOT 1
- Is there some situation that will not print the call stack
- Macos with libunwind do not work. HOT 2
- Source code accessibility HOT 3
- Slow stacktraces when built with clang HOT 1
- fixing this library HOT 2
- libdwarf cannot find when using vcpkg, and ibdw has become a rerequisite for libdwarf? HOT 5
- cmake vcpkg elfutil libdw missing '<dlfcn.h>'
- On arm signal trace error HOT 1
- Failed to build on Windows(mingw64) HOT 1
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 backward-cpp.