Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653716 - app-crypt/efitools-1.8.1[libressl]: undefined reference to `i2d_re_X509_tbs'
Summary: app-crypt/efitools-1.8.1[libressl]: undefined reference to `i2d_re_X509_tbs'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo LibreSSL
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-21 19:18 UTC by Vincent Brillault
Modified: 2018-04-23 17:29 UTC (History)
0 users

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


Attachments
Emerge.info (note the "libressl" in USE) (emerge.info,16.94 KB, text/plain)
2018-04-21 19:18 UTC, Vincent Brillault
Details
libressl: use same API as openssl 1.0 (libressl.patch,495 bytes, patch)
2018-04-21 19:19 UTC, Vincent Brillault
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Brillault 2018-04-21 19:18:08 UTC
Created attachment 528166 [details]
Emerge.info (note the "libressl" in USE)

app-crypt/efitools-1.8.1 does not compile when used by libressl.
It seems that a recent "fix" for openssl 1.1.0 (https://bugs.gentoo.org/648016 I believe) breaks libressl compatibility:

```
cc -I/var/tmp/portage/app-crypt/efitools-1.8.1/work/efitools-1.8.1/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -O2 -pipe -march=native -g -ggdb  -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -c cert-to-efi-hash-list.c -o cert-to-efi-hash-list.o
cert-to-efi-hash-list.c: In function ‘main’:
cert-to-efi-hash-list.c:141:17: warning: implicit declaration of function ‘i2d_re_X509_tbs’ [-Wimplicit-function-declaration]
  int cert_len = i2d_re_X509_tbs(cert, &cert_buf);
                 ^~~~~~~~~~~~~~~
cc -Wl,-O1 -Wl,--as-needed  -o cert-to-efi-hash-list cert-to-efi-hash-list.o -lcrypto lib/lib.a
cert-to-efi-hash-list.o: In function `main':
/var/tmp/portage/app-crypt/efitools-1.8.1/work/efitools-1.8.1/cert-to-efi-hash-list.c:141: undefined reference to `i2d_re_X509_tbs'

```

A simple patch (derived from a patch in app-crypt/mit-krb5: https://github.com/gentoo-mirror/gentoo/blob/stable/app-crypt/mit-krb5/files/mit-krb5-libressl-version-check.patch) seems to solve the compilation issue for me, I'll attach it in the next comment.
Comment 1 Vincent Brillault 2018-04-21 19:19:40 UTC
Created attachment 528168 [details, diff]
libressl: use same API as openssl 1.0
Comment 2 Larry the Git Cow gentoo-dev 2018-04-23 17:29:48 UTC
The bug has been closed via the following commit(s):

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

commit b34e70a62caf31299d173736f3297bb7e505dd5e
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2018-04-23 17:29:24 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2018-04-23 17:29:37 +0000

    app-crypt/efitools: add compatibility patch for LibreSSL
    
    This patch fixes building with LibreSSL due to a conditional function
    for API.
    
    Closes: https://bugs.gentoo.org/653716
    Package-Manager: Portage-2.3.31, Repoman-2.3.9

 app-crypt/efitools/efitools-1.8.1.ebuild                      |  2 ++
 .../files/efitools-1.8.1-libressl-compatibility.patch         | 11 +++++++++++
 2 files changed, 13 insertions(+)