Replies: 1 comment 3 replies
-
Thanks for your kind words, I'm happy to hear it worked well for you! I appreciate the feedback a lot; ease of use for build and deployment is a big priority. Out of curiosity, would getting the package through conan or vcpkg be an option in your corporate environment? That might be the easiest way if fetchcontent isn't an option. If building locally is the best way to go, would a normal
I am noticing that Alternatively, libdwarf can be built from source and then For building libdwarf from source: cd ~/scratch/cpptrace-test
mkdir resources
git clone https://github.com/davea42/libdwarf-code.git
cd libdwarf-code
git checkout 6216e185863f41d6f19ab850caabfff7326020d7 # looks like some cmake stuff changed upstream, checking out the commit cpptrace currently uses
mkdir build
cd build
cmake .. -DPIC_ALWAYS=On -DBUILD_DWARFDUMP=Off -DCMAKE_INSTALL_PREFIX=~/scratch/cpptrace-test/resources
make -j
make install
# Consolidate compiler generated dependencies of target dwarf
# [100%] Built target dwarf
# Install the project...
# -- Install configuration: ""
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib64/libdwarf.a
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/libdwarf.a
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/libdwarf/libdwarf-targets.cmake
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/libdwarf/libdwarf-targets-noconfig.cmake
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/libdwarf/libdwarf-config.cmake
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/include/libdwarf/libdwarf.h
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/include/libdwarf/dwarf.h
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/pkgconfig/libdwarf.pc Then cpptrace: cd ~/scratch/cpptrace-test
git clone https://github.com/jeremy-rifkin/cpptrace.git
cd cpptrace
git checkout v0.3.1
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=On -DCPPTRACE_USE_EXTERNAL_LIBDWARF=On -DCMAKE_PREFIX_PATH=~/scratch/cpptrace-test/resources -DCMAKE_INSTALL_PREFIX=~/scratch/cpptrace-test/resources
make -j
make install
# Consolidate compiler generated dependencies of target cpptrace-lib
# [100%] Built target cpptrace-lib
# Install the project...
# -- Install configuration: "Release"
# -- Up-to-date: /homes/rifkin/scratch/cpptrace-test/resources/include
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/include/cpptrace
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/include/cpptrace/cpptrace.hpp
# -- Up-to-date: /homes/rifkin/scratch/cpptrace-test/resources/include
# -- Up-to-date: /homes/rifkin/scratch/cpptrace-test/resources/include/cpptrace
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/include/cpptrace/cpptrace_export.hpp
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/libcpptrace.so.0.3.1
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/libcpptrace.so.0
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/libcpptrace.so
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/cpptrace/cpptrace-config.cmake
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/cpptrace/cpptrace-config-version.cmake
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/cpptrace/cpptrace-targets.cmake
# -- Installing: /homes/rifkin/scratch/cpptrace-test/resources/lib/cmake/cpptrace/cpptrace-targets-release.c Then everything should be good to go with the libraries located at Regarding red hat deprecating libdwarf, I don't expect that to be an issue since cpptrace is getting the library through fetchcontent or a separate installation. I wouldn't expect libdwarf to just break on red hat, but maybe there's something red hat specific I don't know about. |
Beta Was this translation helpful? Give feedback.
-
First of all, I have to say what an amazing bit of work cpptrace is! I just tried it out and it works a treat. Well done Jeremy for solving such a difficult problem and making it freely available. Thanks!
But I am trying to introduce its use into the corporation I work for and I note a few rough edges. First, the build tried to fetch things from git (dwarf-lite). That doesn't work in a corporate environment due to firewalls. So I had to build it at home. Second, I could not see a clean distribution directory coming out of the build process. The cpptrace.h header is in a different include dir to others that are also needed. I was hoping to see a distribution dir with include and lib underneath with all the stuff needed for full compiling and linking. All the stuff is present, it just needs marshalling. It's not a showstopper, I can do it by hand for the moment. But IMO it's something that needs a little attention. Finally, I note that on Red Hat the dwarf lib has just been deprecated. What implication, if any, does this have for cpptrace?
Beta Was this translation helpful? Give feedback.
All reactions