Bug #17782
closedCan not compile Ruby trunk with openssl 1.1.1k
Description
Following latest openssl upstream (maybe b91f62f) I can no longer compile Ruby trunk against 1.1.1k
In file included from ossl.h:155,
from ossl_hmac.c:10:
ossl_hmac.c: In function 'ossl_hmac_reset':
openssl_missing.h:58:37: error: invalid use of incomplete typedef 'EVP_MD_CTX' {aka 'struct evp_md_ctx_st'}
58 | # define EVP_MD_CTX_pkey_ctx(x) (x)->pctx
| ^~
ossl_hmac.c:241:35: note: in expansion of macro 'EVP_MD_CTX_pkey_ctx'
241 | pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_pkey_ctx(ctx));
| ^~~~~~~~~~~~~~~~~~~
ossl_hmac.c: At top level:
Updated by xtkoba (Tee KOBAYASHI) about 3 years ago
I cannot reproduce this on my x86_64-linux environment.
The function EVP_MD_CTX_pkey_ctx
is defined at ${prefix}/include/openssl/evp.h:460 and so the definition at openssl_missing.h:58
should not be used (HAVE_EVP_MD_CTX_PKEY_CTX
should be defined as 1
). I guess that the header files of OpenSSL are not installed correctly in your environment and/or extconf.rb
is not working correctly.
Updated by sam.saffron (Sam Saffron) about 3 years ago
Thanks @xtkoba (Tee KOBAYASHI), let me see if I can make a Dockerfile here to reproduce the issue.
3.0.1 tag installs fine on my system.
Updated by xtkoba (Tee KOBAYASHI) about 3 years ago
So this issue is irrelevant of OpenSSL upstream being updated, right?
And is related to commit b91f62f3840582bb3e4fbece15654e1d852c829b I suppose, although I don't know how.
Updated by sam.saffron (Sam Saffron) about 3 years ago
let's close this, looks like an operator error ... unable to reproduce in a clean docker container. I suspect it was just me needing a new run of autoconf.
from arch
ENV HOME=/root
ENV LANG=en_US.UTF-8
RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \
locale-gen
RUN pacman -Syu --noconfirm
RUN pacman -Sy vim curl git ruby --noconfirm && \
pacman -S --needed base-devel libffi libyaml openssl zlib --noconfirm
RUN mkdir /src && cd /src && git clone https://github.com/ruby/ruby.git
RUN pacman -Sy automake gdbm openssl libyaml gmp zlib rubygems ruby-irb --noconfirm
RUN cd /src/ruby && automake --add-missing || echo "ignore - used to get config.guess / sub"
RUN cd /src/ruby && autoconf && ./configure
RUN cd /src/ruby && make
Updated by xtkoba (Tee KOBAYASHI) about 3 years ago
Don't mind. It is not uncommon that make clean
followed by source/builddep/etc updates leads to failure of a subsequent build.
Updated by mame (Yusuke Endoh) about 3 years ago
- Status changed from Open to Closed
Closing as per OP's request. Thanks