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

Bug 647680

Summary: net-libs/neon-0.30.2 with >=dev-libs/openssl-1.1.0 - ne_openssl.c:1167:16: error: ‘CRYPTO_LOCK’ undeclared (first use in this function)
Product: Gentoo Linux Reporter: Quentin Minster <quentin>
Component: Current packagesAssignee: Arfrever Frehtes Taifersar Arahesis <arfrever.fta>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint, quentin
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 592438, 669514    
Attachments: build.log
neon-0.30.2-openssl-1.1-compat.patch

Description Quentin Minster 2018-02-15 03:13:26 UTC
Created attachment 519586 [details]
build.log

net-libs/neon-0.30.2 fails to build with >=dev-libs/openssl-1.1.0, with the following error:

  ne_openssl.c: In function ‘thread_lock_neon’:
  ne_openssl.c:1167:16: error: ‘CRYPTO_LOCK’ undeclared (first use in this function); did you mean ‘CRYPTO_RWLOCK’?
       if (mode & CRYPTO_LOCK) {
                  ^~~~~~~~~~~
                  CRYPTO_RWLOCK

This is due to threading model changes in OpenSSL 1.1.0.

There are also some warnings that don't cause the build to fail, but will cause neon to fail loading at runtime (unresolved symbols). These are due to functions that were renamed in OpenSSL 1.1.0.

Oddly, neon already has had some changes made to support OpenSSL 1.1.0. It seems some bits are still missing.
As a side note, upstream's website seems irresponsive at the moment, so I can't contribute those changes back just yet.
Comment 1 Quentin Minster 2018-02-15 03:15:39 UTC
Created attachment 519588 [details, diff]
neon-0.30.2-openssl-1.1-compat.patch

Patch that fixes both the CRYPTO_LOCK error and the renamed functions warnings.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-03-16 12:31:24 UTC
Is any patch still needed after https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a999820820bddaefedbc959999faa7adf467a12b ?
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-10-24 15:20:48 UTC
Since we decided to no longer build openssl without deprecated features, this
bug can now be considered as fixed (but will eventually reappear once openssl
upstream finally removed deprecated features from their code).
Comment 4 Kenton Groombridge 2018-12-30 16:15:28 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #3)
> Since we decided to no longer build openssl without deprecated features, this
> bug can now be considered as fixed (but will eventually reappear once openssl
> upstream finally removed deprecated features from their code).

I think today is that day. neon fails to compile on all my systems after upgrading openssl.
Comment 5 Kenton Groombridge 2018-12-31 03:47:24 UTC
I should add that neon builds fine with openssl-1.1.0j if I remove the pkcs11 use flag.