Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614460 - =app-arch/libarchive-3.3.1: undefined reference to `HMAC_CTX_new' (libressl)
Summary: =app-arch/libarchive-3.3.1: undefined reference to `HMAC_CTX_new' (libressl)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libressl-support
  Show dependency tree
 
Reported: 2017-04-01 22:37 UTC by hexum
Modified: 2018-01-02 13:24 UTC (History)
4 users (show)

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


Attachments
build.log.gz (build.log.gz,6.30 KB, application/gzip)
2017-04-01 22:38 UTC, hexum
Details
emerge --info (file_614460.txt,5.14 KB, text/plain)
2017-04-01 22:39 UTC, hexum
Details
build.log.gz (build.log.gz,9.50 KB, application/gzip)
2017-04-01 22:41 UTC, hexum
Details
libarchive-3.3.1-r1.ebuild (libarchive-3.3.1-r1.ebuild,3.24 KB, text/plain)
2017-04-01 23:33 UTC, hexum
Details
130-libarchive-fix-libressl-compat.patch (130-libarchive-fix-libressl-compat.patch,917 bytes, patch)
2017-04-01 23:35 UTC, hexum
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hexum 2017-04-01 22:37:57 UTC
Can't build libarchive.
Very similar to 594998.
I believe it's issue with libressl.
Comment 1 hexum 2017-04-01 22:38:56 UTC
Created attachment 468908 [details]
build.log.gz
Comment 2 hexum 2017-04-01 22:39:26 UTC
Created attachment 468910 [details]
emerge --info
Comment 3 hexum 2017-04-01 22:41:25 UTC
Created attachment 468912 [details]
build.log.gz
Comment 4 hexum 2017-04-01 22:47:30 UTC
Looks like we should report it to upstream and provide some patch like this one
https://github.com/libssh2/libssh2/pull/81/files
Comment 5 hexum 2017-04-01 23:00:36 UTC
Found appropriate patch
http://lists.infradead.org/pipermail/lede-commits/2016-December/001623.html
Comment 6 hexum 2017-04-01 23:06:55 UTC
After patch applying I get a similar error. But it provides an idea.
Comment 10 hexum 2017-04-01 23:33:25 UTC
Created attachment 468916 [details]
libarchive-3.3.1-r1.ebuild
Comment 11 hexum 2017-04-01 23:35:35 UTC
Created attachment 468918 [details, diff]
130-libarchive-fix-libressl-compat.patch
Comment 12 hexum 2017-04-01 23:35:54 UTC
Managed to build with 130-libarchive-fix-libressl-compat.patch
Comment 13 Toralf Förster gentoo-dev 2017-06-07 20:31:14 UTC
(In reply to hexum from comment #12)
Here I had to shrink the path prefix "Utilities/cmlibarchive" b/c epatch() doesn't try -p3 (any longer) - otherwise it works at a stable hardened libressl'ed server
Comment 14 James L. Hammons 2017-06-10 13:49:46 UTC
Can confirm that the attached ebuild and patch work as advertised (64-bit multilib).
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-30 06:19:48 UTC
Where is the upstream submission for this patch?
Comment 18 kfm 2017-06-30 13:00:10 UTC
(In reply to Michał Górny from comment #17)
> Where is the upstream submission for this patch?

https://github.com/libarchive/libarchive/pull/902

It's missing the alteration to archive_openssl_evp_private.h, however.
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-30 15:32:09 UTC
...which only proves that the patch would be merged promptly if anyone bothered submitting it rather than patching it locally throughout half a dozen random distributions and sending the patches everywhere except where they should go.
Comment 20 hexum 2017-06-30 16:41:40 UTC
I've got this patch on the internet. And do not sure it doesn't bring up new problems. I'm not the author of it. So, I've brought it here for staging and review.
And from my point of view, this patch is a workaround, not the right solution.
The right solution is to make libressl a drop-in replacement for libressl.
And even more better solution - to invent universal extendable crypto lib API, describe it in RFC and force applications to use dlopen instead compile time linking. It's the way PKCS11 libs work. You can change PKCS11 lib is being used be ssh by changing it's config.
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-01-02 13:24:41 UTC
Please test with 3.3.2 and reopen if there are any problems left.