Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651310 - net-dns/bind (and net-dns/bind-tools) fail to compile with dev-libs/libressl-2.7.0: static declaration of "DH_get0_key" follows non-static declaration
Summary: net-dns/bind (and net-dns/bind-tools) fail to compile with dev-libs/libressl-...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LibreSSL
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libressl-2.8.0
  Show dependency tree
 
Reported: 2018-03-24 04:40 UTC by Reuben Farrelly
Modified: 2019-03-06 16:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,5.31 KB, text/plain)
2018-03-24 04:40 UTC, Reuben Farrelly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Farrelly 2018-03-24 04:40:33 UTC
Created attachment 525158 [details]
emerge --info

This is new breakage with libressl-2.7.0:

[ebuild   R    ] net-dns/bind-9.11.2_p1::gentoo  USE="caps dlz ipv6 libressl ssl urandom zlib -berkdb -dnstap -doc -filter-aaaa -fixed-rrset -geoip -gost -gssapi -idn -json -ldap -lmdb -mysql -nslint -odbc -postgres -python -rpz (-seccomp) (-selinux) -static-libs -threads -xml" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5" 0 KiB

Resulting in:

/bin/sh /var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/libtool --mode=compile --tag=CC x86_64-pc-linux-gnu-gcc  -I/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1 -I../.. -I. -I../../lib/dns -Iinclude -I/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/lib/dns/include -I../../lib/dns/include -I/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/nothreads/include -I../../lib/isc/x86_32/include     -DUSE_MD5 -DOPENSSL   -D_GNU_SOURCE -O2 -pipe -march=native -mtune=native  -fPIC  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks  -c openssldh_link.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -I/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1 -I../.. -I. -I../../lib/dns -Iinclude -I/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/lib/dns/include -I../../lib/dns/include -I/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/nothreads/include -I../../lib/isc/x86_32/include -DUSE_MD5 -DOPENSSL -D_GNU_SOURCE -O2 -pipe -march=native -mtune=native -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks -c openssldh_link.c  -fPIC -DPIC -o .libs/openssldh_link.o
openssldh_link.c:77:1: error: static declaration of ‘DH_get0_key’ follows non-static declaration
 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) {
 ^~~~~~~~~~~
In file included from dst_internal.h:50:0,
                 from openssldh_link.c:44:
/usr/include/openssl/dh.h:196:6: note: previous declaration of ‘DH_get0_key’ was here
 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
      ^~~~~~~~~~~
openssldh_link.c:85:1: error: static declaration of ‘DH_set0_key’ follows non-static declaration
 DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) {
 ^~~~~~~~~~~
In file included from dst_internal.h:50:0,
                 from openssldh_link.c:44:
/usr/include/openssl/dh.h:197:5: note: previous declaration of ‘DH_set0_key’ was here
 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
     ^~~~~~~~~~~
openssldh_link.c:99:1: error: static declaration of ‘DH_get0_pqg’ follows non-static declaration
 DH_get0_pqg(const DH *dh,
 ^~~~~~~~~~~
In file included from dst_internal.h:50:0,
                 from openssldh_link.c:44:
/usr/include/openssl/dh.h:193:6: note: previous declaration of ‘DH_get0_pqg’ was here
 void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
      ^~~~~~~~~~~
openssldh_link.c:111:1: error: static declaration of ‘DH_set0_pqg’ follows non-static declaration
 DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
 ^~~~~~~~~~~
In file included from dst_internal.h:50:0,
                 from openssldh_link.c:44:
/usr/include/openssl/dh.h:195:5: note: previous declaration of ‘DH_set0_pqg’ was here
 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
     ^~~~~~~~~~~
make[2]: *** [Makefile:320: openssldh_link.lo] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/lib/dns'
make[1]: *** [Makefile:78: subdirs] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1/lib'
make: *** [Makefile:81: subdirs] Error 1
 * ERROR: net-dns/bind-9.11.2_p1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-dns/bind-9.11.2_p1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-dns/bind-9.11.2_p1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-dns/bind-9.11.2_p1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dns/bind-9.11.2_p1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1'
 * S: '/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1'

Both bind and bind-tools break in the same way and require the same patches to resolve.

Required patches to resolve this bug:

patch-lib_dns_openssldh_link_c.patch
patch-lib_dns_openssldsa_link_c.patch
patch-lib_dns_opensslecdsa_link_c.patch
patch-lib_dns_opensslgost_link_c.patch
patch-lib_dns_opensslrsa_link_c.patch

All of these patches are from the OpenBSD ports tree at:

https://github.com/openbsd/ports/tree/master/net/isc-bind/patches
Comment 1 Anthony Basile gentoo-dev 2018-03-24 11:13:45 UTC
All bug reporters, can you please test against dev-libs/libressl-2.7.1
Comment 2 Reuben Farrelly 2018-03-24 13:31:21 UTC
- Upgraded to libressl-2.7.1
- Tested by not applying the patch, attempting to recompile (fails)
- Tested again applying the patch, (compile succeeds)

=> no change in behaviour or changes to the patch with 2.7.1.
Comment 3 Anthony Basile gentoo-dev 2018-03-24 13:50:38 UTC
(In reply to Reuben Farrelly from comment #2)
> - Upgraded to libressl-2.7.1
> - Tested by not applying the patch, attempting to recompile (fails)
> - Tested again applying the patch, (compile succeeds)
> 
> => no change in behaviour or changes to the patch with 2.7.1.

okay i'm cc-ing the maintainer to see how he wants to integrate those patches with bind.  @idl0r, we can add those patches contingent on USE=libressl, or is that not an approach you want to take?
Comment 4 Christian Ruppert (idl0r) gentoo-dev 2018-04-28 11:11:33 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to Reuben Farrelly from comment #2)
> > - Upgraded to libressl-2.7.1
> > - Tested by not applying the patch, attempting to recompile (fails)
> > - Tested again applying the patch, (compile succeeds)
> > 
> > => no change in behaviour or changes to the patch with 2.7.1.
> 
> okay i'm cc-ing the maintainer to see how he wants to integrate those
> patches with bind.  @idl0r, we can add those patches contingent on
> USE=libressl, or is that not an approach you want to take?

If the patches are ok and someone takes care of it and if it doesn't break anything else, then that's fine to me. I just can't help with libressl.
Comment 5 kfm 2018-07-14 20:00:14 UTC
Although not mentioned in the release notes [1], bind-9.12.2 resolves this bug [2] [3]. Christian, would you put this release on a track to stabilisation?

[1] https://ftp.isc.org/isc/bind9/9.12.2/RELEASE-NOTES-bind-9.12.2.html
[2] https://github.com/isc-projects/bind9/commit/1e64b86
[3] https://github.com/isc-projects/bind9/commit/e3a318e
Comment 6 kfm 2018-07-14 20:04:33 UTC
Also, please consider bumping the ebuilds to EAPI 6 and calling eapply_user at the beginning of the src_prepare function. It's occasionally useful for those who need to apply out-of-band patches.
Comment 7 Stefan Strogin gentoo-dev 2019-02-16 05:29:35 UTC
Does not reproduce with bind-9.12.3. Fixed in the upstream. Could you close the bug?
Comment 8 Larry the Git Cow gentoo-dev 2019-03-06 16:31:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=23db3da1eadcf26e416df8ff23da46b34a84304b

commit 23db3da1eadcf26e416df8ff23da46b34a84304b
Author:     Stefan Strogin <stefan.strogin@gmail.com>
AuthorDate: 2019-03-06 16:30:45 +0000
Commit:     Stefan Strogin <stefan.strogin@gmail.com>
CommitDate: 2019-03-06 16:30:45 +0000

    net-dns/bind-tools: fixed upstream, new version is in gentoo.git
    
    Bug: https://bugs.gentoo.org/651310
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>

 net-dns/bind-tools/Manifest                        |   1 -
 net-dns/bind-tools/bind-tools-9.12.1-r1.ebuild     | 145 ---------------------
 .../files/bind-tools-9.12.1-libressl.patch         |  44 -------
 .../files/bind-tools-9.5.0_p1-lwconfig.patch       |  63 ---------
 net-dns/bind-tools/metadata.xml                    |  14 --
 5 files changed, 267 deletions(-)