Bug 253698 - security/libgcrypt - compilation error when building jitterentropy-base.c for arm on poudriere
Summary: security/libgcrypt - compilation error when building jitterentropy-base.c for...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-19 17:12 UTC by Yani Karydis
Modified: 2021-02-19 20:11 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
Poudriere log (146.76 KB, text/plain)
2021-02-19 20:11 UTC, Yani Karydis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yani Karydis 2021-02-19 17:12:25 UTC
Hello,

I'm receiving the following error when compiling for arm using poudriere. Adding "--disable-jent-support" in the configure options fixes the problem, but I'm not sure what the security implications are. 

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -O -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -c ./rndjent.c  -fPIC -DPIC -o .libs/rndjent.o
In file included from ./rndjent.c:86:
./jitterentropy-base.c:53:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC optimize ("O0")
            ^
./jitterentropy-base.c:60:4: error: "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy-base.c."
  #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy-base.c."
   ^
1 warning and 1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /wrkdirs/usr/ports/security/libgcrypt/work/libgcrypt-1.9.2/random
*** Error code 1
*** Error code 1
*** Error code 1

Stop.
make: stopped in /usr/ports/security/libgcrypt
Comment 1 Cy Schubert freebsd_committer 2021-02-19 17:51:43 UTC
Can you provide uname -a output please.

Also provide output from cc -v or gcc -v if appropriate, please.

Is your gcc in base or in $LOCALBASE?
Comment 2 Yani Karydis 2021-02-19 20:11:13 UTC
Created attachment 222649 [details]
Poudriere log

I'm attaching the full error log from poudriere, which I think contains the required information. The host environment is running amd64 (12.2-RELEASE-p3 FreeBSD 12.2-RELEASE-p3 r369178), whereas the build environment is armv6 (12.2-RELEASE-p3 FreeBSD 12.2-RELEASE-p3 1202000 arm) using qemu. Both are using the base compiler (clang version 10.0.1).