puma / puma

A Ruby/Rack web server built for parallelism

Home Page:https://puma.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fail to build Puma 5.6.4 on OpenBSD 7.1

joyboy67 opened this issue · comments

Describe the bug

Hello I have some problem to build puma with bundler (2.3.13)

I runned doas rails31 new . --database=mysql ->

Installing puma 5.6.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/3.1/gems/puma-5.6.4/ext/puma_http11
/usr/local/bin/ruby31 -I /usr/local/lib/ruby/site_ruby/3.1 -r
./siteconf20220509-54272-yqd0zi.rb extconf.rb
using OpenSSL pkgconfig (openssl.pc)
checking for openssl/bio.h... yes
checking for DTLS_method() in openssl/ssl.h... yes
checking for TLS_server_method() in openssl/ssl.h... yes
checking for SSL_CTX_set_min_proto_version(NULL, 0) in openssl/ssl.h... yes
checking for X509_STORE_up_ref()... yes
checking for SSL_CTX_set_ecdh_auto(NULL, 0) in openssl/ssl.h... yes
checking for SSL_get1_peer_certificate() in openssl/ssl.h... no
checking for Random.bytes... yes
creating Makefile

current directory: /usr/local/lib/ruby/gems/3.1/gems/puma-5.6.4/ext/puma_http11
make DESTDIR\= clean

current directory: /usr/local/lib/ruby/gems/3.1/gems/puma-5.6.4/ext/puma_http11
make DESTDIR\=
compiling http11_parser.c
compiling mini_ssl.c
mini_ssl.c:102:5: error: incomplete definition of type 'struct dh_st'
  dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
  ~~^
/usr/include/openssl/ossl_typ.h:116:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:103:5: error: incomplete definition of type 'struct dh_st'
  dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
  ~~^
/usr/include/openssl/ossl_typ.h:116:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:105:10: error: incomplete definition of type 'struct dh_st'
  if ((dh->p == NULL) || (dh->g == NULL)) {
       ~~^
/usr/include/openssl/ossl_typ.h:116:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:105:29: error: incomplete definition of type 'struct dh_st'
  if ((dh->p == NULL) || (dh->g == NULL)) {
                          ~~^
/usr/include/openssl/ossl_typ.h:116:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
4 errors generated.
*** Error 1 in /usr/local/lib/ruby/gems/3.1/gems/puma-5.6.4/ext/puma_http11 (Makefile:246
'mini_ssl.o': @ cc -I. -I/usr/local/include/ruby-3...)

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/3.1/gems/puma-5.6.4 for
inspection.
Results logged to
/usr/local/lib/ruby/gems/3.1/extensions/x86_64-openbsd/3.1/puma-5.6.4/gem_make.out

  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:95:in `run'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:44:in `block in make'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:36:in `each'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:36:in `make'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
  /usr/local/lib/ruby/3.1/tempfile.rb:317:in `open'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/ext_conf_builder.rb:26:in `build'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:164:in `build_extension'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:198:in `block in build_extensions'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:195:in `each'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/ext/builder.rb:195:in `build_extensions'
  /usr/local/lib/ruby/site_ruby/3.1/rubygems/installer.rb:851:in `build_extensions'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/source/rubygems.rb:204:in
`install'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
  /usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/worker.rb:62:in `apply_func'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/worker.rb:57:in `block in
process_queue'
  /usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/worker.rb:54:in `loop'
  /usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/worker.rb:54:in `process_queue'
/usr/local/lib/ruby/gems/3.1/gems/bundler-2.3.13/lib/bundler/worker.rb:91:in `block (2
levels) in create_threads'

An error occurred while installing puma (5.6.4), and Bundler cannot continue.

Bundler env ->

Bundler       2.3.13
  Platforms   ruby, x86_64-openbsd
Ruby          3.1.2p20 (2022-04-12 revision 4491bb740a9506d76391ac44bb2fe6e483fec952) [x86_64-openbsd]
  Full Path   /usr/local/bin/ruby31
  Config Dir  /etc
RubyGems      3.3.13
  Gem Home    /usr/local/lib/ruby/gems/3.1
  Gem Path    /home/pc/.local/share/gem/ruby/3.1:/usr/local/lib/ruby/gems/3.1
  User Home   /home/pc
  User Path   /home/pc/.local/share/gem/ruby/3.1
  Bin Dir     /usr/local/bin
Tools         
  Git         2.35.1
  RVM         not installed
  rbenv       not installed
  chruby      not installed

## Bundler Build Metadata

Built At          2022-05-04
Git SHA           b20be5a433
Released Version  true

## Bundler settings

build.puma
  Set for the current user (/home/pc/.bundle/config): "--with-cflags=-Wno-error=implicit-function-declaration"

Desktop (please complete the following information):

  • OS: OpenBSD 7.1 amd64
  • Puma Version 5.6.4
  • Ruby 3.1

Sounds like a duplicate of #2863, can you try the master branch?

Sounds like a duplicate of #2863, can you try the master branch?

Thank you @dentarg I specified to use the master branch in the Gemfile, now it's working