# 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
Created attachment 764956 [details] build.log
Created attachment 764957 [details] emerge -pqv '=app-crypt/jitterentropy-3.3.1::gentoo'
Created attachment 764958 [details] emerge --info '=app-crypt/jitterentropy-3.3.1::gentoo'
Created attachment 764959 [details, diff] no-optimizations.patch
The attached patch "no-optimizations.patch" solved the problem.
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.
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(+)