dev-libs/elfutils/files/0.178/musl-error_h.patch 
qLinux
… a distribution study
<< Prev Kmod
Next >> Coreutils
Reference: 8.47. Libelf from Elfutils-0.185. The package is known to NOT work well with musl. First fix the build system:
patch -Np1 -i elfutils-0.185-bld-20220207.patch
There are some more libraries required to buld elfutils with musl. First libuargp is required. This package doesn't have a configure, thus edit the  Makefile 
and change the install directories. Build and install it:
CC=gcc make make install
This installs the header file  argp.h 
, the static library  libargp.a 
and the shared library  libargp.so 
.
Second install libfts:
PKG_CONFIG_PATH=/qlnx/lib/pkgconfig ./bootstrap.sh ./configure --prefix=/qlnx --includedir=/qlnx/inc make make install
This installs the header file  fts.h 
and several  libfts.* 
library files.
Next get libobstack. If the  bootstrap.sh 
breaks with an error like “pkgconfig_DATA”, then edit  Makefile.am 
and comment out the related line. Build and install it:
PKG_CONFIG_PATH=/qlnx/lib/pkgconfig ./bootstrap.sh make make install
This installs  obstack.h 
and several  libobstack.* 
library files.
Last apply a patch to fix a missing header file1)) and to build the libelf only:
patch -Np1 -i elfutils-0.185-src-20220207.patch
Configure it:
./configure --prefix=/qlnx \ --disable-debuginfod \ --enable-libdebuginfod=dummy \ --includedir=/qlnx/inc
With the compilation of libelf only the debug parameter to  configure 
are maybe not required (not tested).
Build and install it (libelf only):
make make -C libelf install
To get this work was taken round about 1,5 days!
<< Prev Kmod
        
Next >> Coreutils
 dev-libs/elfutils/files/0.178/musl-error_h.patch