postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.9k stars 252 forks source link

Can't download Ruby 1.8.x archives #407

Closed nirvdrum closed 3 years ago

nirvdrum commented 3 years ago

Description

ruby-install ruby 1.8.7-p374 fails to install, despite being listed in ruby-versions, because ruby-install only looks for .xz files whereas Ruby 1.8 is packaged as .bz2, .tar.gz, and .zip.

It looks like the issue is due to ruby_archive hard-coded to use the .xz extension. I'm not all that familiar with the ruby-install code. Since that sets a default Bash value, there may be a way to use the correct archive file from the ruby-install CLI. I used the simple form of the installation command. It might be helpful to have a ladder of preferred archive files and move to the next option if one fails to fetch or is corrupted.

Steps To Reproduce

Steps to reproduce the bug:

  1. $ ruby-install ruby 1.8.7-p374

Expected Behavior

The Ruby 1.8.7-p374 source should be downloaded, built, and installed.

Actual Behavior

❯ ruby-install ruby-1.8.7-p374
>>> Installing ruby 1.8.7-p374 into /Users/nirvdrum/.rubies/ruby-1.8.7-p374 ...
>>> Installing dependencies for ruby 1.8.7-p374 ...
>>> Downloading https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.xz into /Users/nirvdrum/src ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
!!! Download of https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.xz failed!

Environment

N/A.

postmodern commented 3 years ago

We could test the ruby_version if it's < 3.x and switch back to the old .tar.bz2 extension.

However, it's highly unlikely ruby-1.8.7-p374 will compile at all using a modern version of gcc, openssl, etc.

postmodern commented 3 years ago

Well 79b3a9da7b6c1065782445bf6e636e78189c229e fixes the downloading issue, but predictably compiling 1.8.7-p374 fails when it gets to the openssl code.

gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -g -O2    -c ossl_pkey_dsa.c
In file included from ossl.h:57,
                 from ossl_pkey_dsa.c:13:
/usr/include/openssl/asn1_mac.h:10:2: error: #error "This file is obsolete; please update your software."
   10 | #error "This file is obsolete; please update your software."
      |  ^~~~~
In file included from ossl.h:205,
                 from ossl_pkey_dsa.c:13:
openssl_missing.h:79:35: error: macro "EVP_MD_CTX_create" passed 1 arguments, but takes just 0
   79 | EVP_MD_CTX *EVP_MD_CTX_create(void);
      |                                   ^
In file included from /usr/include/openssl/x509.h:18,
                 from /usr/include/openssl/x509v3.h:14,
                 from ossl.h:58,
                 from ossl_pkey_dsa.c:13:
/usr/include/openssl/evp.h:541: note: macro "EVP_MD_CTX_create" defined here
  541 | # define EVP_MD_CTX_create()     EVP_MD_CTX_new()
      | 
openssl_missing.h:83:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
   83 | void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
      |      ^~~~~~~~~~~~~~~
openssl_missing.h:91:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
   91 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
      |      ^~~~~~~~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_new’:
ossl_pkey_dsa.c:63:31: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   63 |         if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) {
      |                               ^~
ossl_pkey_dsa.c: In function ‘dsa_generate’:
ossl_pkey_dsa.c:89:5: warning: ‘DSA_generate_parameters’ is deprecated [-Wdeprecated-declarations]
   89 |     dsa = DSA_generate_parameters(size, seed, seed_len, &counter, &h,
      |     ^~~
In file included from /usr/include/openssl/opensslconf.h:42,
                 from /usr/include/openssl/e_os2.h:13,
                 from /usr/include/openssl/err.h:13,
                 from ossl.h:56,
                 from ossl_pkey_dsa.c:13:
/usr/include/openssl/dsa.h:118:1: note: declared here
  118 | DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits,
      | ^~~~~~~~~~~~~~~~~~
In file included from ossl.h:205,
                 from ossl_pkey_dsa.c:13:
ossl_pkey_dsa.c: In function ‘ossl_dsa_initialize’:
openssl_missing.h:31:9: warning: passing argument 1 of ‘PEM_ASN1_read_bio’ from incompatible pointer type [-Wincompatible-pointer-types]
   31 |         (char *(*)())d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(char **)x,cb,u)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         char * (*)()
ossl_pkey_dsa.c:165:19: note: in expansion of macro ‘PEM_read_bio_DSAPublicKey’
  165 |             dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ssl.h:25,
                 from ossl.h:59,
                 from ossl_pkey_dsa.c:13:
/usr/include/openssl/pem.h:252:38: note: expected ‘void * (*)(void **, const unsigned char **, long int)’ but argument is of type ‘char * (*)()’
  252 | void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
      |                         ~~~~~~~~~~~~~^~~
In file included from ossl.h:205,
                 from ossl_pkey_dsa.c:13:
openssl_missing.h:31:64: warning: passing argument 4 of ‘PEM_ASN1_read_bio’ from incompatible pointer type [-Wincompatible-pointer-types]
   31 |         (char *(*)())d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(char **)x,cb,u)
ossl_pkey_dsa.c:165:19: note: in expansion of macro ‘PEM_read_bio_DSAPublicKey’
  165 |             dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ssl.h:25,
                 from ossl.h:59,
                 from ossl_pkey_dsa.c:13:
/usr/include/openssl/pem.h:252:77: note: expected ‘void **’ but argument is of type ‘char **’
  252 | void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
      |                                                                      ~~~~~~~^
ossl_pkey_dsa.c: In function ‘ossl_dsa_is_public’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:200:5: note: in expansion of macro ‘GetPKeyDSA’
  200 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:202:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  202 |     return (pkey->pkey.dsa->pub_key) ? Qtrue : Qfalse;
      |                 ^~
ossl_pkey_dsa.c: In function ‘ossl_dsa_is_private’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:215:5: note: in expansion of macro ‘GetPKeyDSA’
  215 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:217:35: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  217 |     return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse;
      |                                   ^~
ossl_pkey_dsa.c:22:32: note: in definition of macro ‘DSA_HAS_PRIVATE’
   22 | #define DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key)
      |                                ^~~
ossl_pkey_dsa.c:217:13: note: in expansion of macro ‘DSA_PRIVATE’
  217 |     return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse;
      |             ^~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_export’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:242:5: note: in expansion of macro ‘GetPKeyDSA’
  242 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:253:29: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  253 |     if (DSA_HAS_PRIVATE(pkey->pkey.dsa)) {
      |                             ^~
ossl_pkey_dsa.c:22:32: note: in definition of macro ‘DSA_HAS_PRIVATE’
   22 | #define DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key)
      |                                ^~~
ossl_pkey_dsa.c:254:51: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  254 |         if (!PEM_write_bio_DSAPrivateKey(out, pkey->pkey.dsa, ciph,
      |                                                   ^~
In file included from ossl.h:205,
                 from ossl_pkey_dsa.c:13:
ossl_pkey_dsa.c:260:50: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  260 |         if (!PEM_write_bio_DSAPublicKey(out, pkey->pkey.dsa)) {
      |                                                  ^~
openssl_missing.h:38:28: note: in definition of macro ‘PEM_write_bio_DSAPublicKey’
   38 |                 bp,(char *)x, NULL, NULL, 0, NULL, NULL)
      |                            ^
ossl_pkey_dsa.c: In function ‘ossl_dsa_to_der’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:284:5: note: in expansion of macro ‘GetPKeyDSA’
  284 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:285:28: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  285 |     if(DSA_HAS_PRIVATE(pkey->pkey.dsa))
      |                            ^~
ossl_pkey_dsa.c:22:32: note: in definition of macro ‘DSA_HAS_PRIVATE’
   22 | #define DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key)
      |                                ^~~
ossl_pkey_dsa.c:289:28: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  289 |     if((len = i2d_func(pkey->pkey.dsa, NULL)) <= 0)
      |                            ^~
ossl_pkey_dsa.c:293:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  293 |     if(i2d_func(pkey->pkey.dsa, &p) < 0)
      |                     ^~
ossl_pkey_dsa.c: In function ‘ossl_dsa_get_params’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:314:5: note: in expansion of macro ‘GetPKeyDSA’
  314 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:318:58: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  318 |     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p));
      |                                                          ^~
ossl_pkey_dsa.c:319:58: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  319 |     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q));
      |                                                          ^~
ossl_pkey_dsa.c:320:58: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  320 |     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g));
      |                                                          ^~
ossl_pkey_dsa.c:321:64: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  321 |     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key));
      |                                                                ^~
ossl_pkey_dsa.c:322:65: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  322 |     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key));
      |                                                                 ^~
ossl_pkey_dsa.c: In function ‘ossl_dsa_to_text’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:342:5: note: in expansion of macro ‘GetPKeyDSA’
  342 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:346:29: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  346 |     if (!DSA_print(out, pkey->pkey.dsa, 0)) { /* offset = 0 */
      |                             ^~
ossl_pkey_dsa.c: In function ‘ossl_dsa_to_public_key’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:368:5: note: in expansion of macro ‘GetPKeyDSA’
  368 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
In file included from ossl.h:205,
                 from ossl_pkey_dsa.c:13:
ossl_pkey_dsa.c:370:32: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  370 |     dsa = DSAPublicKey_dup(pkey->pkey.dsa);
      |                                ^~
openssl_missing.h:48:47: note: in definition of macro ‘DSAPublicKey_dup’
   48 |         (char *(*)())d2i_DSAPublicKey,(char *)dsa)
      |                                               ^~~
openssl_missing.h:48:9: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type [-Wincompatible-pointer-types]
   48 |         (char *(*)())d2i_DSAPublicKey,(char *)dsa)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         char * (*)()
ossl_pkey_dsa.c:370:11: note: in expansion of macro ‘DSAPublicKey_dup’
  370 |     dsa = DSAPublicKey_dup(pkey->pkey.dsa);
      |           ^~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/objects.h:15,
                 from /usr/include/openssl/evp.h:28,
                 from /usr/include/openssl/x509.h:18,
                 from /usr/include/openssl/x509v3.h:14,
                 from ossl.h:58,
                 from ossl_pkey_dsa.c:13:
/usr/include/openssl/asn1.h:688:47: note: expected ‘void * (*)(void **, const unsigned char **, long int)’ but argument is of type ‘char * (*)()’
  688 | void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
      |                                  ~~~~~~~~~~~~~^~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_sign’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:393:5: note: in expansion of macro ‘GetPKeyDSA’
  393 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:395:32: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  395 |     if (!DSA_PRIVATE(self, pkey->pkey.dsa)) {
      |                                ^~
ossl_pkey_dsa.c:22:32: note: in definition of macro ‘DSA_HAS_PRIVATE’
   22 | #define DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key)
      |                                ^~~
ossl_pkey_dsa.c:395:10: note: in expansion of macro ‘DSA_PRIVATE’
  395 |     if (!DSA_PRIVATE(self, pkey->pkey.dsa)) {
      |          ^~~~~~~~~~~
ossl_pkey_dsa.c:379:49: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  379 | #define ossl_dsa_buf_size(pkey) (DSA_size((pkey)->pkey.dsa)+16)
      |                                                 ^~
ossl_pkey_dsa.c:398:25: note: in expansion of macro ‘ossl_dsa_buf_size’
  398 |     str = rb_str_new(0, ossl_dsa_buf_size(pkey));
      |                         ^~~~~~~~~~~~~~~~~
ossl_pkey_dsa.c:400:33: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  400 |                   &buf_len, pkey->pkey.dsa)) { /* type is ignored (0) */
      |                                 ^~
ossl_pkey_dsa.c: In function ‘ossl_dsa_verify’:
ossl_pkey_dsa.c:17:27: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
   17 |     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
      |                           ^~
ossl_pkey_dsa.c:419:5: note: in expansion of macro ‘GetPKeyDSA’
  419 |     GetPKeyDSA(self, pkey);
      |     ^~~~~~~~~~
ossl_pkey_dsa.c:424:62: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  424 |                      RSTRING_PTR(sig), RSTRING_LEN(sig), pkey->pkey.dsa);
      |                                                              ^~
In file included from ossl.h:219,
                 from ossl_pkey_dsa.c:13:
ossl_pkey_dsa.c: In function ‘ossl_dsa_get_p’:
ossl_pkey.h:104:18: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  104 |         bn = pkey->pkey.keytype->name;                                  \
      |                  ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_set_p’:
ossl_pkey.h:120:35: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  120 |                 BN_clear_free(pkey->pkey.keytype->name);                \
      |                                   ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey.h:121:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  121 |                 pkey->pkey.keytype->name = NULL;                        \
      |                     ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey.h:126:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  126 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey.h:127:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  127 |                 pkey->pkey.keytype->name = BN_new();                    \
      |                     ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey.h:128:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  128 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey.h:130:25: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  130 |         if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)              \
      |                         ^~
ossl_pkey_dsa.c:435:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  435 | OSSL_PKEY_BN(dsa, p)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_get_q’:
ossl_pkey.h:104:18: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  104 |         bn = pkey->pkey.keytype->name;                                  \
      |                  ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_set_q’:
ossl_pkey.h:120:35: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  120 |                 BN_clear_free(pkey->pkey.keytype->name);                \
      |                                   ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey.h:121:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  121 |                 pkey->pkey.keytype->name = NULL;                        \
      |                     ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey.h:126:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  126 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey.h:127:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  127 |                 pkey->pkey.keytype->name = BN_new();                    \
      |                     ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey.h:128:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  128 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey.h:130:25: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  130 |         if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)              \
      |                         ^~
ossl_pkey_dsa.c:436:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  436 | OSSL_PKEY_BN(dsa, q)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_get_g’:
ossl_pkey.h:104:18: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  104 |         bn = pkey->pkey.keytype->name;                                  \
      |                  ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_set_g’:
ossl_pkey.h:120:35: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  120 |                 BN_clear_free(pkey->pkey.keytype->name);                \
      |                                   ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey.h:121:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  121 |                 pkey->pkey.keytype->name = NULL;                        \
      |                     ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey.h:126:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  126 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey.h:127:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  127 |                 pkey->pkey.keytype->name = BN_new();                    \
      |                     ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey.h:128:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  128 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey.h:130:25: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  130 |         if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)              \
      |                         ^~
ossl_pkey_dsa.c:437:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  437 | OSSL_PKEY_BN(dsa, g)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_get_pub_key’:
ossl_pkey.h:104:18: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  104 |         bn = pkey->pkey.keytype->name;                                  \
      |                  ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_set_pub_key’:
ossl_pkey.h:120:35: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  120 |                 BN_clear_free(pkey->pkey.keytype->name);                \
      |                                   ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:121:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  121 |                 pkey->pkey.keytype->name = NULL;                        \
      |                     ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:126:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  126 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:127:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  127 |                 pkey->pkey.keytype->name = BN_new();                    \
      |                     ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:128:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  128 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:130:25: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  130 |         if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)              \
      |                         ^~
ossl_pkey_dsa.c:438:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  438 | OSSL_PKEY_BN(dsa, pub_key)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_get_priv_key’:
ossl_pkey.h:104:18: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  104 |         bn = pkey->pkey.keytype->name;                                  \
      |                  ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
ossl_pkey_dsa.c: In function ‘ossl_dsa_set_priv_key’:
ossl_pkey.h:120:35: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  120 |                 BN_clear_free(pkey->pkey.keytype->name);                \
      |                                   ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:121:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  121 |                 pkey->pkey.keytype->name = NULL;                        \
      |                     ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:126:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  126 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:127:21: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  127 |                 pkey->pkey.keytype->name = BN_new();                    \
      |                     ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:128:17: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  128 |         if (pkey->pkey.keytype->name == NULL)                           \
      |                 ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
ossl_pkey.h:130:25: error: invalid use of incomplete typedef ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  130 |         if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)              \
      |                         ^~
ossl_pkey_dsa.c:439:1: note: in expansion of macro ‘OSSL_PKEY_BN’
  439 | OSSL_PKEY_BN(dsa, priv_key)
      | ^~~~~~~~~~~~
make[1]: *** [Makefile:197: ossl_pkey_dsa.o] Error 1
make[1]: Leaving directory '/home/postmodern/src/ruby-1.8.7-p374/ext/openssl'
make: *** [Makefile:293: all] Error 1
nirvdrum commented 3 years ago

Thanks for the quick fix. I figured I'd have building issues beyond that, but I can try to sort that out with Docker images for older Linux distributions.