Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833256 - app-crypt/jitterentropy-3.3.1 #error "The CPU Jitter random number generator must not be compiled with optimizations" (PATCH)
Summary: app-crypt/jitterentropy-3.3.1 #error "The CPU Jitter random number generato...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Göktürk Yüksek
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-02-13 02:29 UTC by email200202
Modified: 2022-02-15 20:17 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,2.27 KB, text/x-log)
2022-02-13 02:30 UTC, email200202
Details
emerge -pqv '=app-crypt/jitterentropy-3.3.1::gentoo' (file_833256.txt,131 bytes, text/plain)
2022-02-13 02:32 UTC, email200202
Details
emerge --info '=app-crypt/jitterentropy-3.3.1::gentoo' (file_833256.txt,6.92 KB, text/plain)
2022-02-13 02:33 UTC, email200202
Details
no-optimizations.patch (no-optimizations.patch,508 bytes, patch)
2022-02-13 03:15 UTC, email200202
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2022-02-13 02:29:32 UTC
# emerge -av1 app-crypt/jitterentropy

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] app-crypt/jitterentropy-3.3.1:0/3::gentoo [3.0.1:0/3::gentoo] USE="-static-libs" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-crypt/jitterentropy-3.3.1::gentoo
 * jitterentropy-3.3.1.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                           [ ok ]
>>> Unpacking source...
>>> Unpacking jitterentropy-3.3.1.tar.gz to /var/tmp/portage/app-crypt/jitterentropy-3.3.1/work
>>> Source unpacked in /var/tmp/portage/app-crypt/jitterentropy-3.3.1/work
>>> Preparing source in /var/tmp/portage/app-crypt/jitterentropy-3.3.1/work/jitterentropy-library-3.3.1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-crypt/jitterentropy-3.3.1/work/jitterentropy-library-3.3.1 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-crypt/jitterentropy-3.3.1/work/jitterentropy-library-3.3.1 ...
make -j9 -s AR=x86_64-pc-linux-gnu-ar CC=x86_64-pc-linux-gnu-gcc 
src/jitterentropy-base.c:58:3: error: #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy.c."
   58 |  #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy.c."
      |   ^~~~~
make: *** [<builtin>: src/jitterentropy-base.o] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: app-crypt/jitterentropy-3.3.1::gentoo failed (compile phase):
 *   emake failed


Reproducible: Always

Steps to Reproduce:
1. emerge -av1 app-crypt/jitterentropy

Actual Results:  
failed

Expected Results:  
Not to fail
Comment 1 email200202 2022-02-13 02:30:56 UTC
Created attachment 764956 [details]
build.log
Comment 2 email200202 2022-02-13 02:32:07 UTC
Created attachment 764957 [details]
emerge -pqv '=app-crypt/jitterentropy-3.3.1::gentoo'
Comment 3 email200202 2022-02-13 02:33:04 UTC
Created attachment 764958 [details]
emerge --info '=app-crypt/jitterentropy-3.3.1::gentoo'
Comment 4 email200202 2022-02-13 03:15:54 UTC
Created attachment 764959 [details, diff]
no-optimizations.patch
Comment 5 email200202 2022-02-13 03:17:12 UTC
The attached patch "no-optimizations.patch" solved the problem.
Comment 6 Göktürk Yüksek archtester gentoo-dev 2022-02-15 20:08:22 UTC
I suspect the upstream meant -O0 for that single file only. They already override CFLAGS in Makefile. You have -O2 in your CPPFLAGS, which causes the problem. We'll just filter it downstream.
Comment 7 Larry the Git Cow gentoo-dev 2022-02-15 20:17:32 UTC
The bug has been closed via the following commit(s):

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

commit a8b4e336f1685176f62c62ab38d34e8dc2e9a9cb
Author:     Göktürk Yüksek <gokturk@gentoo.org>
AuthorDate: 2022-02-15 20:11:15 +0000
Commit:     Göktürk Yüksek <gokturk@gentoo.org>
CommitDate: 2022-02-15 20:17:12 +0000

    app-crypt/jitterentropy: append -O0 to CPPFLAGS #833256
    
    The upstream doesn't allow any code optimizations and
    handles CFLAGS accordingly. Handle CPPFLAGS in the
    ebuild by explicitly appending it with '-O0'.
    
    Closes: https://bugs.gentoo.org/833256
    Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>

 app-crypt/jitterentropy/jitterentropy-3.3.1.ebuild | 3 +++
 1 file changed, 3 insertions(+)