Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658000 - dev-perl/Crypt-Cracklib-1.700.0-r1 : /.../features.h:381:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
Summary: dev-perl/Crypt-Cracklib-1.700.0-r1 : /.../features.h:381:4: error: #warning _...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL: https://github.com/dsully/perl-crypt-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-12 18:53 UTC by Toralf Förster
Modified: 2021-10-10 14:02 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.15 KB, text/plain)
2018-06-12 18:53 UTC, Toralf Förster
Details
dev-perl:Crypt-Cracklib-1.700.0-r1:20180612-061414.log (dev-perl:Crypt-Cracklib-1.700.0-r1:20180612-061414.log,3.45 KB, text/plain)
2018-06-12 18:53 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,152.00 KB, text/plain)
2018-06-12 18:53 UTC, Toralf Förster
Details
environment (environment,100.76 KB, text/plain)
2018-06-12 18:53 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.64 KB, application/x-bzip)
2018-06-12 18:53 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,24.56 KB, application/x-bzip)
2018-06-12 18:53 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-06-12 18:53:12 UTC
                 from /usr/lib64/perl5/5.26.2/x86_64-linux/CORE/perl.h:694,
                 from Cracklib.xs:5:
/usr/include/features.h:381:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
cc1: all warnings being treated as errors

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-hardened_libressl_20180609-100331

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby23 (with Rubygems) *



emerge -qpv dev-perl/Crypt-Cracklib
[ebuild  N    ] dev-perl/Crypt-Cracklib-1.700.0-r1  USE="{-test}"
Comment 1 Toralf Förster gentoo-dev 2018-06-12 18:53:15 UTC
Created attachment 535714 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-06-12 18:53:18 UTC
Created attachment 535716 [details]
dev-perl:Crypt-Cracklib-1.700.0-r1:20180612-061414.log
Comment 3 Toralf Förster gentoo-dev 2018-06-12 18:53:21 UTC
Created attachment 535718 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-06-12 18:53:24 UTC
Created attachment 535720 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-06-12 18:53:27 UTC
Created attachment 535722 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-06-12 18:53:29 UTC
Created attachment 535724 [details]
temp.tbz2
Comment 7 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-06-17 06:48:20 UTC
@toolchain, care to comment on this?

features.h is from glibc

Though it does look like replications of this are found in the wild: http://www.cpantesters.org/cpan/report/95b9fbb4-eb04-11e6-92d0-e49cd7b5bb8e

It *could* be related to https://metacpan.org/source/DANIEL/Crypt-Cracklib-1.7/Makefile.PL#L18

But its not obvious to me why there's this sudden need to compile things against features.h differently.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2018-06-17 08:31:04 UTC
_FORTIFY_SOURCE requires optimisations to be enabled. At least -O1.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2018-06-17 08:32:40 UTC
(In reply to Sergei Trofimovich from comment #8)
> _FORTIFY_SOURCE requires optimisations to be enabled. At least -O1.

Also note: features.h only issues a warning but build system sets -Werror and -Werror=cpp fails your build.
Comment 10 SpanKY gentoo-dev 2018-06-17 14:01:04 UTC
this is entirely a bug in Crypt-Cracklib:
(1) it's ignoring CFLAGS
(2) it's using -Werror which it should not

once both of those get fixed, the fortify issue should be resolved.
Comment 11 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-06-19 02:51:32 UTC
(In reply to SpanKY from comment #10)
> this is entirely a bug in Crypt-Cracklib:
> (1) it's ignoring CFLAGS
> (2) it's using -Werror which it should not
> 
> once both of those get fixed, the fortify issue should be resolved.

Sadly, ignoring CFLAGS is a widespread hard-to-fix problem with all of upstreams tooling, that will require lots of upstream abuse to get working right.

But the remaining question is why this wasn't an error until now.
Comment 12 SpanKY gentoo-dev 2018-06-19 06:09:13 UTC
i'm not sure the history really matters.  we know the build files are bad.  if it's one or two bad lines in the Makefile.PL, just sed it out in the ebuild and be done.

if it wasn't fortify tickling the bad build, it'd still be a QA issue.
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2019-06-22 07:57:08 UTC
https://bugs.gentoo.org/621036 likely fixed it on gcc side.
Comment 14 Larry the Git Cow gentoo-dev 2019-10-16 04:14:17 UTC
The bug has been referenced in the following commit(s):

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

commit 974c3c3a68dc7390ef544b261b83d8d1ba797f67
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2019-10-16 04:00:25 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2019-10-16 04:00:25 +0000

    dev-perl/Crypt-Cracklib: don't "enhance" CFLAGS in Makefile.PL, bug 658000
    
    Bug: https://bugs.gentoo.org/658000
    Package-Manager: Portage-2.3.76, Repoman-2.3.17
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 .../Crypt-Cracklib-1.700.0-r2.ebuild               | 26 ++++++++++++++++++++++
 .../files/Crypt-Cracklib-1.700.0-CFLAGS.patch      | 11 +++++++++
 2 files changed, 37 insertions(+)
Comment 15 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-06-30 14:07:55 UTC
I've made further fixes for this in -r3 (1d79ac57f4449ed34d97ddea06fedcfd479f5a5c), as -r2 was still ignoring CFLAGS in ENV.

This is remedied, and I can now confirm that: 

- Even with CFLAGS="-O0", compile succeeds.
- CFLAGS="-O0 -frecord-gcc-switches" does what its supposed to

Please test.
Comment 16 Toralf Förster gentoo-dev 2020-06-30 17:28:20 UTC
dev-perl/Crypt-Cracklib-1.700.0-r3 is fine hera at various images
Comment 17 Larry the Git Cow gentoo-dev 2021-10-10 14:02:34 UTC
The bug has been closed via the following commit(s):

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

commit 846e88466158456f93887b34bdf2d0ecc3c56b6a
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2021-10-09 20:00:16 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2021-10-10 14:01:55 +0000

    dev-perl/Crypt-Cracklib: Remove old
    
    Closes: https://bugs.gentoo.org/658000
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 .../Crypt-Cracklib-1.700.0-r2.ebuild               | 27 ----------------------
 1 file changed, 27 deletions(-)