You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for this project! I've started using it (optionally, for now) in one of my projects.
While trying to build on macOS, I noticed that cpptrace isn't yet available in Homebrew. So I thought "how hard can it be" and started writing up a formula, which is currently on a dev branch.
While this works fine, there are a two issues:
ccache is currently a hard dependency. I believe the issue here is that if ccache happens to be installed, but it's not a dependency, then cmake will somehow find the ccache binary, but it won't be in the PATH while building. Making it a hard dependency will put ccache in the PATH. This should be fixed by fix: actually use ccache binary returned by find_program #184.
A more serious issue is that libdwarf (the formula is called dwarfutils in Homebrew) must be found via pkgconfig, as the formula doesn't installed a CMake config. This is fine for just building cpptrace, but when using cpptrace from another CMake project via find_package, the cpptrace::cpptrace target will try to link -ldwarf, which it doesn't find because it doesn't recall the linker search path from building cpptrace. This should be fixable by adding the original pkg_check_modules call to cpptrace-config-cmake.in and making sure the dependency is correctly resolved. Maybe you have a better idea.
The text was updated successfully, but these errors were encountered:
Hello! Thank you for opening this and taking the time to look into a homebrew formula!
Regarding libdwarf, unfortunately I'm not sure the best solution. Even with cmake this stuff is a pain (at least for me). I think what you are suggesting sounds reasonable. The current code checks for a configuration option due to something I encountered when packaging the library for conda.
And easy and safe solution would be to add something similar to facilitate homebrew. Using pkg_check_modules in the config file any time pkg_check_modules is used in the CMakeLists.txt could also be correct though I'd want to test that locally.
P.s.: Nice project, I think I've heard of DwarFS before :)
And easy and safe solution would be to add something similar to facilitate homebrew. Using pkg_check_modules in the config file any time pkg_check_modules is used in the CMakeLists.txt could also be correct though I'd want to test that locally.
Cool, I'll see if I can play with this a bit and come up with a PR. I have the same problem in DwarFS and what I suggested is what worked for me.
P.s.: Nice project, I think I've heard of DwarFS before :)
Thanks! :)
cpptracehelped significantly in the investigation of a recent Windows-specific bug.
First of all, thanks for this project! I've started using it (optionally, for now) in one of my projects.
While trying to build on macOS, I noticed that
cpptrace
isn't yet available in Homebrew. So I thought "how hard can it be" and started writing up a formula, which is currently on a dev branch.While this works fine, there are a two issues:
ccache
is currently a hard dependency. I believe the issue here is that ifccache
happens to be installed, but it's not a dependency, then cmake will somehow find theccache
binary, but it won't be in thePATH
while building. Making it a hard dependency will putccache
in thePATH
. This should be fixed by fix: actually use ccache binary returned byfind_program
#184.libdwarf
(the formula is calleddwarfutils
in Homebrew) must be found via pkgconfig, as the formula doesn't installed a CMake config. This is fine for just buildingcpptrace
, but when usingcpptrace
from another CMake project viafind_package
, thecpptrace::cpptrace
target will try to link-ldwarf
, which it doesn't find because it doesn't recall the linker search path from buildingcpptrace
. This should be fixable by adding the originalpkg_check_modules
call tocpptrace-config-cmake.in
and making sure the dependency is correctly resolved. Maybe you have a better idea.The text was updated successfully, but these errors were encountered: