Open BigBlueHat opened 4 years ago
This issue is solved with the latest release.
C:\Users\me>gem install rugged
Fetching rugged-0.99.0.gem
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libssh2
warning: mingw-w64-x86_64-libssh2-1.9.0-1 is up to date -- skipping
Building native extensions. This could take a while...
Successfully installed rugged-0.99.0
1 gem installed
C:\Users\me>ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x64-mingw32]
This is failing on Windows 10 for me and I'm kinda stuck at what to try next. Any help greatly appreciated.
gem install rugged -v `1.0.0` --source `https://rubygems.org/'
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libssh2
warning: mingw-w64-x86_64-libssh2-1.9.0-1 is up to date -- skipping
Building native extensions. This could take a while...
ERROR: Error installing rugged:
ERROR: Failed to build gem native extension.
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0/ext/rugged
C:/tools/ruby27/bin/ruby.exe -I C:/tools/ruby27/lib/ruby/2.7.0 -r ./siteconf20200515-4720-d4efog.rb extconf.rb
checking for make... yes
checking for cmake... yes
-- The C compiler identification is GNU 10.1.0
-- Check for working C compiler: C:/tools/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/tools/msys64/mingw64/bin/gcc.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: C:/tools/msys64/mingw64/bin/pkg-config.exe (found version "0.29.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed
-- Performing Test IS_WALL_SUPPORTED
-- Performing Test IS_WALL_SUPPORTED - Success
-- Performing Test IS_WEXTRA_SUPPORTED
-- Performing Test IS_WEXTRA_SUPPORTED - Success
-- Performing Test IS_WDOCUMENTATION_SUPPORTED
-- Performing Test IS_WDOCUMENTATION_SUPPORTED - Failed
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED - Success
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED - Success
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED - Success
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED - Success
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED - Success
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED - Success
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WINT_CONVERSION_SUPPORTED
-- Performing Test IS_WINT_CONVERSION_SUPPORTED - Success
-- Performing Test IS_WNO_FORMAT_SUPPORTED
-- Performing Test IS_WNO_FORMAT_SUPPORTED - Success
-- Performing Test IS_WNO_FORMAT_SECURITY_SUPPORTED
-- Performing Test IS_WNO_FORMAT_SECURITY_SUPPORTED - Success
-- Looking for futimens
-- Looking for futimens - not found
-- Checking prototype qsort_r for HAVE_QSORT_R_BSD - False
-- Checking prototype qsort_r for HAVE_QSORT_R_GNU - False
-- Looking for qsort_s
-- Looking for qsort_s - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Found OpenSSL: C:/tools/msys64/mingw64/lib/libcrypto.dll.a (found version "1.1.1g")
-- Could NOT find PCRE (missing: PCRE_LIBRARY PCRE_POSIX_LIBRARY PCRE_INCLUDE_DIR)
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for bcopy
-- Looking for bcopy - not found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - not found
-- Looking for _strtoi64
-- Looking for _strtoi64 - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Performing Test IS_WNO_UNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WNO_UNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WNO_IMPLICIT_FALLTHROUGH_SUPPORTED
-- Performing Test IS_WNO_IMPLICIT_FALLTHROUGH_SUPPORTED - Success
-- http-parser version 2 was not found or disabled; using bundled 3rd-party sources.
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED - Success
-- Found ZLIB: C:/tools/msys64/mingw64/lib/libz.dll.a (found version "1.2.11")
-- Checking for module 'libssh2'
-- Found libssh2, version 1.9.0
CMake Error at cmake/Modules/FindPkgLibraries.cmake:17 (MESSAGE):
could not resolve ws2_32
Call Stack (most recent call first):
src/CMakeLists.txt:204 (FIND_PKGLIBRARIES)
-- Configuring incomplete, errors occurred!
See also "C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0/vendor/libgit2/build/CMakeFiles/CMakeOutput.log".
See also "C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0/vendor/libgit2/build/CMakeFiles/CMakeError.log".
-- C:\tools\msys64\usr\bin/make.exe
*** 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:/tools/ruby27/bin/$(RUBY_BASE_NAME)
--with-sha1dc
--without-sha1dc
--use-system-libraries
extconf.rb:23:in `sys': ERROR: 'C:\\tools\\msys64\\usr\\bin/make.exe' failed (RuntimeError)
from extconf.rb:107:in `block (2 levels) in <main>'
from extconf.rb:103:in `chdir'
from extconf.rb:103:in `block in <main>'
from extconf.rb:100:in `chdir'
from extconf.rb:100:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/tools/ruby27/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/rugged-1.0.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0 for inspection.
Results logged to C:/tools/ruby27/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/rugged-1.0.0/gem_make.out
ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
mkmf.log
find_executable: checking for make... -------------------- yes
--------------------
find_executable: checking for cmake... -------------------- yes
--------------------
C:\tools\msys64\usr\bin/make.exe
make: *** No targets specified and no makefile found. Stop.
Try installing mingw-w64-x86_64-pcre and performing the installation again. You can install it with the following command from msys2.
pacman -S mingw-w64-x86_64-pcre
@preetpalS , yep that works. Thanks. I guess it needs to be added to the install/build script?
@preetpalS oops no sorry I was mistaken:
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0/ext/rugged
C:/tools/ruby27/bin/ruby.exe -I C:/tools/ruby27/lib/ruby/2.7.0 -r ./siteconf20200518-10028-1p2h3ut.rb extconf.rb
checking for make... yes
checking for cmake... yes
-- The C compiler identification is GNU 10.1.0
-- Check for working C compiler: C:/tools/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/tools/msys64/mingw64/bin/gcc.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: C:/tools/msys64/mingw64/bin/pkg-config.exe (found version "0.29.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed
-- Performing Test IS_WALL_SUPPORTED
-- Performing Test IS_WALL_SUPPORTED - Success
-- Performing Test IS_WEXTRA_SUPPORTED
-- Performing Test IS_WEXTRA_SUPPORTED - Success
-- Performing Test IS_WDOCUMENTATION_SUPPORTED
-- Performing Test IS_WDOCUMENTATION_SUPPORTED - Failed
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED - Success
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED - Success
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED - Success
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED - Success
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED - Success
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED - Success
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WINT_CONVERSION_SUPPORTED
-- Performing Test IS_WINT_CONVERSION_SUPPORTED - Success
-- Performing Test IS_WNO_FORMAT_SUPPORTED
-- Performing Test IS_WNO_FORMAT_SUPPORTED - Success
-- Performing Test IS_WNO_FORMAT_SECURITY_SUPPORTED
-- Performing Test IS_WNO_FORMAT_SECURITY_SUPPORTED - Success
-- Looking for futimens
-- Looking for futimens - not found
-- Checking prototype qsort_r for HAVE_QSORT_R_BSD - False
-- Checking prototype qsort_r for HAVE_QSORT_R_GNU - False
-- Looking for qsort_s
-- Looking for qsort_s - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Found OpenSSL: C:/tools/msys64/mingw64/lib/libcrypto.dll.a (found version "1.1.1g")
-- Found PCRE: C:/tools/msys64/mingw64/lib/libpcre.dll.a
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for bcopy
-- Looking for bcopy - not found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - not found
-- Looking for _strtoi64
-- Looking for _strtoi64 - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Performing Test IS_WNO_UNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WNO_UNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WNO_IMPLICIT_FALLTHROUGH_SUPPORTED
-- Performing Test IS_WNO_IMPLICIT_FALLTHROUGH_SUPPORTED - Success
-- http-parser version 2 was not found or disabled; using bundled 3rd-party sources.
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED - Success
-- Found ZLIB: C:/tools/msys64/mingw64/lib/libz.dll.a (found version "1.2.11")
-- Checking for module 'libssh2'
-- Found libssh2, version 1.9.0
CMake Error at cmake/Modules/FindPkgLibraries.cmake:17 (MESSAGE):
could not resolve ws2_32
Call Stack (most recent call first):
src/CMakeLists.txt:204 (FIND_PKGLIBRARIES)
-- Configuring incomplete, errors occurred!
See also "C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0/vendor/libgit2/build/CMakeFiles/CMakeOutput.log".
See also "C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/rugged-1.0.0/vendor/libgit2/build/CMakeFiles/CMakeError.log".
-- C:\tools\msys64\usr\bin/make.exe
*** 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:/tools/ruby27/bin/$(RUBY_BASE_NAME)
--with-sha1dc
--without-sha1dc
--use-system-libraries
extconf.rb:23:in `sys': ERROR: 'C:\\tools\\msys64\\usr\\bin/make.exe' failed (RuntimeError)
from extconf.rb:107:in `block (2 levels) in <main>'
from extconf.rb:103:in `chdir'
from extconf.rb:103:in `block in <main>'
from extconf.rb:100:in `chdir'
from extconf.rb:100:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/tools/ruby27/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/rugged-1.0.0/mkmf.log
extconf failed, exit code 1
The error says you are missing a library.
See https://github.com/libgit2/libgit2/issues/5502#issuecomment-624857906. Based on the discussion, there I would recommend the following:
Try running the following command and trying again (I have this package already installed): pacman -S mingw-w64-x86_64-crt-git
If that doesn't work, run the following command and try again (I do not have this library installed): pacman -S msys2-w32api-runtime
Both commands install libraries.
I'm running into this issue also (Windows 10 release 2004, Ruby 2.7.1, x64). I tried installing all three packages (mingw-w64-x86_64-pcre
, mingw-w64-x86_64-crt-git
and msys2-w32api-runtime
) mentioned above, to no avail. See output from console here:
C:\Users\rubin>gem install gollum
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libssh2
warning: mingw-w64-x86_64-libssh2-1.9.0-2 is up to date -- skipping
Building native extensions. This could take a while...
ERROR: Error installing gollum:
ERROR: Failed to build gem native extension.
current directory: C:/Users/rubin/.gem/ruby/2.7.0/gems/rugged-0.99.0/ext/rugged
C:/Program\ Files/Ruby/ruby27/bin/ruby.exe -I C:/Program\ Files/Ruby/ruby27/lib/ruby/2.7.0 -r ./siteconf20200701-16088-1c5npfw.rb extconf.rb
checking for make... yes
checking for cmake... yes
-- The C compiler identification is GNU 10.1.0
-- Check for working C compiler: C:/Program Files/Ruby/ruby27/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/Program Files/Ruby/ruby27/msys64/mingw64/bin/gcc.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: C:/Program Files/Ruby/ruby27/msys64/mingw64/bin/pkg-config.exe (found version "0.29.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed
-- Performing Test IS_WALL_SUPPORTED
-- Performing Test IS_WALL_SUPPORTED - Success
-- Performing Test IS_WEXTRA_SUPPORTED
-- Performing Test IS_WEXTRA_SUPPORTED - Success
-- Performing Test IS_WDOCUMENTATION_SUPPORTED
-- Performing Test IS_WDOCUMENTATION_SUPPORTED - Failed
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED - Success
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED - Success
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED - Success
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED - Success
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED - Success
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED - Success
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WINT_CONVERSION_SUPPORTED
-- Performing Test IS_WINT_CONVERSION_SUPPORTED - Success
-- Performing Test IS_WNO_FORMAT_SUPPORTED
-- Performing Test IS_WNO_FORMAT_SUPPORTED - Success
-- Performing Test IS_WNO_FORMAT_SECURITY_SUPPORTED
-- Performing Test IS_WNO_FORMAT_SECURITY_SUPPORTED - Success
-- Looking for futimens
-- Looking for futimens - not found
-- Checking prototype qsort_r for HAVE_QSORT_R_BSD - False
-- Checking prototype qsort_r for HAVE_QSORT_R_GNU - False
-- Looking for qsort_s
-- Looking for qsort_s - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Found OpenSSL: C:/Program Files/OpenSSL/lib/libcrypto.lib (found version "1.1.1d")
-- Found PCRE: C:/Program Files/Ruby/ruby27/msys64/mingw64/lib/libpcre.dll.a
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for bcopy
-- Looking for bcopy - not found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - not found
-- Looking for _strtoi64
-- Looking for _strtoi64 - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Performing Test IS_WNO_UNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WNO_UNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WNO_IMPLICIT_FALLTHROUGH_SUPPORTED
-- Performing Test IS_WNO_IMPLICIT_FALLTHROUGH_SUPPORTED - Success
-- http-parser version 2 was not found or disabled; using bundled 3rd-party sources.
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED - Success
-- Found ZLIB: C:/Program Files/Ruby/ruby27/msys64/mingw64/lib/libz.dll.a (found version "1.2.11")
-- Checking for module 'libssh2'
-- Found libssh2, version 1.9.0
-- Resolved libraries: C:/Program Files/Ruby/ruby27/msys64/mingw64/lib/libssh2.dll.a
-- Looking for libssh2_userauth_publickey_frommemory in C:/Program Files/Ruby/ruby27/msys64/mingw64/lib/libssh2.dll.a
-- Looking for libssh2_userauth_publickey_frommemory in C:/Program Files/Ruby/ruby27/msys64/mingw64/lib/libssh2.dll.a - found
-- Could NOT find GSSAPI (missing: GSSAPI_LIBRARIES GSSAPI_INCLUDE_DIR)
-- Enabled features:
* nanoseconds, whether to use sub-second file mtimes and ctimes
* tracing, tracing support
* threadsafe, threadsafe support
* HTTPS, using WinHTTP
* SHA, using CollisionDetection
* regex, using bundled PCRE
* http-parser, http-parser support (bundled)
* zlib, using system zlib
* SSH, SSH transport support
-- Disabled features:
* debugpool, debug pool allocator
* ntlmclient, NTLM authentication support for Unix
* SPNEGO, SPNEGO authentication support
* iconv, iconv encoding conversion support
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/rubin/.gem/ruby/2.7.0/gems/rugged-0.99.0/vendor/libgit2/build
-- C:\Program Files\Ruby\ruby27\msys64\usr\bin/make.exe
*** 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/Ruby/ruby27/bin/$(RUBY_BASE_NAME)
--with-sha1dc
--without-sha1dc
--use-system-libraries
extconf.rb:23:in `sys': ERROR: 'C:\\Program Files\\Ruby\\ruby27\\msys64\\usr\\bin/make.exe' failed (RuntimeError)
from extconf.rb:107:in `block (2 levels) in <main>'
from extconf.rb:103:in `chdir'
from extconf.rb:103:in `block in <main>'
from extconf.rb:100:in `chdir'
from extconf.rb:100:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Users/rubin/.gem/ruby/2.7.0/extensions/x64-mingw32/2.7.0/rugged-0.99.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Users/rubin/.gem/ruby/2.7.0/gems/rugged-0.99.0 for inspection.
Results logged to C:/Users/rubin/.gem/ruby/2.7.0/extensions/x64-mingw32/2.7.0/rugged-0.99.0/gem_make.out
The mkmf.log contains only this:
find_executable: checking for make... -------------------- yes
--------------------
find_executable: checking for cmake... -------------------- yes
--------------------
"C:\Program Files\Ruby\ruby27\msys64\usr\bin/make.exe"
When I go to the build directory of libgit2 in the vendor directory of the package and try to run make
on the cmake-generated Makefile, I get this:
rubin@ADAM MSYS /c/Users/rubin/.gem/ruby/2.7.0/gems/rugged-0.99.0/vendor/libgit2/build
$ make
Scanning dependencies of target http-parser
[ 0%] Building C object deps/http-parser/CMakeFiles/http-parser.dir/http_parser.c.obj
make[2]: *** [deps/http-parser/CMakeFiles/http-parser.dir/build.make:83: deps/http-parser/CMakeFiles/http-parser.dir/http_parser.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:261: deps/http-parser/CMakeFiles/http-parser.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
Any pointers appreciated. Note: Tested with Rugged 0.99, 1.0.0 and 1.0.1.
@rubin55 Are your msys2 dependencies up to date? Have you run pacman -Syu
recently (you might have to run it twice, since it will require a restart if it updates the core libraries). It seems like you the latest packages though because of your compiler version.
Yes, latest version, all packages updated.
I'm also trying to just install the mingw-w64-x86_64-crt-git
package, and I verified I have a libws2_32.a
in /mingw64/x86_64-w64-mingw32/lib
. I'm doing:
ridk exec pacman -S mingw-w64-x86_64-crt-git
gem install rugged -- -DCMAKE_LIBRARY_PATH=/mingw64/x86_64-w64-mingw32/lib
And I still get:
CMake Error at cmake/Modules/FindPkgLibraries.cmake:17 (MESSAGE):
could not resolve ws2_32
I was able to install rugged by making it use the libgit2 library provided by mingw64 (you need to upgrade packages first due to libgit needing to be at least version 1.0.0):
ridk exec pacman -Syu (ctrl-c when told to exit)
ridk exec pacman -Syu
ridk exec pacman -S mingw-w64-x86_64-libgit2
gem install rugged -- --use-system-libraries
This results in a succesfully installed gem, but trying to use it, I get this:
C:\Users\rubin>irb
irb(main):001:0> require 'rugged'
Traceback (most recent call last):
11: from C:/ProgramData/RUBY26/bin/irb.cmd:31:in `<main>'
10: from C:/ProgramData/RUBY26/bin/irb.cmd:31:in `load'
9: from C:/PROGRA~1/RUBY/RUBY26/lib/ruby/gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `<top (required)>'
8: from (irb):1
7: from C:/PROGRA~1/RUBY/RUBY26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
6: from C:/PROGRA~1/RUBY/RUBY26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
5: from C:/PROGRA~1/RUBY/RUBY26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
4: from C:/Users/rubin/.gem/ruby/2.6.0/gems/rugged-0.99.0/lib/rugged.rb:6:in `<top (required)>'
3: from C:/Users/rubin/.gem/ruby/2.6.0/gems/rugged-0.99.0/lib/rugged.rb:10:in `rescue in <top (required)>'
2: from C:/PROGRA~1/RUBY/RUBY26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
1: from C:/PROGRA~1/RUBY/RUBY26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
LoadError (126: The specified module could not be found. - C:/Users/rubin/.gem/ruby/2.6.0/gems/rugged-0.99.0/lib/rugged/rugged.so)
The file rugged.so
does exist at the aforementioned location; I am supposing it can't find the libgit2 library because of the --use-system-libraries
. How do I fix that?
CMake Error at cmake/Modules/FindPkgLibraries.cmake:17 (MESSAGE): could not resolve ws2_32
It seems that something breaks when building libgit2 with CMake 3.17 or newer in a msys2 environment. Downgrading CMake to 3.16.8 (from https://cmake.org/download/) makes rugged able to build libgit2 and install successfully here.
It seems that something breaks when building libgit2 with CMake 3.17 or newer in a msys2 environment. Downgrading CMake to 3.16.8 makes rugged able to build libgit2 and install successfully here.
I just downgraded to Cmake 3.16.5 (I could not find a package for Cmake 3.16.8 on the MingW mirrors) and I'm getting the exact same error (after running gem install rugged -v 0.99
).
I never had any issues with CMake 3.17, but I might not be using the same version of CMake as you are. I am using mingw-w64-x86_64-cmake 3.17.3-1
from the default source for packages (I never configured any mirrors). I attached a list of all the packages I have installed in msys2 below in case it may help. FWIW I was able to install the rugged gem without any issues with these packages.
Seems the
pgroup
error--which was fixed recently in #791--is back... 😢Key line below is: