When running # armv7a-hardfloat-linux-gnueabi-emerge -avt sys-apps/dtc emerge failed with armv7a-hardfloat-linux-gnueabi-gcc -I libfdt -I . -O2 -pipe -fomit-frame-pointer -fPIC -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow -I/usr/include/valgrind -o yamltree.o -c yamltree.c yamltree.c:23:10: fatal error: yaml.h: No such file or directory #include <yaml.h> ^~~~~~~~ compilation terminated. make: *** [Makefile:333: yamltree.o] Error 1 * ERROR: sys-apps/dtc-1.5.0::gentoo failed (compile phase): After running armv7a-hardfloat-linux-gnueabi-emerge -avt dev-libs/libyaml I was able to successfully emerge sys-apps/dtc
I think it's a case where host pkg-config was used against target: NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?) We have 2 bugs here: - automagic libyaml dependency - missing PKG_CONFIG setting
I hit this error myself earlier. The correct pkg-config can be set with the PKG_CONFIG environment variable. Could something like this be done to disable the automatic feature? (It would also be nice to have an EAPI 7 bump to use BDEPEND properly.) --- sys-apps/dtc/dtc-1.5.0.ebuild +++ sys-apps/dtc/dtc-1.5.0.ebuild @@ -17,9 +17,10 @@ LICENSE="GPL-2" SLOT="0" -IUSE="static-libs" +IUSE="static-libs yaml" DEPEND=" + yaml? ( dev-libs/libyaml ) sys-devel/bison sys-devel/flex " @@ -44,6 +45,7 @@ -e 's:-g -Os::' \ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \ + -e "/^NO_YAML :=/s/=.*/= $(usex yaml 0 1)/" \ Makefile || die tc-export AR CC
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d79c54aba7eba3ca94367d9f864b066d7e04012 commit 3d79c54aba7eba3ca94367d9f864b066d7e04012 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-07-06 22:39:55 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-07-06 22:40:03 +0000 sys-apps/dtc: add USE=yaml While at it added pkgconfig to build-time depends. Reported-by: m.manico@gmx.at Closes: https://bugs.gentoo.org/693714 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-apps/dtc/dtc-1.5.0-r1.ebuild | 64 ++++++++++++++++++++++++++++++++++++++++ sys-apps/dtc/dtc-9999.ebuild | 14 ++++++--- sys-apps/dtc/metadata.xml | 3 ++ 3 files changed, 77 insertions(+), 4 deletions(-)