https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: sys-process/tini-0.19.0-r1 fails to compile. Discovered on: amd64 (internal ref: tinderbox_musl) System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0002
Created attachment 896478 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: FAILED: CMakeFiles/tini-static.dir/src/tini.c.o FAILED: CMakeFiles/tini.dir/src/tini.c.o /var/tmp/portage/sys-process/tini-0.19.0-r1/work/tini-0.19.0/src/tini.c:227:36: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
Not c99 related.
Hi, not a dev sorry, but I think this issue is caused by the recent removable of the basename() function from string.h in musl 1.2.5 The package compiles successfully on musl 1.2.4, and I think adding libgen.h to tini.c should resolve the issue. I think something like this will work, but I'm going to try testing it a bit later tonight when I can set up an env with musl 1.2.5 :) diff --git a/src/tini.c b/src/tini.c index eb62015..8466b66 100644 --- a/src/tini.c +++ b/src/tini.c @@ -9,6 +9,7 @@ #include <errno.h> #include <signal.h> #include <string.h> +#include <libgen.h> #include <time.h> #include <stdio.h> #include <stdlib.h>
(In reply to Bryce from comment #4) > Hi, not a dev sorry, but I think this issue is caused by the recent > removable of the basename() function from string.h in musl 1.2.5 > > The package compiles successfully on musl 1.2.4, and I think adding libgen.h > to tini.c should resolve the issue. > > I think something like this will work, but I'm going to try testing it a bit > later tonight when I can set up an env with musl 1.2.5 :) > > diff --git a/src/tini.c b/src/tini.c > index eb62015..8466b66 100644 > --- a/src/tini.c > +++ b/src/tini.c > @@ -9,6 +9,7 @@ > #include <errno.h> > #include <signal.h> > #include <string.h> > +#include <libgen.h> > #include <time.h> > #include <stdio.h> > #include <stdlib.h> There is a pull request with this patch: https://github.com/krallin/tini/pull/223 The patch works fine on my system.
Upstream didn't react to the PR with fix since April 2024. The last merged PR is from January 2023. I think it's safe to assume that the project is just unmaintained. Would you be open to switching from tini to catatonit? It's already packaged and used for podman, I think we could make it work with docker as well.
Created attachment 920157 [details, diff] Patch to musl system The bug still present in 0.19.0-r1 version. This patch works fine on my system.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86bb4af29fee8a1c83ca9f30f885e0e0b4147329 commit 86bb4af29fee8a1c83ca9f30f885e0e0b4147329 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2025-03-05 02:44:16 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2025-03-05 02:49:04 +0000 sys-process/tini: Patch basename for musl Closes: https://bugs.gentoo.org/934990 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-process/tini/files/tini-0.19.0-musl-basename.patch | 13 +++++++++++++ sys-process/tini/tini-0.19.0-r1.ebuild | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-)