Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 887583 - dev-util/rocminfo: multiple versions fail to build with _FORTIFY_SOURCE
Summary: dev-util/rocminfo: multiple versions fail to build with _FORTIFY_SOURCE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-12-21 03:29 UTC by Stijn Tintel
Modified: 2023-03-11 16:26 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 Stijn Tintel 2022-12-21 03:29:45 UTC
The rocminfo CMake file uses a custom variable named ROCRTST_BLD_TYPE to
set CMAKE_BUILD_TYPE. When not set, this defaults to Debug, which adds
-O0 to CXXFLAGS. This overrides the optimization flags in CXXFLAGS in
make.conf.

When the CXXFLAGS in make.conf contain _FORTIFY_SOURCE, this breaks
compilation with the following error:

/usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
| ^~~~~~~

Proposed fix for 5.1.3 on https://github.com/gentoo/gentoo/pull/27145

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-21 19:22:23 UTC
Please update your PR to tag this bug.
Comment 2 Larry the Git Cow gentoo-dev 2023-03-11 16:26:35 UTC
The bug has been closed via the following commit(s):

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

commit 65f5eec96be908fc0fc6ff1a4811242d049b8ef6
Author:     Stijn Tintel <stijn@linux-ipv6.be>
AuthorDate: 2022-09-04 19:22:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-11 16:25:16 +0000

    dev-util/rocminfo: enable release build
    
    The rocminfo CMake file uses a custom variable named ROCRTST_BLD_TYPE to
    set CMAKE_BUILD_TYPE. When not set, this defaults to Debug, which adds
    -O0 to CXXFLAGS. This overrides the optimization flags in CXXFLAGS in
    make.conf.
    
    When the CXXFLAGS in make.conf contain _FORTIFY_SOURCE, this breaks
    compilation with the following error:
    
    /usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
      412 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
          |    ^~~~~~~
    
    Fix this by setting the ROCRTST_BLD_TYPE variable to Release in
    mycmakeargs.
    
    Closes: https://bugs.gentoo.org/887583
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
    Closes: https://github.com/gentoo/gentoo/pull/27145
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/rocminfo/rocminfo-5.1.3.ebuild | 5 +++++
 dev-util/rocminfo/rocminfo-5.3.3.ebuild | 5 +++++
 dev-util/rocminfo/rocminfo-5.4.3.ebuild | 5 +++++
 dev-util/rocminfo/rocminfo-9999.ebuild  | 5 +++++
 4 files changed, 20 insertions(+)