Skip to content

OpenSSL extension fails to build on TruffleRuby 24.2.0-dev #3724

Closed
@nirvdrum

Description

@nirvdrum

I'm unable to build TruffleRuby from source on both macOS and Linux due to compilation issue with the OpenSSL extension using OpenSSL 3. The extension will compile with OpenSSL 1.1, but that's difficult to set up on Linux. The truffleruby-dev builds from ruby-build are also impacted, with the extension failing to compile.

This appears to have been broken when the CRuby 3.3 sources were imported.

> jt build
$ unset JAVA_HOME; /home/nirvdrum/dev/workspaces/truffleruby-ws/mx/mx --env jvm-ce scheckimports --ignore-uncommitted --warn-only
$ /home/nirvdrum/dev/workspaces/truffleruby-ws/mx/mx --java-home labsjdk-ce-latest-24+23-jvmci-b01 --env jvm-ce build
                                             WARNING: JVM standalone 'RUBY_JAVA_STANDALONE_JAVA24' misses LibGraal. Make sure that it is part of the main GraalVM distribution
Building org.truffleruby.cext with GNU Make... [rebuild needed by GNU Make]
make[1]: Entering directory '/home/nirvdrum/dev/workspaces/truffleruby-ws/truffleruby/src/main/c/openssl'
compiling ossl.c
compiling ossl_asn1.c
compiling ossl_bio.c
compiling ossl_bn.c
compiling ossl_cipher.c
compiling ossl_config.c
compiling ossl_digest.c
compiling ossl_engine.c
In file included from ossl.h:175,
                 from ossl.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:175,
                 from ossl_bn.c:11:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:175,
                 from ossl_digest.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:175,
                 from ossl_cipher.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:175,
                 from ossl_asn1.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:175,
                 from ossl_bio.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:175,
                 from ossl_engine.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:175,
                 from ossl_config.c:10:
openssl_missing.h:195: error: "TS_VERIFY_CTS_set_certs" redefined [-Werror]
  195 | #  define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
In file included from ossl.h:31:
/home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.4.0/include/openssl/ts.h:439: note: this is the location of the previous definition
  439 | #  define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
      |
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_engine.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_bio.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_config.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_digest.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_cipher.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_asn1.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [Makefile:489: ossl_bn.o] Error 1
make[1]: Leaving directory '/home/nirvdrum/dev/workspaces/truffleruby-ws/truffleruby/src/main/c/openssl'
make: *** [Makefile:96: openssl/openssl.so] Error 2

Building org.truffleruby.cext with GNU Make: Failed due to error: 2
FAILED (pid 1686802 exit 1): /home/nirvdrum/dev/workspaces/truffleruby-ws/mx/mx --java-home labsjdk-ce-latest-24+23-jvmci-b01 --env jvm-ce build

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions