Created attachment 723025 [details] The output of emerge --info '=sys-apps/util-linux-2.36.2::gentoo' After reading the news item about migrating to libxcrypt I tried following the instructions on the wiki(https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation). However, after making the changes to enable libxcrypt my system will only partially complete the update process. It emerges and installs libxcrypt and glibc without any problems, but it fails when it gets to sys-apps/util-linux. What I believe to be the relevant error message is below (but the full build log is also attached): In file included from /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/libmount/src/context.c:42: /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/include/namespace.h:43:19: error: static declaration of ‘unshare’ follows non-static declaration 43 | static inline int unshare(int flags) | ^~~~~~~ In file included from /usr/include/sched.h:43, from /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/include/namespace.h:11, from /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/libmount/src/context.c:42: /usr/include/bits/sched.h:86:12: note: previous declaration of ‘unshare’ was here 86 | extern int unshare (int __flags) __THROW; | ^~~~~~~ In file included from /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/libmount/src/context.c:42: /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/include/namespace.h:50:19: error: static declaration of ‘setns’ follows non-static declaration 50 | static inline int setns(int fd, int nstype) | ^~~~~ In file included from /usr/include/sched.h:43, from /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/include/namespace.h:11, from /var/tmp/portage/sys-apps/util-linux-2.36.2/work/util-linux-2.36.2/libmount/src/context.c:42: /usr/include/bits/sched.h:95:12: note: previous declaration of ‘setns’ was here 95 | extern int setns (int __fd, int __nstype) __THROW; | ^~~~~ make[2]: *** [Makefile:10158: libmount/src/la-context.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... There appears to be an open upstream bug report (https://github.com/karelzak/util-linux/issues/933) that seems to trigger the same error. I've posted a more complete summary of the steps I have taken on the gentoo forums (https://forums.gentoo.org/viewtopic-p-8633737.html#8633737), but they are hard to reproduce here in plain text. In brief summary: 1) I show the current version of libcrypt and glibc before migrating to libxcrypt. 2) Show which gcc version I am using (gcc 10.3.0) 3) Show a successful emerge of util-linux 4) sync my system (emerge --sync) 5) update my system (emerge -uvDU --with-bdeps=y @world 6) clean my system (emerge -acq) 7) Make the use flag, keyword, etc. changes to enable libxcrypt 8) Update the system (emerge -uavDU @world) 9) There are 22 packages to emerge 10) It fails on 17 of 22 (util-linux) Please see the attached emerge --info (emerge.info) and build.log
Created attachment 723028 [details] The full build log
Big thanks. Could you include config.log too?
I'd be happy to, but I only saw the build log. Where is it located?
(In reply to Reid Swanson from comment #3) > I'd be happy to, but I only saw the build log. Where is it located? Cheers! For me, it's in /var/tmp/portage/sys-apps/util-linux-2.36/work/util-linux-2.36-abi_x86_64.amd64/config.log, but it may be in /var/tmp/portage/sys-apps/util-linux-2.36/work/util-linux-2.36.2-abi_x86_32.x86/config.log for you because that's the variant which is failing.
Created attachment 723031 [details] config.log for abi_x86_64
Created attachment 723034 [details] config.log for abi_x86_32
There were logs in both locations so I attached them both.
Created attachment 723037 [details, diff] fix definitions overrides I was bitten by this issue and force compile to continue with this patch. The patch should apply safe to systems were the bug doesn't hit as there is both case no need for those redefinitions. I didn't spend long time to really inspect the situation carefully so I hope some people will be interested in inspecting more carefully side effects. Weird thing is that next day when trying to open the bug, I wasn't hit by the wrong behavior anymore.
This issue is already described on the upstream bugtracker: https://github.com/karelzak/util-linux/issues/933
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f97eb250b55904388c542a546ec048f239f89b5c commit f97eb250b55904388c542a546ec048f239f89b5c Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2021-07-10 21:24:33 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2021-07-10 21:31:41 +0000 sys-apps/util-linux: Attempt fix build with sys-libs/libxcrypt[-abi_x86_32] Bug: https://bugs.gentoo.org/801403 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> .../files/util-linux-2.37-avoid_autoreconf.patch | 136 +++++++++++++++++++++ .../files/util-linux-2.37-lcrypt_link_fix.patch | 50 ++++++++ .../files/util-linux-2.37-lcrypt_use_LIBS.patch | 91 ++++++++++++++ sys-apps/util-linux/util-linux-2.37.ebuild | 4 + 4 files changed, 281 insertions(+)
This occurred when building util-linux[abi_x86_32] with libxcrypt[-abi_x86_32]. We only need libxcrypt for the native (64 bit) variant on amd64 because it's only used for sulogin (a binary, not a library -- which isn't compiled/installed on the non-native variant). For posterity, patches were: - https://github.com/karelzak/util-linux/commit/637cc045ee464909c261d6fa16c71ed15cd455e3 - https://github.com/karelzak/util-linux/commit/75cba8d5cdb2a0e84c23de26007feac977837a6f Mentioned this upstream too: https://github.com/karelzak/util-linux/issues/933#issuecomment-877913170. Fixes the issue for me and is included in 2.37 in Gentoo, please let us know if it still fails for any of you.
it works for me
(In reply to Alex Xu (Hello71) from comment #12) > it works for me Yep, and thanks to you after all! I think we can close this now. Fine here as well.