musl arm vanilla stage3 here In file included from tcpd.c:40:0: tcpd.h:20:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ struct host_info { ^ tcpd.c:42:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ void fix_options(struct request_info *request); ^ In file included from hosts_access.c:56:0: tcpd.h:20:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ struct host_info { ^ In file included from shell_cmd.c:35:0: tcpd.h:20:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ struct host_info { ^ hosts_access.c:60:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’ extern jmp_buf tcpd_buf; ^ In file included from options.c:61:0: tcpd.h:20:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ struct host_info { ^ options.c:65:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ int dry_run = 0; /* flag set in verification mode */ ^ shell_cmd.c:39:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘static’ static void do_child(); ^ hosts_access.c: In function ‘hosts_access’: hosts_access.c:133:22: error: ‘tcpd_buf’ undeclared (first use in this function) verdict = setjmp(tcpd_buf); ^ hosts_access.c:133:22: note: each undeclared identifier is reported only once for each function it appears in shell_cmd.c:112:13: warning: conflicting types for ‘do_child’ static void do_child(command) ^ shell_cmd.c:112:13: error: static declaration of ‘do_child’ follows non-static declaration shell_cmd.c:90:2: note: previous implicit declaration of ‘do_child’ was here do_child(command); ^ Makefile:686: recipe for target 'tcpd.o' failed
Please attach the complete build.log and the output of the "emerge --info" command.
Created attachment 439250 [details] emerge --info
Created attachment 439252 [details] build log
most likely some incompatibility with musl specifically
When using a musl stage the musl overlay should also be used. Many other packages will fail to compile without it. It adds a patch tcp-wrappers-7.6.22-remove-DECLS.patch which should not break anything else (and fix this bug). Maybe it can be included in the main tree. Here it is: diff -Naur tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h --- tcp_wrappers_7.6.orig/tcpd.h 2014-03-24 18:39:52.000000000 +0000 +++ tcp_wrappers_7.6/tcpd.h 2014-03-24 18:48:21.000000000 +0000 @@ -11,7 +11,9 @@ #include <netinet/in.h> #include <stdio.h> +#ifdef __cplusplus __BEGIN_DECLS +#endif /* Structure to describe one communications endpoint. */ @@ -252,6 +254,8 @@ extern char *my_strtok(); #endif +#ifdef __cplusplus __END_DECLS +#endif #endif
Created attachment 439666 [details, diff] Patch against tcp-wrappers-7.6.22 Actually, the patch from the musl overlay is not completely correct (does not work with C++ programs using tcpd.h). See the attached corrected patch.
It works if installed from the overlay, thank you.
I agree Felix' patch (comment #6) looks better and can confirm it fixes the build with musl. Ok to commit that patch to -r2?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3f24e117981dfca2b86c97525b8c82566bcc022 commit d3f24e117981dfca2b86c97525b8c82566bcc022 Author: John Helmert III <ajak@gentoo.org> AuthorDate: 2021-07-12 02:45:15 +0000 Commit: John Helmert III <ajak@gentoo.org> CommitDate: 2021-07-12 02:48:19 +0000 sys-apps/tcp-wrappers: add 7.6.31 Bumps to Debian patchset 31, fixes musl compilation. Closes: https://bugs.gentoo.org/587498 Acked-by: Sam James <sam@gentoo.org> Signed-off-by: John Helmert III <ajak@gentoo.org> sys-apps/tcp-wrappers/Manifest | 1 + sys-apps/tcp-wrappers/tcp-wrappers-7.6.31.ebuild | 108 +++++++++++++++++++++++ 2 files changed, 109 insertions(+)