Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 707330

Summary: dev-libs/libgcrypt-1.9.4 : .../work/libgcrypt-1.8.5/random/jitterentropy-base.c:60:4: error: #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentr...
Product: Gentoo Linux Reporter: Xeha <Xeha>
Component: Current packagesAssignee: Mikle Kolyada (RETIRED) <zlogene>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, base-system, conikost, hjckr, jstein, lssndrbarbieri, me, sam, the_bishop, Xeha
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=793197
https://bugs.gentoo.org/show_bug.cgi?id=902765
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 408963    
Attachments: build log
emerge --info

Description Xeha 2020-01-29 22:17:00 UTC
dev-libs/libgcrypt-1.8.5 fails to build under i586.
-O2 is passed to jitterentropy-base.c but it wants -O0


Reproducible: Always

Steps to Reproduce:
1.emerge dev-libs/libgcrypt-1.8.5

Actual Results:  
Package failed to build

Expected Results:  
Package to be build successfully
Comment 1 Xeha 2020-01-29 22:18:02 UTC
Created attachment 608568 [details]
build log
Comment 2 Xeha 2020-01-29 22:18:50 UTC
Created attachment 608570 [details]
emerge --info
Comment 3 Xeha 2020-03-31 22:11:46 UTC
i did just hit this on x86_64 with building 32abi of libgcrypt.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-18 20:32:35 UTC
How about 1.9.2?
Comment 5 Alessandro Barbieri 2021-03-26 23:31:14 UTC
Same with 1.9.2
Comment 6 Agostino Sarubbo gentoo-dev 2021-12-19 22:08:06 UTC
tinderbox has reproduced this issue with version 1.9.4 - Updating summary.
Comment 7 Martin 'The Bishop' Scheffler 2022-04-02 09:05:04 UTC
same here, dev-libs/libgcrypt does not build.
Comment 8 Martin 'The Bishop' Scheffler 2022-04-02 09:26:44 UTC
okay, so the build flag "o-flag-munging" does fix this problem.
Comment 9 cyrillic 2022-04-15 00:33:43 UTC
dev-libs/libgcrypt-1.10.1 has this problem too.
Comment 10 Larry the Git Cow gentoo-dev 2022-04-15 00:53:59 UTC
The bug has been closed via the following commit(s):

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

commit b4213c9598cf5ab09d9323dd254a9ea6b439dfcd
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-15 00:51:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-15 00:51:33 +0000

    dev-libs/libgcrypt: rename o-flag-munging -> custom-cflags
    
    More accurately represents what it does & requires a conscious
    action to turn _on_ the flag which may break the build.
    
    Closes: https://bugs.gentoo.org/707330
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libgcrypt/libgcrypt-1.10.1.ebuild   | 4 ++--
 dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 11 Larry the Git Cow gentoo-dev 2022-04-16 19:35:11 UTC
The bug has been referenced in the following commit(s):

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

commit eadc4f710b6783d509cb6d9b2b5b475069e16391
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-04-16 19:32:25 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-04-16 19:34:26 +0000

    dev-libs/libgcrypt: always enable O-flag-munging
    
    Exposing this as a USE flag is mostly pointless, and results in silly
    bug reports from users who disable it by accident.
    
    Users can disable it using EXTRA_ECONF if so desired.
    
    Bug: https://bugs.gentoo.org/629410
    Bug: https://bugs.gentoo.org/707330
    Closes: https://bugs.gentoo.org/838472
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 dev-libs/libgcrypt/libgcrypt-1.10.1.ebuild   | 3 +--
 dev-libs/libgcrypt/libgcrypt-1.8.8.ebuild    | 5 ++---
 dev-libs/libgcrypt/libgcrypt-1.8.9.ebuild    | 3 +--
 dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild | 3 +--
 dev-libs/libgcrypt/metadata.xml              | 1 -
 5 files changed, 5 insertions(+), 10 deletions(-)
Comment 12 Steven Newbury 2022-05-10 11:01:19 UTC
Note, the flag munging does *not* account for -Oz which is supported with clang and gcc >= 12.
Comment 13 Jeff Cliff 2023-03-22 20:45:48 UTC
given the comment by Steven Newbury above is this actually resolved?
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-22 20:57:25 UTC
(In reply to Jeff Cliff from comment #13)
> given the comment by Steven Newbury above is this actually resolved?

It's a separate issue which would ideally have a new bug, as it's something we need to handle upstream.