configure script is looking for libdwarf headers only in PREFIX #471

Closed
nhlfr opened this Issue Jan 4, 2017 · 0 comments

Projects

None yet

1 participant

@nhlfr
Contributor
nhlfr commented Jan 4, 2017

By default, if you install libdwarf-dev/libdwarf-devel package from the most of Linux distributions, headers land in /usr/include/libdwarf.

Flatpak's configure script assumes that the header is in $(includedir)/include/libdwarf, which by default is /usr/local/include/libdwarf. That's why this error occurs:

checking for libdwarf/dwarf.h... yes
configure: error: dwarf.h is required but was not found; locate it using --with-dwarf-header=/path/containing/header

The path to the libdwarf header can be provided manually by --with-dwarf-header-option, but what about jhbuild? When you use gnome-world moduleset and do jhbuild build flatpak, then the error above occurs and the only thing which can be done to fix this is changing the moduleset contents, like:

diff --git a/modulesets/gnome-world.modules b/modulesets/gnome-world.modules
index 7305ea3..073695a 100644
--- a/modulesets/gnome-world.modules
+++ b/modulesets/gnome-world.modules
@@ -3245,7 +3245,7 @@
     </dependencies>
   </autotools>
 
-  <autotools id="flatpak" autogenargs="--disable-sudo --disable-system-helper">
+  <autotools id="flatpak" autogenargs="--disable-sudo --disable-system-helper --with-dwarf-header=/usr/include/libdwarf">
     <branch repo="github.com"
             module="flatpak/flatpak"/>
     <dependencies>

I think that the change above is not good to be proposed for jhbuild's upstream and that it would be better to fix looking for libdwarf here, in flatpak. Unfortunately, libdwarf/dwarf doesn't support pkg-config. I don't know any better way that just add -I/usr/include/libdwarf to CPPFLAGS.

If anyone has any better suggestions, I would appreciate them.

@nhlfr nhlfr added a commit to kinvolk/flatpak that referenced this issue Jan 4, 2017
@nhlfr nhlfr configure: Look for the libdwarf headers also in /usr/include/libdwarf
Before this change, configure script looked for them only in
$includedir, which doesn't work well with jhbuild.

Fixes #471
56eec49
@alexlarsson alexlarsson closed this in #472 Jan 12, 2017
@alexlarsson alexlarsson added a commit that referenced this issue Jan 12, 2017
@nhlfr @alexlarsson nhlfr + alexlarsson configure: Look for the libdwarf headers also in /usr/include/libdwarf
Before this change, configure script looked for them only in
$includedir, which doesn't work well with jhbuild.

Fixes #471
2860c0c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment