Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592508 - net-libs/serf fails to build with >=dev-libs/openssl-1.1.0
Summary: net-libs/serf fails to build with >=dev-libs/openssl-1.1.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis
URL:
Whiteboard:
Keywords:
Depends on: 624434
Blocks: openssl-1.1 openssl-1.1_disable-deprecated
  Show dependency tree
 
Reported: 2016-08-30 22:53 UTC by Lars Wendler (Polynomial-C)
Modified: 2018-10-24 16:27 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,18.15 KB, text/plain)
2016-08-30 22:53 UTC, Lars Wendler (Polynomial-C)
Details
serf-1.3.9-openssl11-no-deprecated.patch (serf-1.3.9-openssl11-no-deprecated.patch,3.04 KB, patch)
2018-02-01 01:02 UTC, Quentin Minster
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) gentoo-dev 2016-08-30 22:53:44 UTC
Created attachment 444518 [details]
build.log

x86_64-pc-linux-gnu-gcc -o buckets/ssl_buckets.os -c -march=native -mtune=native -O2 -pipe -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -pthread -fPIC -DNDEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/include/ap
r-1 -I/usr/include/db6.2 buckets/ssl_buckets.c
buckets/ssl_buckets.c: In function 'bio_bucket_read':
buckets/ssl_buckets.c:250:34: error: dereferencing pointer to incomplete type 'BIO {aka struct bio_st}'
     serf_ssl_context_t *ctx = bio->ptr;
                                  ^
buckets/ssl_buckets.c: At top level:
buckets/ssl_buckets.c:402:1: error: variable 'bio_bucket_method' has initializer but incomplete type
 static BIO_METHOD bio_bucket_method = {
 ^
buckets/ssl_buckets.c:404:5: warning: excess elements in struct initializer
     "Serf SSL encryption and decryption buckets",
     ^
buckets/ssl_buckets.c:404:5: note: (near initialization for 'bio_bucket_method')
buckets/ssl_buckets.c:405:5: warning: excess elements in struct initializer
     bio_bucket_write,
     ^
buckets/ssl_buckets.c:405:5: note: (near initialization for 'bio_bucket_method')
buckets/ssl_buckets.c:406:5: warning: excess elements in struct initializer
     bio_bucket_read,
     ^
buckets/ssl_buckets.c:406:5: note: (near initialization for 'bio_bucket_method')
buckets/ssl_buckets.c:409:5: warning: excess elements in struct initializer
     bio_bucket_ctrl,
     ^
buckets/ssl_buckets.c:409:5: note: (near initialization for 'bio_bucket_method')
buckets/ssl_buckets.c:410:5: warning: excess elements in struct initializer
     bio_bucket_create,
     ^
buckets/ssl_buckets.c:410:5: note: (near initialization for 'bio_bucket_method')
buckets/ssl_buckets.c:411:5: warning: excess elements in struct initializer
     bio_bucket_destroy,
     ^
buckets/ssl_buckets.c:411:5: note: (near initialization for 'bio_bucket_method')
buckets/ssl_buckets.c:417:1: error: variable 'bio_file_method' has initializer but incomplete type
 static BIO_METHOD bio_file_method = {
 ^
buckets/ssl_buckets.c:419:5: warning: excess elements in struct initializer
     "Wrapper around APR file structures",
     ^
buckets/ssl_buckets.c:419:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c:420:5: warning: excess elements in struct initializer
     bio_file_write,
     ^
buckets/ssl_buckets.c:420:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c:421:5: warning: excess elements in struct initializer
     bio_file_read,
     ^
buckets/ssl_buckets.c:421:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c:423:5: warning: excess elements in struct initializer
     bio_file_gets,               /* Is this called? */
     ^
buckets/ssl_buckets.c:423:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c:424:5: warning: excess elements in struct initializer
     bio_bucket_ctrl,
     ^
buckets/ssl_buckets.c:424:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c:425:5: warning: excess elements in struct initializer
     bio_bucket_create,
     ^
buckets/ssl_buckets.c:425:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c:426:5: warning: excess elements in struct initializer
     bio_bucket_destroy,
     ^
buckets/ssl_buckets.c:426:5: note: (near initialization for 'bio_file_method')
buckets/ssl_buckets.c: In function 'get_subject_alt_names':
buckets/ssl_buckets.c:465:32: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign]
                         strlen(nm->d.ia5->data) != nm->d.ia5->length)
                                ^
In file included from /usr/include/apr-1/apr_want.h:63:0,
                 from /usr/include/apr-1/apr_pools.h:47,
                 from buckets/ssl_buckets.c:37:
/usr/include/string.h:394:15: note: expected 'const char *' but argument is of type 'unsigned char *'
 extern size_t strlen (const char *__s)
               ^
buckets/ssl_buckets.c: In function 'validate_server_certificate':
buckets/ssl_buckets.c:566:31: warning: implicit declaration of function 'X509_get_notBefore' [-Wimplicit-function-declaration]
     if (X509_cmp_current_time(X509_get_notBefore(server_cert)) >= 0) {
                               ^
buckets/ssl_buckets.c:566:31: warning: passing argument 1 of 'X509_cmp_current_time' makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/openssl/pem.h:17:0,
                 from /usr/include/openssl/ssl.h:55,
                 from buckets/ssl_buckets.c:50:
/usr/include/openssl/x509.h:475:5: note: expected 'const ASN1_TIME * {aka const struct asn1_string_st *}' but argument is of type 'int'
 int X509_cmp_current_time(const ASN1_TIME *s);
     ^
buckets/ssl_buckets.c:569:36: warning: implicit declaration of function 'X509_get_notAfter' [-Wimplicit-function-declaration]
     else if (X509_cmp_current_time(X509_get_notAfter(server_cert)) <= 0) {
                                    ^
buckets/ssl_buckets.c:569:36: warning: passing argument 1 of 'X509_cmp_current_time' makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/openssl/pem.h:17:0,
                 from /usr/include/openssl/ssl.h:55,
                 from buckets/ssl_buckets.c:50:
/usr/include/openssl/x509.h:475:5: note: expected 'const ASN1_TIME * {aka const struct asn1_string_st *}' but argument is of type 'int'
 int X509_cmp_current_time(const ASN1_TIME *s);
     ^
buckets/ssl_buckets.c:609:17: warning: implicit declaration of function 'X509_STORE_CTX_get_chain' [-Wimplicit-function-declaration]
         chain = X509_STORE_CTX_get_chain(store_ctx);
                 ^
buckets/ssl_buckets.c:609:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         chain = X509_STORE_CTX_get_chain(store_ctx);
               ^
buckets/ssl_buckets.c: In function 'ssl_dyn_lock':
buckets/ssl_buckets.c:1004:16: error: 'CRYPTO_LOCK' undeclared (first use in this function)
     if (mode & CRYPTO_LOCK) {
                ^
buckets/ssl_buckets.c:1004:16: note: each undeclared identifier is reported only once for each function it appears in
buckets/ssl_buckets.c:1007:21: error: 'CRYPTO_UNLOCK' undeclared (first use in this function)
     else if (mode & CRYPTO_UNLOCK) {
                     ^
buckets/ssl_buckets.c: In function 'ssl_lock':
buckets/ssl_buckets.c:1020:16: error: 'CRYPTO_LOCK' undeclared (first use in this function)
     if (mode & CRYPTO_LOCK) {
                ^
buckets/ssl_buckets.c:1023:21: error: 'CRYPTO_UNLOCK' undeclared (first use in this function)
     else if (mode & CRYPTO_UNLOCK) {
                     ^
buckets/ssl_buckets.c: In function 'cleanup_ssl':
buckets/ssl_buckets.c:1036:5: warning: implicit declaration of function 'CRYPTO_set_locking_callback' [-Wimplicit-function-declaration]
     CRYPTO_set_locking_callback(NULL);
     ^
buckets/ssl_buckets.c:1037:5: warning: implicit declaration of function 'CRYPTO_set_id_callback' [-Wimplicit-function-declaration]
     CRYPTO_set_id_callback(NULL);
     ^
buckets/ssl_buckets.c:1038:5: warning: implicit declaration of function 'CRYPTO_set_dynlock_create_callback' [-Wimplicit-function-declaration]
     CRYPTO_set_dynlock_create_callback(NULL);
     ^
buckets/ssl_buckets.c:1039:5: warning: implicit declaration of function 'CRYPTO_set_dynlock_lock_callback' [-Wimplicit-function-declaration]
     CRYPTO_set_dynlock_lock_callback(NULL);
     ^
buckets/ssl_buckets.c:1040:5: warning: implicit declaration of function 'CRYPTO_set_dynlock_destroy_callback' [-Wimplicit-function-declaration]
     CRYPTO_set_dynlock_destroy_callback(NULL);
     ^
buckets/ssl_buckets.c: In function 'init_ssl_libraries':
buckets/ssl_buckets.c:1074:23: warning: implicit declaration of function 'SSLeay' [-Wimplicit-function-declaration]
         long libver = SSLeay();
                       ^
buckets/ssl_buckets.c:1084:9: warning: implicit declaration of function 'CRYPTO_malloc_init' [-Wimplicit-function-declaration]
         CRYPTO_malloc_init();
         ^
buckets/ssl_buckets.c:1085:9: warning: implicit declaration of function 'ERR_load_crypto_strings' [-Wimplicit-function-declaration]
         ERR_load_crypto_strings();
         ^
buckets/ssl_buckets.c:1086:9: warning: implicit declaration of function 'SSL_load_error_strings' [-Wimplicit-function-declaration]
         SSL_load_error_strings();
         ^
buckets/ssl_buckets.c:1087:9: warning: implicit declaration of function 'SSL_library_init' [-Wimplicit-function-declaration]
         SSL_library_init();
         ^
buckets/ssl_buckets.c:1088:9: warning: implicit declaration of function 'OpenSSL_add_all_algorithms' [-Wimplicit-function-declaration]
         OpenSSL_add_all_algorithms();
         ^
buckets/ssl_buckets.c:1091:20: warning: implicit declaration of function 'CRYPTO_num_locks' [-Wimplicit-function-declaration]
         numlocks = CRYPTO_num_locks();
                    ^
buckets/ssl_buckets.c: In function 'serf_ssl_cert_certificate':
buckets/ssl_buckets.c:1718:19: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         notBefore = X509_get_notBefore(cert->ssl_cert);
                   ^
buckets/ssl_buckets.c:1725:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         notAfter = X509_get_notAfter(cert->ssl_cert);
                  ^
scons: *** [buckets/ssl_buckets.os] Error 1
scons: building terminated because of errors.
Comment 1 Quentin Minster 2018-02-01 01:01:16 UTC
It seems some of the errors you're seeing have been fixed in the latest version of net-libs/serf that's currently in Portage (1.3.9).

However since they're still relying on the OpenSSL 1.1->1.0 compatibility layer, which isn't enabled in Gentoo's OpenSSL 1.1, and the build still fails.
I'm attaching a patch that fixes this.

I also submitted a patch upstream: https://issues.apache.org/jira/browse/SERF-188
Comment 2 Quentin Minster 2018-02-01 01:02:15 UTC
Created attachment 517328 [details, diff]
serf-1.3.9-openssl11-no-deprecated.patch
Comment 3 Arfrever Frehtes Taifersar Arahesis 2018-03-16 12:31:20 UTC
Is any patch still needed after https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a999820820bddaefedbc959999faa7adf467a12b ?
Comment 4 Lars Wendler (Polynomial-C) gentoo-dev 2018-03-16 13:15:39 UTC
Package builds now. But can we please keep it open anyway?
Comment 5 Lars Wendler (Polynomial-C) gentoo-dev 2018-10-24 13:46:31 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).