在 Alpine 上构建 Ruby 1.8.7



当我尝试编译Ruby 1.8.7时出现此错误

BUILD FAILED (Alpine Linux 3.8.2 using ruby-build 20181225)
Inspect or clean up the working tree at /tmp/ruby-build.20190128170412.7047
Results logged to /tmp/ruby-build.20190128170412.7047.log
Last 10 log lines:
     return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0));
                                ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ossl_pkcs7.c:11:0:
ossl.h:118:7: note: expected 'struct stack_st_X509_CRL *' but argument is of type 'int *'
 VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
       ^~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:188: ossl_pkcs7.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/ruby-build.20190128170412.7047/ruby-1.8.7/ext/openssl'
make: *** [Makefile:285: all] Error 1

这是我正在使用的 Docker 文件

FROM alpine
ENV RUBY_VERSION "1.8.7"
ENV RUBYBUILD_PACKAGES 
  build-base 
  autoconf 
  git 
  subversion 
  bison 
  zlib-dev 
  openssl-dev 
  yaml-dev 
  readline-dev 
  ncurses-dev 
  libffi-dev 
  gdbm-dev
ENV RUBYLIB_PACKAGES 
  zlib 
  openssl 
  yaml 
  readline 
  ncurses 
  libffi 
  gdbm
ENV EXTRA_PACKAGES 
  ca-certificates 
  bash 
  curl
RUN apk update && 
    apk upgrade && 
    apk add $RUBYBUILD_PACKAGES $RUBYLIB_PACKAGES $EXTRA_PACKAGES && 
    git clone https://github.com/sstephenson/ruby-build.git /tmp/ruby-build
RUN cd /tmp/ruby-build && ./install.sh && cd - && rm -rf /tmp/ruby-build

这是完整的日志

https://gist.github.com/nkhine/0b7f5c162313946ddd2f8d7feb57144a

任何建议都非常感谢

我已经设法用旧版本的openssl(例如1.0.1e)在alpine上构建了Ruby 1.8.7。所以正如@ivan-尤罗夫所说。

最新更新