Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 854480 - sys-kernel/genkernel-4.2.6 fails to build boost for initramfs with gcc-12.1.1_p20220625
Summary: sys-kernel/genkernel-4.2.6 fails to build boost for initramfs with gcc-12.1.1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 861110
Blocks: gcc-12
  Show dependency tree
 
Reported: 2022-06-26 21:21 UTC by Søren Dalby Larsen
Modified: 2022-07-26 04:32 UTC (History)
4 users (show)

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


Attachments
genkernel.log (genkernel.log,224.85 KB, text/plain)
2022-06-26 21:21 UTC, Søren Dalby Larsen
Details
genkernel-4.2.6-gcc-12-boost-1.79.patch (genkernel-4.2.6-gcc-12-boost-1.79.patch,695 bytes, patch)
2022-06-27 08:28 UTC, Søren Dalby Larsen
Details | Diff
genkernel-4.2.6-r2.ebuild (genkernel-4.2.6-r2.ebuild,11.39 KB, text/plain)
2022-06-27 08:30 UTC, Søren Dalby Larsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Søren Dalby Larsen 2022-06-26 21:21:11 UTC
Created attachment 787826 [details]
genkernel.log

I'm only using genkernel to build the initramfs. The output is:

* Gentoo Linux Genkernel; Version 4.2.6
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --luks --lvm --install initramfs

* Working with Linux kernel 5.18.7-gentoo for x86_64
* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ...

* Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-x86_64' because kernel was not build ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending util-linux cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending devicemanager cpio data ...
*         >> Appending auxiliary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending luks cpio data ...
*         >> Appending lvm cpio data ...
* ERROR: Command 'b2 --user-config=/var/tmp/genkernel/gk_QzxlZIXD/boost/boost_1_76_0/user-config.jam --without-python gentoorelease -j8 -q -d+2 pch=off --disable-icu boost.locale.icu=off --without-mpi --without-locale --without-context --without-coroutine --without-fiber --without-stacktrace --boost-build=/var/tmp/genkernel/gk_QzxlZIXD/boost/buildroot/usr/share/boost-build --prefix=/usr --layout=system --no-cmake-config threading=multi link=shared,static -sNO_BZIP2=1 -sNO_LZMA=1 -sNO_ZLIB=1 -sNO_ZSTD=1' failed!
* ERROR: create_initramfs(): append_data(): append_lvm(): populate_binpkg(): populate_binpkg(): gkbuild(): Failed to create binpkg of boost-1.76.0!
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
Comment 1 Søren Dalby Larsen 2022-06-26 21:22:51 UTC
It works fine with gcc-11.3.0

I've tried rebuilding boost deps with "emerge -e boost" and downgraded boost to no avail.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-26 21:51:34 UTC
This is using Boost 1.76 while stable in Gentoo outside of genkernel is now at 1.79. I suspect that's it.
Comment 3 Søren Dalby Larsen 2022-06-27 07:39:16 UTC
I tried changing the boost dependency in genkernel to 1.79, but it still fails, looks more like a config error though:

COMMAND: b2 --user-config=/var/tmp/genkernel/gk_6E7aZrGS/boost/boost_1_79_0/user-config.jam --without-python gentoorelease -j8 -q -d+2 pch=off --disable-icu boost.locale.icu=off --without-mpi --without-locale --without-context --without-coroutine --without-fiber --without-stacktrace --boost-bu
ild=/var/tmp/genkernel/gk_6E7aZrGS/boost/buildroot/usr/share/boost-build --prefix=/usr --layout=system --no-cmake-config threading=multi link=shared,static -sNO_BZIP2=1 -sNO_LZMA=1 -sNO_ZLIB=1 -sNO_ZSTD=1
/var/tmp/genkernel/gk_6E7aZrGS/boost/buildroot/usr/share/boost-build/build/feature.jam:491: in feature.validate-value-string from module feature
error: "none" is not a known value of feature <optimization>
error: legal values: "off" "speed" "space"

Although I don't know where to change that optimization value just yet
Comment 4 Søren Dalby Larsen 2022-06-27 08:28:53 UTC
Created attachment 787973 [details, diff]
genkernel-4.2.6-gcc-12-boost-1.79.patch
Comment 5 Søren Dalby Larsen 2022-06-27 08:30:06 UTC
Created attachment 787976 [details]
genkernel-4.2.6-r2.ebuild

Modifed ebuild to include the patch.

This works for me. Thank you for pointing out that genkernel used a different boost version!
Comment 6 squatted_posture785 2022-06-29 15:09:25 UTC
(In reply to Søren Dalby Larsen from comment #5)
> Created attachment 787976 [details]
> genkernel-4.2.6-r2.ebuild
> 
> Modifed ebuild to include the patch.
> 
> This works for me. Thank you for pointing out that genkernel used a
> different boost version!

I keep getting the following error with the modified ebuild and the patch:

% sudo emerge genkernel

[ebuild   R   ] sys-kernel/genkernel-4.2.6-r2  USE="firmware (-ibm)" PYTHON_SINGLE_TARGET="python3_10 -python3_8 -python3_9"

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-kernel/genkernel-4.2.6-r2::gentoo
>>> Failed to emerge sys-kernel/genkernel-4.2.6-r2, Log file:
>>>  '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r2/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 1.90, 2.37, 3.12
!!! Fetched file: boost_1_79_0.tar.bz2 VERIFY FAILED!
!!! Reason: Insufficient data for checksum verification
!!! Got:
!!! Expected: BLAKE2B BLAKE2S MD5 RMD160 SHA1 SHA256 SHA3_256 SHA3_512 SHA512 WHIRLPOOL
 * Fetch failed for 'sys-kernel/genkernel-4.2.6-r2', Log file:
 *  '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r2/temp/build.log'

 * Messages for package sys-kernel/genkernel-4.2.6-r2:

 * Fetch failed for 'sys-kernel/genkernel-4.2.6-r2', Log file:
 *  '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r2/temp/build.log'
 *
 * The following package has failed to build, install, or execute postinst:
 *
 *  (sys-kernel/genkernel-4.2.6-r2:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r2/temp/build.log'
 *

I tried downloading the Manifest file for dev-libs/boost again, to no avail. I can emerge dev-libs/boost-1.79.0 just fine as well as genkernel-4.2.6-r2 with default ebuild.


Any idea?

Thanks.
Comment 7 Søren Dalby Larsen 2022-06-29 19:00:25 UTC
You'll have to run

ebuild genkernel-4.2.6-r2.ebuild digest

before emerging
Comment 8 squatted_posture785 2022-06-29 19:33:08 UTC
(In reply to Søren Dalby Larsen from comment #7)
> You'll have to run
> 
> ebuild genkernel-4.2.6-r2.ebuild digest
> 
> before emerging

Thank you, that worked. Thank you for the patch too, I've successfully built the initramfs.
Comment 9 Larry the Git Cow gentoo-dev 2022-07-04 04:48:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8b7422293dcf9cc62518dcbc49239b6e637b6b74

commit 8b7422293dcf9cc62518dcbc49239b6e637b6b74
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2022-07-04 04:46:21 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2022-07-04 04:46:55 +0000

    gkbuilds/boost-build.gkbuild: upstream boost flags changed
    
    Upstream boost changed the flags to use 'off' instead of 'none'.
    
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
    Closes: https://bugs.gentoo.org/854480

 gkbuilds/boost-build.gkbuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 10 Larry the Git Cow gentoo-dev 2022-07-04 04:50:48 UTC
The bug has been closed via the following commit(s):

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

commit 8d950bb026385484a5aba5726ce0a93ec5c24339
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2022-07-04 04:50:36 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2022-07-04 04:50:36 +0000

    sys-kernel/genkernel: update for newer boost
    
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
    Closes: https://bugs.gentoo.org/854480

 sys-kernel/genkernel/Manifest                      |   1 +
 .../files/genkernel-4.2.6-boost-optim.patch        |  23 ++
 sys-kernel/genkernel/genkernel-4.2.6-r4.ebuild     | 320 +++++++++++++++++++++
 sys-kernel/genkernel/genkernel-9999.ebuild         |   5 +-
 4 files changed, 348 insertions(+), 1 deletion(-)
Comment 11 squatted_posture785 2022-07-04 05:40:02 UTC
Current genkernel-4.2.6-r4.ebuild ebuild (https://github.com/gentoo-mirror/gentoo/blob/stable/sys-kernel/genkernel/genkernel-4.2.6-r4.ebuild) has:

"${FILESDIR}"/${P}-gcc-12-boost-1.79.patch

but the file doesn't exist in "files" directory so emerging fails:


 * Package:    sys-kernel/genkernel-4.2.6-r4
 * Repository: gentoo
 * Maintainer: genkernel@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc firmware kernel_linux python_single_target_python3_10 userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Please clean PYTHON_COMPAT of obsolete implementations:
 *   python3_7
 * Using python3.10 to build
 * Applying genkernel-4.2.6-devicemanager.patch ...
 [ ok ]
 * Applying genkernel-4.2.6-fix-btrfs-progs-deps.patch ...
 [ ok ]
 * Applying genkernel-4.2.6-fuse-glibc-2.34.patch ...
 [ ok ]
 * Applying genkernel-4.2.6-gcc-12-boost-1.79.patch ...
/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/temp/environment: line 1072: /var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-gcc-12-boost-1.79.patch: No such file or directory
/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/temp/environment: line 1075: /var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-gcc-12-boost-1.79.patch: No such file or directory
 [ !! ]
 * ERROR: sys-kernel/genkernel-4.2.6-r4::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-gcc-12-boost-1.79.patch
 *
 * Call stack:
 *               ebuild.sh, line  127:  Called src_prepare
 *             environment, line 2435:  Called default
 *      phase-functions.sh, line  858:  Called default_src_prepare
 *      phase-functions.sh, line  923:  Called __eapi6_src_prepare
 *             environment, line  328:  Called eapply '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-devicemanager.patch' '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-fix-btrfs-progs-deps.patch' '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-fuse
-glibc-2.34.patch' '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-gcc-12-boost-1.79.patch'
 *             environment, line 1140:  Called _eapply_patch '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-gcc-12-boost-1.79.patch'
 *             environment, line 1078:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/files/genkernel-4.2.6-gcc-12-boost-1.79.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=sys-kernel/genkernel-4.2.6-r4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/genkernel-4.2.6-r4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-kernel/genkernel-4.2.6-r4/work/genkernel-4.2.6'
Comment 12 squatted_posture785 2022-07-04 16:21:24 UTC
(In reply to ut2s7kol87 from comment #11)
> ...

Bug report: https://bugs.gentoo.org/856346