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

Bug 651170

Summary: dev-perl/Crypt-OpenSSL-RSA-0.280.0-r3 with dev-libs/libressl-2.7.0 RSA.xs:52:13: error: static declaration of RSA_get0_key follows non-static declaration
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo LibreSSL <libressl>
Status: RESOLVED FIXED    
Severity: normal CC: kentnl, perl, reuben-gentoo-bugzilla
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://rt.cpan.org/Ticket/Display.html?id=117481
See Also: https://bugs.gentoo.org/show_bug.cgi?id=592534
https://github.com/gentoo/gentoo/pull/8078
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 561854, 607156, 651228    
Attachments: emerge-info.txt
dev-perl:Crypt-OpenSSL-RSA-0.280.0-r3:20180322-165858.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
Updated libressl patch

Description Toralf Förster gentoo-dev 2018-03-22 17:02:05 UTC
mv RSA.xsc RSA.c
x86_64-pc-linux-gnu-gcc -c   -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -march=native   -DVERSION=\"0.28\" -DXS_VERSION=\"0.28\" -fPIC "-I/usr/lib64/perl5/5.26.1/x86_64-linux/CORE"  -DPERL5 -DOPENSSL_NO_KRB5 RSA.c
RSA.xs:52:13: error: static declaration of ‘RSA_get0_key’ follows non-static declaration
 static void RSA_get0_key(const RSA *r,
             ^~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:96:0,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-developer_libressl_20180319-185656

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python2.7 (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.7.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv dev-perl/Crypt-OpenSSL-RSA
[ebuild   R   ] dev-perl/Crypt-OpenSSL-RSA-0.280.0-r3  USE="libressl"
Comment 1 Toralf Förster gentoo-dev 2018-03-22 17:02:08 UTC
Created attachment 524882 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-03-22 17:02:11 UTC
Created attachment 524884 [details]
dev-perl:Crypt-OpenSSL-RSA-0.280.0-r3:20180322-165858.log
Comment 3 Toralf Förster gentoo-dev 2018-03-22 17:02:14 UTC
Created attachment 524886 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-03-22 17:02:17 UTC
Created attachment 524888 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-03-22 17:02:20 UTC
Created attachment 524890 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-03-22 17:02:22 UTC
Created attachment 524892 [details]
temp.tbz2
Comment 7 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-03-22 21:27:23 UTC
Gonna punt this to libressl team. If they can be sure its not just libressl doing something funky, tell us what is going wrong and I'll see if I can badger upstream about it.

As it is we're downstream patching for compat already.... so we probably need yet more downstream patching.

Otherwise libressl is on my "EDONTCARE" list.
Comment 8 Reuben Farrelly 2018-03-24 08:21:01 UTC
Created attachment 525206 [details, diff]
Updated libressl patch

This is easily fixed - it just requires the existing patch in dev-perl/Crypt-OpenSSL-RSA/files to be slightly updated.

In short - change this in the existing patch:

+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)

to:

+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)

I've attached my updated version of the entire patch, which fixes the problem.  Now the package compiles and installs successfully.
Comment 9 Anthony Basile gentoo-dev 2018-03-24 11:14:16 UTC
All bug reporters, can you please test against dev-libs/libressl-2.7.1
Comment 10 Larry the Git Cow gentoo-dev 2018-04-21 17:54:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5af77d034e970df9bcc61e15dd53121821855f5

commit c5af77d034e970df9bcc61e15dd53121821855f5
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2018-04-19 23:29:55 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2018-04-21 17:54:40 +0000

    dev-perl/Crypt-OpenSSL-RSA: compatibility patch for LibreSSL
    
    This patch was pulled from upstream to adjust version checks to fix
    compatibiity with the OpenSSL and LibreSSL 1.1 API implementations.
    
    Closes: https://bugs.gentoo.org/651170
    Package-Manager: Portage-2.3.31, Repoman-2.3.9
    Closes: https://github.com/gentoo/gentoo/pull/8078

 .../files/Crypt-OpenSSL-RSA-0.280.0-openssl-1.1.0.patch               | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)