summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöktürk Yüksek <gokturk@gentoo.org>2019-06-04 14:46:45 -0400
committerGöktürk Yüksek <gokturk@gentoo.org>2019-06-04 14:47:59 -0400
commit9c07154b652829899c18d44cc3ff78101041723b (patch)
tree6555e7760a802fa2398ac38babcc3a69b47605eb /sys-apps/rng-tools
parentnet-dns/dnscrypt-proxy: bump to 2.0.25 (diff)
downloadgentoo-9c07154b652829899c18d44cc3ff78101041723b.tar.gz
gentoo-9c07154b652829899c18d44cc3ff78101041723b.tar.bz2
gentoo-9c07154b652829899c18d44cc3ff78101041723b.zip
sys-apps/rng-tools: fix a linking problem with USE=pkcs11 #684228
In function init_pkcs11_entropy_source(), there is a call to ERR_reason_error_string(), which is defined in libcrypto. This causes linking problems for rng-tools under certain configurations: $ ./configure --disable-jitterentropy --without-nistbeacon --with-pkcs11 ... $ make ... gcc -pthread -g -O2 -pthread -o rngd rngd-rngd.o rngd-rngd_entsource.o rngd-rngd_linux.o rngd-util.o rngd-rngd_rdrand.o rdrand_asm.o rngd-rngd_pkcs11.o librngd.a -lsysfs -lgcrypt -lsysfs -lp11 -lgcrypt -lsysfs /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: rngd-rngd_pkcs11.o: undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1_1_0' /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libcrypto.so.1.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [Makefile:609: rngd] Error 1 make[2]: Leaving directory '/tmp/rng-tools' make[1]: *** [Makefile:888: all-recursive] Error 1 make[1]: Leaving directory '/tmp/rng-tools' make: *** [Makefile:458: all] Error 2 This symbol is defined in libcrypto: $ readelf --dyn-syms /usr/lib64/libcrypto.so | grep ERR_reason_error_string 314: 000000000012cf60 155 FUNC GLOBAL DEFAULT 12 ERR_reason_error_string@@OPENSSL_1_1_0 Linking rngd against libcrypto when pkcs11 is enabled fixes the issue. Bug: https://github.com/nhorman/rng-tools/pull/61 Closes: https://bugs.gentoo.org/684228 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Diffstat (limited to 'sys-apps/rng-tools')
-rw-r--r--sys-apps/rng-tools/rng-tools-6.7.ebuild8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys-apps/rng-tools/rng-tools-6.7.ebuild b/sys-apps/rng-tools/rng-tools-6.7.ebuild
index e674b8de1d30..ca5962d6923d 100644
--- a/sys-apps/rng-tools/rng-tools-6.7.ebuild
+++ b/sys-apps/rng-tools/rng-tools-6.7.ebuild
@@ -45,6 +45,14 @@ PATCHES=(
src_prepare() {
echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+
+ # rngd_pkcs11.c needs to be linked against -lcrypto #684228
+ # See: https://github.com/nhorman/rng-tools/pull/61
+ if use pkcs11; then
+ sed -e '/rngd_pkcs11.c$/ a rngd_LDADD\t+= -lcrypto' \
+ -i Makefile.am || die
+ fi
+
default
mv README.md README || die