kmods fail to build due to missing elfutils-libelf-devel

Bug #1880248 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Scott Little

Bug Description

Brief Description
-----------------
All kmods fail to build reliably against 4.18 kernel.

Error message is always ...

Makefile:977: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make: *** [default] Error 2
RPM build errors:

Severity
--------
Critical

Steps to Reproduce
------------------
1) if only kmod has changed and environment supports build-avoidance.
build-pkgs

2) more general
build-pkgs

build-pkgs --clean <kmod>

cd $MY_WORKSPACE/std/config
mock -r */*b0.cfg --clean
mock -r */*b0.cfg --scrub=all

build-pkgs <kmod>

Expected Behavior
------------------
kmod builds

Actual Behavior
----------------
kmod fails to build

Reproducibility
---------------
Reproducible

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master, May 22 2020

Last Pass
---------
May 20, 2020

Timestamp/Logs
--------------
Makefile:977: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make: *** [default] Error 2
RPM build errors:

Test Activity
-------------
Build

Workaround
----------
N/A

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kernel (master)

Reviewed: https://review.opendev.org/730421
Committed: https://git.openstack.org/cgit/starlingx/kernel/commit/?id=494c52a7db3d196e4b9ca51da2bccdb1287e22ca
Submitter: Zuul
Branch: master

commit 494c52a7db3d196e4b9ca51da2bccdb1287e22ca
Author: Scott Little <email address hidden>
Date: Fri May 22 17:33:38 2020 -0400

    Add missing BuildRequires to allow kmods to build reliably

    The original update that broke layered build was
    https://review.opendev.org/#/c/727908

    all kmods failed to build due to a missing BuildRequires
    on elfutils-libelf-devel.

    The actual error message was:

    Makefile:977: *** "Cannot generate ORC metadata for
    CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or
    elfutils-libelf-devel". Stop.
    make: *** [default] Error 2
    RPM build errors:

    In the case of centos, it is elfutils-libelf-devel that we need.
    The need for the kmod appears to relate to the new 4.18 kernel.
    It might be that kernel-devel should now have a 'Require
    elfutils-libelf-devel'

    Reproducibility depends on one of a few factors. If
    elfutils-libelf-devel may already be present within the mock
    environment due to build of a prior package, the build will pass.
    The kernel build pulls in elfutils-libelf-devel, and produces
    kernel-devel which is required for kmod builds. So it's easy to
    overlook this defect.

    So we need a build where mock is clean yet the kernel is already
    built. Two possibilities.
    1) clean mock after building the kernel, but before building the kmods.
    2) build avoidance when the kernel has not changed, but the kmod has.

    CENGN layered build hit the second scenario.

    This fix tackles the problem from the kmod side by adding BuildRequires
    elfutils-libelf-devel to each kmod.

    An alternative approach might be to add a Requires elfutils-libelf-devel
    to kernel-devel. That option has not yet been explored. So I'll call
    that a partial fix only.

    Partial-Bug: 1878072
    Partial-Bug: 1880248
    Change-Id: I472a5a285c2b47401fa6594358c0578d81e3f678
    Signed-off-by: Scott Little <email address hidden>

Ghada Khalil (gkhalil)
tags: added: stx.build
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Scott Little (slittle1)
importance: Undecided → High
tags: added: stx.4.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/733741
Committed: https://git.openstack.org/cgit/starlingx/root/commit/?id=c70efec479f8e39013210b8ca1dfb2f5bb5d1781
Submitter: Zuul
Branch: master

commit c70efec479f8e39013210b8ca1dfb2f5bb5d1781
Author: Scott Little <email address hidden>
Date: Fri Jun 5 00:00:36 2020 -0400

    Add a dependency checker to build-pkgs

    Builds a single package in a clean environment to detect missing
    build dependencies.

    Usage:
    build-pkgs --dep-test <pkg>

    Note:
    Should only be run after a full 'build-pkgs'.
    We want the build to fail because a dependency wasn't
    been listed, not because a dependency hasn't been built yet.

    Closes-Bug: 1880248
    Change-Id: Icf64be37a77de0992647c37ce392fd5a2a458fba
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.