Skip to content

RVM OpenSSL build fails on Arch Linux #5603

Description

@hron84

I using ruby-2.7.2 as a platform for some legacy applications because this is the oldest version where everything is worked correctly. I have no chance to upgrade the application to the newer ruby.

I reinstalled my Arch Linux computer and I am no longer be able to build OpenSSL package by rvm pkg add openssl which is required for a successful compilation of ruby-2.7.2. (Note: I am aware about the new rvm autolibs rvm_pkg feature, but I only need OpenSSL in this case and it was worked perfectly before the reinstall).

The first error was the missing termio.h header and I provided it from a Debian machine

/* Compatible <termio.h> for old `struct termio' ioctl interface.
   This is obsolete; use the POSIX.1 `struct termios' interface
   defined in <termios.h> instead.  */

#include <termios.h>
#include <sys/ioctl.h>

But the error still fails, now with:

gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include  -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/hron/.rvm/usr/include -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o ui_openssl.o ui_openssl.c
ui_openssl.c: In function ‘noecho_console’:
ui_openssl.c:534:45: error: invalid application of ‘sizeof’ to incomplete type ‘struct termio’
  534 |         memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig));
      |                                             ^
ui_openssl.c:535:16: error: invalid use of undefined type ‘struct termio’
  535 |         tty_new.TTY_FLAGS &= ~ECHO;
      |                ^
ui_openssl.c: In function ‘echo_console’:
ui_openssl.c:556:45: error: invalid application of ‘sizeof’ to incomplete type ‘struct termio’
  556 |         memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig));
      |                                             ^
ui_openssl.c:557:16: error: invalid use of undefined type ‘struct termio’
  557 |         tty_new.TTY_FLAGS |= ECHO;
      |                ^
ui_openssl.c: At top level:
ui_openssl.c:300:19: error: storage size of ‘tty_orig’ isn’t known
  300 | static TTY_STRUCT tty_orig,tty_new;
      |                   ^~~~~~~~
ui_openssl.c:300:28: error: storage size of ‘tty_new’ isn’t known
  300 | static TTY_STRUCT tty_orig,tty_new;
      |                            ^~~~~~~
make[2]: *** [<builtin>: ui_openssl.o] Error 1
make[2]: Leaving directory '/home/hron/.rvm/src/openssl-1.0.1i/crypto/ui'
make[1]: *** [Makefile:91: subdirs] Error 1
make[1]: Leaving directory '/home/hron/.rvm/src/openssl-1.0.1i/crypto'
make: *** [Makefile:278: build_crypto] Error 1

I know you are not OpenSSL guys, but since OpenSSL 1.0.x is not supported anymore (for years). but ruby-2.7.2 does not compile with new OpenSSL libraries, I am honestly do not know where to turn. If you would be very kind to help me out in this situation, I would be very thankful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions