Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 802222 - sys-libs/libxcrypt-4.4.23-r1: fails install phase on prefix system
Summary: sys-libs/libxcrypt-4.4.23-r1: fails install phase on prefix system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libxcrypt-migration
  Show dependency tree
 
Reported: 2021-07-15 05:56 UTC by Marien Zwart
Modified: 2022-10-10 15:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=sys-libs/libxcrypt-4.4.23-r1::gentoo' (emerge-info.txt,6.63 KB, text/plain)
2021-07-15 05:56 UTC, Marien Zwart
Details
build.log (build.log,442.60 KB, text/plain)
2021-07-15 05:57 UTC, Marien Zwart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marien Zwart 2021-07-15 05:56:22 UTC
On a prefix system (installed into /home/marienz/gentoo), libxcrypt fails to install. I'll attach the build.log and emerge --info, but the relevant errors are:

/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/temp/environment: line 2011: no match: /home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/lib64//*.so
find: ‘/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/usr/share/doc/libxcrypt-4.4.23-r1’: No such file or directory

We're erroring out here because we're trying to delete the docs from ${D}, but they were installed into ${ED}. The "no match" error before that is more concerning: it's from "for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname);" in the ebuild, which fails because we installed the libraries (and pkgconfig file) in the wrong directory (looks like a missing ${EPREFIX} on the --libdir and --with-pkgconfigdir passed to configure). It looks like that's supposed to cause the ebuild to fail, but the failglob option itself is not sufficient (might need a "die" added somewhere).

Here's what got installed:

$ find /home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/ -type f
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_checksalt.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_gensalt.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_gensalt_ra.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_gensalt_rn.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_preferred_method.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_ra.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/crypt_rn.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/xcrypt_crypt.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man3/xcrypt_crypt_r.3
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/man/man5/crypt.5
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/doc/libxcrypt-4.4.23-r1/README
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/doc/libxcrypt-4.4.23-r1/ChangeLog
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/doc/libxcrypt-4.4.23-r1/AUTHORS
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/doc/libxcrypt-4.4.23-r1/NEWS
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/doc/libxcrypt-4.4.23-r1/TODO
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/share/doc/libxcrypt-4.4.23-r1/THANKS
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/include/crypt.h
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/home/marienz/gentoo/usr/include/xcrypt.h
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/lib64/libcrypt.so.1.1.0
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/lib64/libcrypt.so.2.0.0
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/lib64/libcrypt.la
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/lib64/libcrypt.a
/home/marienz/gentoo/var/tmp/portage/sys-libs/libxcrypt-4.4.23-r1/image/usr/lib64/pkgconfig/libxcrypt.pc

Reproducible: Always

Steps to Reproduce:
1. Use prefix
2. Upgrade to glibc with libcrypt split out
Actual Results:  
libxcrypt fails to install.

Expected Results:  
libxcrypt installs.
Comment 1 Marien Zwart 2021-07-15 05:56:48 UTC
Created attachment 723934 [details]
emerge --info '=sys-libs/libxcrypt-4.4.23-r1::gentoo'
Comment 2 Marien Zwart 2021-07-15 05:57:18 UTC
Created attachment 723937 [details]
build.log
Comment 3 Ionen Wolkens gentoo-dev 2021-07-15 06:24:18 UTC
Can reproduce on my prefix.

Not familiar with the ebuild and haven't fully checked, but these lines seem to be missing prefix from a quick look:
        --libdir=$(get_xclibdir)
        --with-pkgconfigdir=/usr/$(get_libdir)/pkgconfig
        rm "${D}"$(get_xclibdir)/libcrypt$(get_libname)
        find "${D}"/usr/share/doc/${PF} -type l -delete || die
        mv "${static_libs[@]}" "${D}/usr/$(get_xclibdir)" \

In other places it also calls ${ED}/$(get_xclibdir) so if add it to the function itself that'll need checking. The whole split-usr stuff is also making this confusing.
Comment 4 Larry the Git Cow gentoo-dev 2021-07-16 03:58:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d04534bfb44f8f1cad29c6c54ec6cdbbecede36f

commit d04534bfb44f8f1cad29c6c54ec6cdbbecede36f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-16 03:56:37 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-16 03:56:37 +0000

    sys-libs/libxcrypt: fix installation on prefix in 4.4.23-r1
    
    Closes: https://bugs.gentoo.org/802222
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/libxcrypt/libxcrypt-4.4.23-r1.ebuild | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-05-24 02:16:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=939a3db71064f9b1da8e6a6fca3ecfb386f2ec30

commit 939a3db71064f9b1da8e6a6fca3ecfb386f2ec30
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-08 04:07:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-24 02:16:03 +0000

    sys-libs/libxcrypt: fix prefix install
    
    Bug: https://bugs.gentoo.org/802222
    Closes: https://bugs.gentoo.org/843209
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild | 298 ++++++++++++++++++++++++++
 1 file changed, 298 insertions(+)