Psych 5.0.1 fails to install with ruby 3.1.2p20

143 views
Skip to first unread message

Thierry

unread,
Jan 5, 2023, 6:44:00 AM1/5/23
to RubyInstaller
Hi everyone,

I don't know if this is a rubyinstaller problem or a Psych problem.
There is already an open issue on github:

Details for my figure case are below.

There must be a way to compile, since with ruby 3.2, we have the gem installed :

> ruby -v
ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]

> gem update psych
Updating installed gems
Nothing to update
Gems already up-to-date: psych

> ruby -e "require 'psych'; puts Psych::VERSION"
5.0.1

Cheers
-- Thierry

> ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]

> gem update psych
Updating installed gems
Updating psych
Fetching psych-5.0.1.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing psych:
        ERROR: Failed to build gem native extension.

    current directory: c:/ruby-3.1.2-x64/lib/ruby/gems/3.1.0/gems/psych-5.0.1/ext/psych
c:/ruby-3.1.2-x64/bin/ruby.exe -I c:/ruby-3.1.2-x64/lib/ruby/site_ruby/3.1.0 -r ./siteconf20230105-12968-1cia0x.rb extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/ruby-3.1.2-x64/bin/$(RUBY_BASE_NAME)
        --with-libyaml-source-dir
        --without-libyaml-source-dir
        --with-yaml-0.1-dir
        --without-yaml-0.1-dir
        --with-yaml-0.1-include
        --without-yaml-0.1-include=${yaml-0.1-dir}/include
        --with-yaml-0.1-lib
        --without-yaml-0.1-lib=${yaml-0.1-dir}/lib
        --with-yaml-0.1-config
        --without-yaml-0.1-config
        --with-pkg-config
        --without-pkg-config
        --with-libyaml-dir
        --without-libyaml-dir
        --with-libyaml-include
        --without-libyaml-include=${libyaml-dir}/include
        --with-libyaml-lib
        --without-libyaml-lib=${libyaml-dir}/lib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  c:/ruby-3.1.2-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in c:/ruby-3.1.2-x64/lib/ruby/gems/3.1.0/gems/psych-5.0.1 for inspection.
Results logged to c:/ruby-3.1.2-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.1/gem_make.out
Gems updated: psych

Content of
c:/ruby-3.1.2-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.1/mkmf.log

PATH=".;c:/ruby-3.1.2-x64/lib;c:\ruby-3.1.2-x64\bin;c:\msys64\ucrt64\bin;c:\msys64\usr\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Programs;c:\ruby\bin;c:\msys64;C:\python39\Scripts\;C:\python39\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\SAS\SharedFiles\Secure\ccme4;C:\Program Files (x86)\SAS\SharedFiles(32)\Secure\ccme4;C:\Program Files (x86)\SAS\SharedFiles\x86\Secure\ccme4;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Sublime Text;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PowerShell\7\;C:\Users\Thierry\AppData\Local\Microsoft\WindowsApps;C:\Users\Thierry\AppData\Roaming\npm" pkg-config --exists yaml-0.1
package configuration for yaml-0.1 is not found
find_header: checking for yaml.h... -------------------- no

PATH=".;c:/ruby-3.1.2-x64/lib;c:\ruby-3.1.2-x64\bin;c:\msys64\ucrt64\bin;c:\msys64\usr\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Programs;c:\ruby\bin;c:\msys64;C:\python39\Scripts\;C:\python39\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\SAS\SharedFiles\Secure\ccme4;C:\Program Files (x86)\SAS\SharedFiles(32)\Secure\ccme4;C:\Program Files (x86)\SAS\SharedFiles\x86\Secure\ccme4;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Sublime Text;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PowerShell\7\;C:\Users\Thierry\AppData\Local\Microsoft\WindowsApps;C:\Users\Thierry\AppData\Roaming\npm" "gcc -o conftest.exe -Ic:/ruby-3.1.2-x64/include/ruby-3.1.0/x64-mingw-ucrt -Ic:/ruby-3.1.2-x64/include/ruby-3.1.0/ruby/backward -Ic:/ruby-3.1.2-x64/include/ruby-3.1.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -DYAML_DECLARE_STATIC -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -Lc:/ruby-3.1.2-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby310  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return !!argv[argc];
8: }
/* end */

PATH=".;c:/ruby-3.1.2-x64/lib;c:\ruby-3.1.2-x64\bin;c:\msys64\ucrt64\bin;c:\msys64\usr\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Programs;c:\ruby\bin;c:\msys64;C:\python39\Scripts\;C:\python39\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\SAS\SharedFiles\Secure\ccme4;C:\Program Files (x86)\SAS\SharedFiles(32)\Secure\ccme4;C:\Program Files (x86)\SAS\SharedFiles\x86\Secure\ccme4;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Sublime Text;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PowerShell\7\;C:\Users\Thierry\AppData\Local\Microsoft\WindowsApps;C:\Users\Thierry\AppData\Roaming\npm" "gcc -Ic:/ruby-3.1.2-x64/include/ruby-3.1.0/x64-mingw-ucrt -Ic:/ruby-3.1.2-x64/include/ruby-3.1.0/ruby/backward -Ic:/ruby-3.1.2-x64/include/ruby-3.1.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -DYAML_DECLARE_STATIC -O3 -fno-fast-math -fstack-protector-strong -m64  -c conftest.c"
conftest.c:5:10: fatal error: yaml.h: No such file or directory
    5 | #include <yaml.h>
      |          ^~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <yaml.h>
/* end */

--------------------


Thierry

unread,
Jan 6, 2023, 5:12:04 AM1/6/23
to RubyInstaller
Found the answer: you need to
pacman -S mingw-w64-ucrt-x86_64-libyaml
first

Dc general

unread,
Sep 5, 2023, 7:50:49 AM9/5/23
to RubyInstaller
sorry i was not able to install rubby
Reply all
Reply to author
Forward
0 new messages