Page MenuHome GnuPG

libgcrypt: make check fails "random" test on OS X 10.11 with link error
Closed, ResolvedPublic

Description

Description

In the OS X 10.11 El Capitan Public Beta 1 and Public Beta 2, libgcrypt 1.6.3 is
failing the "random" test in "make check". It appears to be trying to load the
library from the installation target location instead of where the program is
being built.

This was discovered while testing Mac Homebrew formulas for 10.11.

Here's the output around the test failure.

PASS: pkcs1v2
dyld: Library not loaded: /tmp/test-libgcrypt/lib/libgcrypt.20.dylib

Referenced from:

/Users/janke/local/opp/gnupg/libgcrypt/srcdist/libgcrypt-1.6.3/tests/.libs/random

Reason: image not found

random: running
'/Users/janke/local/opp/gnupg/libgcrypt/srcdist/libgcrypt-1.6.3/tests/.libs/random
--in-recursion --early-rng-check' failed
FAIL: random

Environment

Mac OS X Public Beta 2
taran-elcap:~ janke$ uname -a
Darwin taran-elcap.local 15.0.0 Darwin Kernel Version 15.0.0: Sun Jul 12
07:47:20 PDT 2015; root:xnu-3247.1.56~16/RELEASE_X86_64 x86_64
taran-elcap:~ janke$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11
BuildVersion: 15A225f

To Reproduce

Install OS X 10.11 public beta and Xcode 7. (Xcode 7 must be manually installed,
not via the app store.)

In the libgcrypt 1.6.3 distribution:

./configure --prefix=/tmp/test-libgcrypt
make
make check

Details

Event Timeline

apjanke set External Link to https://github.com/Homebrew/homebrew/issues/41599.
apjanke added projects: libgcrypt, Bug Report.
apjanke added a subscriber: apjanke.

Could I be granted a user role so I can do additional work with the bug tracker?

No updates in 8 months, thus closing.

werner claimed this task.
werner added a project: Too Old.
chdiza added a subscriber: chdiza.

This is still a problem on OS X 10.11.5. OS X's System Integrity Protection
"feature" is causing that test failure. If S.I.P is disabled there's no problem.

A similar-looking test failure happens in perl
(https://rt.perl.org/Public/Bug/Display.html?id=126706). Perhaps the diagnosis is
the same here.

I see. We use system() in the random test to re-execute itself. This involves
the shell and thus the problem. Need to uses fork/exec or CreateProcess calls
for that test. I guess this needs to wait until we have moved that to code to
libgpg-error as our portability layer.

FWIW, we do not see any problem with current Libgcrypt in our CUI system running
under Sierra.

No way to test on El Capitain anymore. It works on Sierra.