Open okeuday opened 3 years ago
But what happens on other/older distribution then?
@bombela While libdwarf doesn't enforce an installation directory (based on this) it looks like installation is expected to have its own libdwarf directory because it needs to avoid any potential conflict with libdw (e.g., Alpine does the same).
You can always add /usr/include/libdwarf
to your compiler flags. But I take note the libdwarf1
on Ubuntu is not listed in pkg-config.
And indeed these two packages have both "dwarf.h"! Ubuntu 22.04 LTS:
$ apt-file show libdwarf-dev | grep '\.h$'
libdwarf-dev: /usr/include/libdwarf/dwarf.h
libdwarf-dev: /usr/include/libdwarf/libdwarf.h
$ apt-file show libdw-dev | grep '\.h$'
libdw-dev: /usr/include/dwarf.h
libdw-dev: /usr/include/elfutils/known-dwarf.h
libdw-dev: /usr/include/elfutils/libdw.h
libdw-dev: /usr/include/elfutils/libdwelf.h
libdw-dev: /usr/include/elfutils/libdwfl.h
I am not sure what to do here. C++ headers are not namespaced. Well at least not until modules come to C++, and even that will take time to be available everywhere. So maybe your proposal is reasonable.
dwarf.h
file)