https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-misc/rwhoisd-1.5.9.6-r3 fails to compile. Discovered on: amd64 (internal ref: lto_tinderbox) System: LTO-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#LTO) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Created attachment 887905 [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: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x2f12): undefined reference to `hosts_deny_table' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x3016): undefined reference to `hosts_ctl' <artificial>:(.text+0x2ef6): undefined reference to `hosts_allow_table' collect2: error: ld returned 1 exit status
This is an ugly race, which happens because of incorrectly written target dependencies in Makefile. gcc ... -o rwhoisd ... -L../tools/tcpd_wrapper -lwrap ... starts in the same moment as ar rv libwrap.a ... ar (pid 11893) creates the file and writes the magic: 11893 11:49:25.428586 openat(AT_FDCWD, "libwrap.a", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3 11893 11:49:25.429026 write(3, "!<arch>\n", 8) = 8 11893 11:49:25.429073 close(3) = 0 and it starts collecting data from .o files. Meantime, gcc (pid 11894) needs -lwrap, it opens the archive and reads all data, which is only the magic in the moment 11894 11:49:25.527497 faccessat2(AT_FDCWD, "../tools/tcpd_wrapper/libwrap.a", F_OK, AT_EACCESS) = 0 11894 11:49:25.527995 openat(AT_FDCWD, "../tools/tcpd_wrapper/libwrap.a", O_RDONLY) = 7 11894 11:49:25.528122 read(7, "!<arch>\n", 4096) = 8 11894 11:49:25.528156 read(7, "", 4096) = 0 gcc keeps computing but ar finally writes libwrap.a data 11893 11:49:25.543624 openat(AT_FDCWD, "libwrap.a", O_WRONLY|O_TRUNC) = 3 11893 11:49:25.543715 write(3, "!<arch>\n/ 17308937"..., 8192) = 8192 11893 ... 11893 11:49:25.544333 write(3, "\0\0\0\0\0\0\4\0\0\0 \0\0\0\5\0\0\0GNU\0\2\0\1\300\4\0\0\0\0\0"..., 3418) = 3418 11893 11:49:25.544433 close(3) = 0 gcc keeps computing, it never rereads the libwrap.a and later on emits the error as it cannot locate hosts_allow_table, hosts_deny_table and hosts_ctl, which would normally be part of libwrap.a. 11894 ... 11894 11:49:28.157804 write(2, ": undefined reference to `", 26) = 26 11894 11:49:28.157861 write(2, "hosts_allow_table", 17) = 17 11894 11:49:28.157924 write(2, "'\n", 2) = 2 11894 ... 11894 11:49:28.158575 write(2, "hosts_deny_table", 16) = 16 11894 ... 11894 11:49:28.159272 write(2, "hosts_ctl", 9) = 9 11894 ...
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8031a67099d62092131950cbe3daf2118f963d4d commit 8031a67099d62092131950cbe3daf2118f963d4d Author: Petr Vaněk <arkamar@gentoo.org> AuthorDate: 2024-11-05 16:17:34 +0000 Commit: Petr Vaněk <arkamar@gentoo.org> CommitDate: 2024-11-06 14:29:13 +0000 net-misc/rwhoisd: add 1.5.9.6_p1 Use sys-apps/tcp-wrappers rather than bundled version, otherwise rwhoisd can automagically depend on it. This also resolves the bug 740790, where exported STRINGS variable was polluting CFLAGS, similarly to bug 728348. The original patches are bundled to an archive, which additionally contains: - a fix with corrected signal handlers declarations, bug 924504. - corrected dependencies in main Makefile, bug 927273 - obosolete glibc check removal from configure.ac, bug 715310 - replacement of remaings direct ar calls Closes: https://bugs.gentoo.org/715310 Closes: https://bugs.gentoo.org/740790 Closes: https://bugs.gentoo.org/924504 Closes: https://bugs.gentoo.org/927273 Signed-off-by: Petr Vaněk <arkamar@gentoo.org> net-misc/rwhoisd/Manifest | 1 + net-misc/rwhoisd/rwhoisd-1.5.9.6_p1.ebuild | 61 ++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+)