简体   繁体   中英

x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp

I'm trying to install jekyll following Jekyll in Windows via Choco, but fails during gem install jekyll

Full output:

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

    current directory: C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
C:/Tools/ruby24/bin/ruby.exe -r ./siteconf20180129-7284-12v8uaa.rb extconf.rb
creating Makefile

current directory: C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean

current directory: C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
generating ruby_http_parser-x64-mingw32.def
compiling ruby_http_parser.c
compiling ryah_http_parser.c
linking shared-object ruby_http_parser.so
c:/tools/devkit2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
make: *** [ruby_http_parser.so] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to C:/Tools/ruby24/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/http_parser.rb-0.6.0/gem_make.out

Following with this answer I run ld -lgmp --verbose

attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib\libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib\libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib\libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib\gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib\gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.a failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.lib failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll failed
attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib\gmp.lib failed
ld: cannot find -lgmp

But then I still clueless why this is happening.

Sure there's must be something missing. But what is it?

Extra Information (if necessary): Windows 10 64-bit, Ruby24

Strangely I ended up installing Ruby version 2.3.x using rubyinstaller.org and it is working wonderfully. It might because I have my DevKit installed improperly (my guess: i'm ridk install and only choose 1).

Anyway I still prefer 2.3 because you just need to download the zipped file to get the DevKit working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM