Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955371 - Genkernel 4.3.16-4-g5e6e0b9-git fails in libxcrypt-4.4.36 on GCC-15
Summary: Genkernel 4.3.16-4-g5e6e0b9-git fails in libxcrypt-4.4.36 on GCC-15
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-03 22:03 UTC by Daniel Rozsnyo
Modified: 2025-05-04 04:59 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Rozsnyo 2025-05-03 22:03:57 UTC
Building my update today I came across the error of:



lib/util-base64.c:24:3: error: initializer-string for array of 'unsigned char' truncates NUL terminator
 but destination lacks 'nonstring' attribute (66 chars into 65 available) [-Werror=unterminated-string-
initialization]
   24 |   "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"



This was VERY strange, so I had to run genkernel again and CTRL+Z at the correct moment - while building libxcrypt-4.4.36 (in the phase of Appending busybox cpio data ... )



To my wonder, the problematic source file had the following code:
(multi-line, and not shown properly on GCC erro dump above)


const unsigned char ascii64[65] =
  "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
/* 0000000000111111111122222222223333333333444444444455555555556666 */
/* 0123456789012345678901234567890123456789012345678901234567890123 */
  "\x00";


So I checked what libxcrypt source is as of today, and indeed - the bogus "\x00" on the last line was deleted as of 2025-01-01:

https://github.com/besser82/libxcrypt/commit/819352f1cac60b22286c05b8dcdd3f13d56d29d0


Can somebody upgrade the used libxcrypt to a newer revision to avoid this bug? I am not sure how to do a /etc/patches fix here, since the code is an embedded script, not a real package?


The dependency starts with:

*         >> Appending busybox cpio data ...
* Checking for binpkg(s) required for busybox-1.36.1 (L0) ...
* > libxcrypt-4.4.36 has no dependencies. (L1)
* > Binpkg '/var/cache/genkernel/4.3.16-4-g5e6e0b9-git/libxcrypt-4.4.36-x86_64.tar.xz' does NOT exist; Need to build libxcrypt-4.4.36 ...



PS: there is no option to retain the gk build directories with broken sources? (I could use ctrl-z, edit/patch the issue, fg, but only on the second run), the files genkernel.log was referring to were already gone when it failed first time.
Comment 1 Larry the Git Cow gentoo-dev 2025-05-04 04:59:44 UTC
The bug has been closed via the following commit(s):

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

commit f65091df4879b7158eca7a8b4cc724d64e128690
Author:     Matias Hilden <mathilde@kolabnow.ch>
AuthorDate: 2025-05-01 15:39:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-04 04:55:09 +0000

    sys-kernel/genkernel: bump libxcrypt-4.4.38 and libgpg-error-1.51 for gcc-15
    
    Building initramfs failed when using gcc-15. Current stable versions of
    libxcrypt and libgpg-error fix these issues.
    
    Closes: https://bugs.gentoo.org/955371
    Signed-off-by: Matias Hilden <mathilde@kolabnow.ch>
    Part-of: https://github.com/gentoo/gentoo/pull/41880
    Closes: https://github.com/gentoo/gentoo/pull/41880
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/genkernel/Manifest                   |   2 +
 sys-kernel/genkernel/genkernel-4.3.16-r4.ebuild | 291 ++++++++++++++++++++++++
 2 files changed, 293 insertions(+)