Skip to content

Conversation

okeuday
Copy link
Contributor

@okeuday okeuday commented Aug 18, 2021

  • Ubuntu 20.04 and 18.04 use a libdwarf include directory (probably to avoid confusion with the separate dwarf.h file)

@bombela
Copy link
Owner

bombela commented Oct 29, 2021

But what happens on other/older distribution then?

@okeuday
Copy link
Contributor Author

okeuday commented Oct 29, 2021

@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).

@bombela
Copy link
Owner

bombela commented Oct 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants