Skip to content

Installation fails on Arch Linux (libdwarf.h not found) #244

Description

@xSke

Related to #243 and #238, but not quite the same solution.

On Arch, libdwarf.h lives at /usr/include/libdwarf-2/libdwarf.h, which isn't checked for in your CMakeLists.txt at all:

# Look for the libdwarf.h header
# It could be under libdwarf/libdwarf.h or libdwarf-0/libdwarf.h
# or libdwarf/libdwarf-0/libdwarf.h
find_path(DWARF_HEADER NAMES libdwarf.h PATHS /usr/include/libdwarf /usr/include/libdwarf-0 /usr/include/libdwarf/libdwarf-0)

As a temporary workaround, run this:

sudo mkdir /usr/include/libdwarf-0
sudo ln -s /usr/include/libdwarf-2/libdwarf.h /usr/include/libdwarf-0/libdwarf.h

I'm not sure what the difference between libdwarf-0 and libdwarf-2 is, but with this workaround, libdebug successfully compiles and runs. (If you just place it in /usr/include/libdwarf.h, it'll detect the wrong version of libdwarf and compilation will fail)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions