The package fails to compile with USE=static-libs with: libfdt/meson.build:37:11: ERROR: Tried to create target "fdt", but a target of that name already exists. build.log and meson-log.txt attached. Reproducible: Always Steps to Reproduce: 1. emerge =sys-apps/dtc-1.7.0 Actual Results: The build fails. Expected Results: The build should complete without errors.
Please include the full build.log, meson-log.txt, amd emerge --info.
Created attachment 864802 [details] emerge.info
Created attachment 864803 [details] build.log
Created attachment 864804 [details] meson-log.txt
I am also experiencing this exact build problem
Also seeing this since a while.
Here's a diff that'll fix it. @lu_zero - Lemme know if you want me to commit it. diff --git a/sys-apps/dtc/dtc-1.7.0.ebuild b/sys-apps/dtc/dtc-1.7.0.ebuild index a56040b060aa..4c213fb685de 100644 --- a/sys-apps/dtc/dtc-1.7.0.ebuild +++ b/sys-apps/dtc/dtc-1.7.0.ebuild @@ -63,12 +63,13 @@ src_prepare() { src_configure() { local emesonargs=( - -Ddefault_library=$(usex static-libs both shared) -Dtools=true -Dvalgrind=disabled # only used for some tests $(meson_feature python) $(meson_feature yaml) ) + use static-libs && emesonargs+=( -Dstatic-build=true ) + meson_src_configure }
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0428966db63c13fc0142f0500e5c44895793eb37 commit 0428966db63c13fc0142f0500e5c44895793eb37 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-09-25 02:19:33 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-09-25 02:19:33 +0000 sys-apps/dtc: fix static build Closes: https://bugs.gentoo.org/909366 Thanks-to: Jason A. Donenfeld <zx2c4@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> sys-apps/dtc/dtc-1.7.0.ebuild | 4 +++- sys-apps/dtc/dtc-9999.ebuild | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=719e0d13b5f3914483c6d531c7f7abe69baba601 commit 719e0d13b5f3914483c6d531c7f7abe69baba601 Author: Eli Schwartz <eschwartz@gentoo.org> AuthorDate: 2025-05-06 16:50:20 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2025-05-06 17:40:29 +0000 sys-apps/dtc: fix USE=static-libs to control static libs ... as opposed to passing an upstream option to enable building executables with `LDFLAGS="-static"`, while still installing the static libs. Bug: https://bugs.gentoo.org/909366 Closes: https://bugs.gentoo.org/907940 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> sys-apps/dtc/{dtc-1.7.2-r1.ebuild => dtc-1.7.2-r2.ebuild} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4aca471832025475b501896d8c778b0b4489ae5 commit f4aca471832025475b501896d8c778b0b4489ae5 Author: Eli Schwartz <eschwartz@gentoo.org> AuthorDate: 2025-05-06 16:38:41 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2025-05-06 17:40:28 +0000 Revert "sys-apps/dtc: fix static build" This reverts commit 0428966db63c13fc0142f0500e5c44895793eb37. At least, revert it in live. The entire commit was totally bogus. The build option in question just determined whether to build using LDFLAGS="-static". Upstream didn't support building without static libs at all, until https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=dd1b3e532d228ed75d34480ee539f71b76a4fa89 so the correct solution to support USE=static-libs was always, rm the file after the fact. But now that it is correctly supported in live we can go back to the original intention. Bug: https://bugs.gentoo.org/907940 Bug: https://bugs.gentoo.org/909366 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> sys-apps/dtc/dtc-9999.ebuild | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)