Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install etc failing #22

Closed
enumag opened this issue Mar 25, 2022 · 1 comment
Closed

gem install etc failing #22

enumag opened this issue Mar 25, 2022 · 1 comment

Comments

@enumag
Copy link

enumag commented Mar 25, 2022

C:\WINDOWS\system32>gem install etc
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing etc:
        ERROR: Failed to build gem native extension.

    current directory: C:/Program Files/Ruby31-x64/lib/ruby/gems/3.1.0/gems/etc-1.3.0/ext/etc
C:/Program\ Files/Ruby31-x64/bin/ruby.exe -I C:/Program\ Files/Ruby31-x64/lib/ruby/3.1.0 -r ./siteconf20220325-248-e3vzt4.rb extconf.rb
checking for sys/utsname.h... no
checking for getpwnam() in -lsun... no
checking for uname((struct utsname *)NULL)... no
checking for getlogin()... yes
checking for getpwent()... no
checking for getgrent()... no
checking for sysconf()... no
checking for confstr()... no
checking for fpathconf()... no
checking for struct passwd.pw_gecos in pwd.h... no
checking for struct passwd.pw_change in pwd.h... no
checking for struct passwd.pw_quota in pwd.h... no
checking for struct passwd.pw_age in pwd.h... no
checking for struct passwd.pw_class in pwd.h... no
checking for struct passwd.pw_comment in pwd.h... no
checking for struct passwd.pw_expire in pwd.h... no
checking for struct passwd.pw_passwd in pwd.h... no
checking for struct group.gr_passwd in grp.h... no
*** 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:/Program Files/Ruby31-x64/bin/$(RUBY_BASE_NAME)
        --with-sys-dir
        --without-sys-dir
        --with-sys-include
        --without-sys-include=${sys-dir}/include
        --with-sys-lib
        --without-sys-lib=${sys-dir}/lib
        --with-sun-dir
        --without-sun-dir
        --with-sun-include
        --without-sun-include=${sun-dir}/include
        --with-sun-lib
        --without-sun-lib=${sun-dir}/lib
        --with-sunlib
        --without-sunlib
extconf.rb:47:in ``': No such file or directory - C:/Program Files/Ruby31-x64/bin/ruby.exe C:/Program Files/Ruby31-x64/lib/ruby/gems/3.1.0/gems/etc-1.3.0/ext/etc/mkconstants.rb -o C:/Program Files/Ruby31-x64/lib/ruby/gems/3.1.0/gems/etc-1.3.0/ext/etc/constdefs.h (Errno::ENOENT)
        from extconf.rb:47:in `<main>'

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

  C:/Program Files/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/etc-1.3.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Program Files/Ruby31-x64/lib/ruby/gems/3.1.0/gems/etc-1.3.0 for inspection.
Results logged to C:/Program Files/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/etc-1.3.0/gem_make.out

And here is the mkmf.log.

@nobu
Copy link
Member

nobu commented Jul 12, 2023

Path name with spaces is not supported.

@nobu nobu closed this as completed in 1ab19d5 Jul 12, 2023
matzbot pushed a commit to ruby/ruby that referenced this issue Jul 12, 2023
Fixes ruby/etc#22.
Build failure when the ruby installed directory name contains spaces.

ruby/etc@1ab19d5815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants