ruby-shadow
ruby-shadow copied to clipboard
extconf.rb fails with ruby 3.2.0preview3 and onwards
For ruby-shadow 2.5.1, $ ruby extconf.rb
with ruby 3.2.0preview3 and onwards fails like:
[mockbuild@6df3d7ad097f49839ba1c83ed9e69826 ruby-shadow-2.5.1]$ ruby extconf.rb
checking for ruby/io.h... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib64
extconf.rb:68:in `<main>': You are missing some of the required functions from either shadow.h on Linux/Solaris, or pwd.h on FreeBSD/MirBSD/NetBSD/OpenBSD/OS X. (RuntimeError)
Note that with ruby3.2.0preview3 p CONFIG['host_os']
returns "$(target_os)"
. This is due to https://github.com/ruby/ruby/commit/ed9d7612172e12f515cb79088efe45267a062276 . In mkmf.rb, CONFIG
is defined as RbConfig::MAKEFILE_CONFIG
and RbConfig::MAKEFILE_CONFIG
is almost same as RbConfig::CONFIG
except that RbConfig::MAKEFILE_CONFIG
uses reference for other variables.