title: x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
body: <p>I'm trying to install <code>jekyll</code> following <a href="https://jekyllrb.com/docs/windows/" rel="nofollow noreferrer">Jekyll in Windows</a> via Choco, but fails during <code>gem install jekyll</code></p>
  
  <p>Full output:</p>
  
  <pre><code>C:\Users\WILLNODE&gt;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
  </code></pre>
  
  <p>Following with <a href="https://stackoverflow.com/a/21647591/3908409">this answer</a> I run
  <code>ld -lgmp --verbose</code></p>
  
  <pre><code>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
  </code></pre>
  
  <p>But then I still clueless why this is happening.</p>
  
  <p>Sure there's must be something missing. But what is it?</p>
  
  <p>Extra Information (if necessary): Windows 10 64-bit, Ruby24</p>