Project

General

Profile

Actions

Bug #20733

open

Build failure OpenSSL extension with FreeBSD 13.3

Added by hsbt (Hiroshi SHIBATA) about 1 month ago. Updated 11 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:119159]

Description

FreeBSD 13.3 build on Ruby CI was failure from 1 week ago. I manually build ruby master on FreeBSD 13 and got the following error.

[hsbt@freebsd /usr/home/hsbt/ruby]$ make
        BASERUBY = /usr/local/bin/ruby --disable=gems
        CC = clang
        LD = ld
        LDSHARED = clang -shared
        CFLAGS = -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef
        XCFLAGS = -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/amd64-freebsd13.3 -I./include -I. -I./prism -I./enc/unicode/15.0.0 -I/usr/local/include
        CPPFLAGS =
        DLDFLAGS = -Wl,--compress-debug-sections=zlib -L/usr/local/lib  -Wl,-rpath,/usr/local/lib -Wl,-soname,showflags -fstack-protector-strong -pie
        SOLIBS = -lunwind -lexecinfo -lprocstat -lz -lrt -lrt -lgmp -ldl -lcrypt -lm -lthr
        LANG = C.UTF-8
        LC_ALL =
        LC_CTYPE =
        MFLAGS =
        RUSTC = rustc
        YJIT_RUSTC_ARGS = --crate-name=yjit  --crate-type=staticlib  --edition=2021  -g  -C lto=thin  -C opt-level=3  -C overflow-checks=on  '--out-dir=/usr/home/hsbt/ruby/yjit/target/release/'  ./yjit/src/lib.rs
FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367)
Target: x86_64-unknown-freebsd13.3
Thread model: posix
InstalledDir: /usr/bin
generating encdb.h
encdb.h unchanged
generating enc.mk
making srcs under enc
generating transdb.h
transdb.h unchanged
generating makefiles ext/configure-ext.mk
ext/configure-ext.mk unchanged
installing default coverage libraries
installing default date_core libraries
installing digest libraries
installing default digest libraries
installing default sha2 libraries
installing default console libraries
installing default libraries
installing default monitor libraries
installing default objspace libraries
compiling ossl_digest.c
ossl_digest.c:66:14: warning: call to undeclared function 'EVP_MD_CTX_get0_md'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   66 |         md = EVP_MD_CTX_get0_md(ctx);
      |              ^
ossl_digest.c:66:12: error: incompatible integer to pointer conversion assigning to 'const EVP_MD *' (aka 'const struct evp_md_st *') from 'int' [-Wint-conversion]
   66 |         md = EVP_MD_CTX_get0_md(ctx);
      |            ^ ~~~~~~~~~~~~~~~~~~~~~~~
ossl_digest.c:206:32: warning: call to undeclared function 'EVP_MD_CTX_get0_md'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  206 |     if (EVP_DigestInit_ex(ctx, EVP_MD_CTX_get0_md(ctx), NULL) != 1) {
      |                                ^
ossl_digest.c:206:32: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const EVP_MD *' (aka 'const struct evp_md_st *') [-Wint-conversion]
  206 |     if (EVP_DigestInit_ex(ctx, EVP_MD_CTX_get0_md(ctx), NULL) != 1) {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/evp.h:550:61: note: passing argument to parameter 'type' here
  550 | __owur int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type,
      |                                                             ^
ossl_digest.c:290:40: warning: call to undeclared function 'EVP_MD_CTX_get0_md'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  290 |     return rb_str_new_cstr(EVP_MD_name(EVP_MD_CTX_get0_md(ctx)));
      |                                        ^
ossl_digest.c:290:40: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const EVP_MD *' (aka 'const struct evp_md_st *') [-Wint-conversion]
  290 |     return rb_str_new_cstr(EVP_MD_name(EVP_MD_CTX_get0_md(ctx)));
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/evp.h:447:64: note: expanded from macro 'EVP_MD_name'
  447 | # define EVP_MD_name(e)                  OBJ_nid2sn(EVP_MD_nid(e))
      |                                                                ^
/usr/include/openssl/evp.h:446:54: note: expanded from macro 'EVP_MD_nid'
  446 | # define EVP_MD_nid(e)                   EVP_MD_type(e)
      |                                                      ^
../.././include/ruby/internal/intern/string.h:1515:25: note: expanded from macro 'rb_str_new_cstr'
 1515 |     ((RBIMPL_CONSTANT_P(str) ?                  \
      |                         ^~~
../.././include/ruby/internal/constant_p.h:33:55: note: expanded from macro 'RBIMPL_CONSTANT_P'
   33 | # define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
      |                                                       ^~~~
/usr/include/openssl/evp.h:445:31: note: passing argument to parameter 'md' here
  445 | int EVP_MD_type(const EVP_MD *md);
      |                               ^
ossl_digest.c:290:40: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const EVP_MD *' (aka 'const struct evp_md_st *') [-Wint-conversion]
  290 |     return rb_str_new_cstr(EVP_MD_name(EVP_MD_CTX_get0_md(ctx)));
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/evp.h:447:64: note: expanded from macro 'EVP_MD_name'
  447 | # define EVP_MD_name(e)                  OBJ_nid2sn(EVP_MD_nid(e))
      |                                                                ^
/usr/include/openssl/evp.h:446:54: note: expanded from macro 'EVP_MD_nid'
  446 | # define EVP_MD_nid(e)                   EVP_MD_type(e)
      |                                                      ^
../.././include/ruby/internal/intern/string.h:1517:25: note: expanded from macro 'rb_str_new_cstr'
 1517 |       rb_str_new_cstr) (str))
      |                         ^~~
/usr/include/openssl/evp.h:445:31: note: passing argument to parameter 'md' here
  445 | int EVP_MD_type(const EVP_MD *md);
      |                               ^
3 warnings and 4 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/hsbt/ruby/ext/openssl
*** Error code 1

Stop.
make[1]: stopped in /usr/home/hsbt/ruby
*** Error code 1

Stop.
make: stopped in /usr/home/hsbt/ruby

Updated by hsbt (Hiroshi SHIBATA) 30 days ago

  • Subject changed from Build failure with FreeBSD 13.3 to Build failure OpenSSL extension with FreeBSD 13.3

I could build openssl extension with --with-opt-dir=/usr/local.

FreeBSD 13.3 build on Ruby CI was failure from 1 week ago.

The above issue is different with openssl. It's fixed at https://github.com/ruby/ruby/commit/dc8c382266b056fa51408806478218f5230fbce2

Updated by jaruga (Jun Aruga) 26 days ago

It's good to know that the build failure was fixed. Can we close this issue ticket now?

Updated by hsbt (Hiroshi SHIBATA) 11 days ago

Can we close this issue ticket now?

I'm wondering why Ruby couldn't build with system openssl(1.1.1w) at FreeBSD 13?

ruby/openssl have CI for openssl-1.1.1w. It seems working fine.

https://github.com/ruby/openssl/actions/runs/11194355042/job/31120732384

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0