[PATCH 2/6] tools/dwarves: add host package

Rosen Penev rosenp at gmail.com
Mon Feb 28 22:45:52 PST 2022


On Mon, Feb 28, 2022 at 8:17 AM Stijn Tintel <stijn at linux-ipv6.be> wrote:
>
> On 28/02/2022 16:16, Ansuel Smith wrote:
> >> On 27/02/2022 17:20, Ansuel Smith wrote:
> >>>  >
> >>>> From: Tony Ambardar <itugrok at yahoo.com>
> >>>>
> >>>> dwarves is a set of tools that use the debugging information inserted in
> >>>> ELF binaries by compilers such as GCC. Utilities in the dwarves suite
> >>>> include pahole, which can be used to find alignment holes in structs and
> >>>> classes, and also extracts other information such as CPU cacheline
> >>>> alignment, helping pack those structures to achieve more cache hits.
> >>>>
> >>>> These tools are also used to encode and read the BTF type information
> >>>> format used with the bpf syscall, making this a Linux build dependency
> >>>> when using kernel BTF information.
> >>> BTW this fails to build if libdw-dev is not installed with
> >>>
> >>> -- Checking availability of DWARF and ELF development libraries
> >>> -- Could NOT find dwarf include dir
> >>> -- Could NOT find libdw include dir
> >>> -- Could NOT find libdw library
> >>> CMake Error at cmake/modules/FindDWARF.cmake:93 (message):
> >>>   Could NOT find some ELF and DWARF libraries, please install the missing
> >>>   packages
> >>> Call Stack (most recent call first):
> >>>   CMakeLists.txt:60 (find_package)
> >>>
> >>>     ERROR: tools/dwarves failed to build.
> >>>
> >>> Should we add it to the build prereq?
> >> Please try this instead:
> >>
> >> diff --git a/tools/dwarves/Makefile b/tools/dwarves/Makefile
> >> index b02a2398a1..e5a55706be 100644
> >> --- a/tools/dwarves/Makefile
> >> +++ b/tools/dwarves/Makefile
> >> @@ -12,14 +12,12 @@PKG_LICENSE:=GPL-2.0-only
> >> PKG_LICENSE_FILES:=COPYING
> >>
> >> HOST_BUILD_PARALLEL:=1
> >> +PKG_BUILD_DEPENDS:=elfutils/host
> >>
> >> include $(INCLUDE_DIR)/host-build.mk
> >> include $(INCLUDE_DIR)/cmake.mk
> >>
> >> CMAKE_HOST_OPTIONS += \
> >> -       -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
> >> -       -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
> >> -       -DCMAKE_BUILD_TYPE=Release \
> >>        -D__LIB=lib \
> >>        -DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOST)/lib" \
> >>        -DCMAKE_SKIP_RPATH=FALSE
> >>
> >> Thanks,
> >> Stijn
> >>
> > No luck... still
> >
> Apparently we cannot use PKG_BUILD_DEPENDS or HOST_BUILD_DEPENDS in
> tools/, as this is handled in include/package-dumpinfo.mk, which is
> included from include/package.mk, which we don't include in tools/...
> Could use some guidance here, as I am not familiar enough with this part
> of the code.
depends for tools/ are specified in tools/Makefile. Which means it
requires tools/elfutils
>
> Thanks,
> Stijn
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list