Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 417129

Summary: net-dns/bind-tools-9.8.1[ssl] hardcodes OpenSSL path checks which breaks cross-compiling/etc...
Product: Gentoo Linux Reporter: Bertrand Jacquin <bertrand>
Component: Current packagesAssignee: Christian Ruppert (idl0r) <idl0r>
Severity: normal CC: bertrand, idl0r
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 662714    
Attachments: bind-tools-9.8.1-BJA-SSL-path.diff

Description Bertrand Jacquin 2012-05-22 17:52:49 UTC
When building bind-tools 9.8.1 (current stable) with ssl USE flags, it does :

# ROOT=/data/tmp USE=ssl emerge -vat =bind-tools 9.8.1
configure:13743: checking for OpenSSL library
configure:13840: result: using OpenSSL from /usr/lib and /usr/include

This is wrong here, this is due to file that set default search dirs if configure is called without a prefix search define in --with-openssl :

[  --with-openssl[=PATH]     Build with OpenSSL [yes|no|path].
                          (Required for DNSSEC)],
    use_openssl="$withval", use_openssl="auto")

openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
if test "$use_openssl" = "auto"
        for d in $openssldirs
                if test -f $d/include/openssl/opensslv.h

Here a fix for the ebuild to use a correct --with-openssl

Reproducible: Always
Comment 1 Bertrand Jacquin 2012-05-22 17:54:03 UTC
Created attachment 312711 [details, diff]

the patch
Comment 2 Bertrand Jacquin 2012-05-22 17:55:57 UTC
This may be extend to xml USE flag, but don't have libxml2 for current target. This to change xml2-config binary PATH
Comment 3 SpanKY gentoo-dev 2013-02-08 06:12:18 UTC
openssl installs .pc files now which should be easy to use
Comment 4 SpanKY gentoo-dev 2015-05-26 01:56:20 UTC
Comment on attachment 312711 [details, diff]

ROOT should not be used in src_* funcs
Comment 5 SpanKY gentoo-dev 2015-05-26 03:01:09 UTC
should be all set now in the tree; thanks for the report!

Commit message: Clean up openssl logic to fix cross-compiling
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2016-07-13 17:37:41 UTC
@vapier: Did you send your patch to upstream? It's at least not included in 9.10.4-P1 so I'd have to merge that by hand otherwise. Can you please forward your patch to the ISC guys?
It's also not included in net-dns/bind (ebuild).
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-10 10:42:56 UTC
Upstream fixed it by unconditionally using libcrypto from pkg-config:

---	AX_CHECK_OPENSSL([:],[AC_MSG_FAILURE([OpenSSL/LibreSSL not found])])
+++	PKG_CHECK_MODULES([OPENSSL], [libcrypto], [],
+++			  [AX_CHECK_OPENSSL([:],[AC_MSG_FAILURE([OpenSSL/LibreSSL not found])])])