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

Cannot install on Windows #14

Open
gerggggggg opened this issue Oct 22, 2012 · 8 comments
Open

Cannot install on Windows #14

gerggggggg opened this issue Oct 22, 2012 · 8 comments

Comments

@gerggggggg
Copy link

Sorry if this is completely not supported, but we have a rails project (Ruby 1.8.7, Rails 3.2.8) that uses gpgme for signature verification. The production environment is Linux, but we have some developers working on Windows.

Is this gem even supported on Windows?
If so, what are the installation instructions?

My environment:
Windows 7 Pro 64-bit
ruby 1.8.7 (2012-06-29 patchlevel 370) [i386-mingw32]

C:>gem install gpgme
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing gpgme:
ERROR: Failed to build gem native extension.

C:/Ruby187/bin/ruby.exe extconf.rb
-- tar xjvf C:/Ruby187/lib/ruby/gems/1.8/gems/gpgme-2.0.1/ext/gpgme/libgpg-error-1.10.tar.bz2
*** 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:/Ruby187/bin/ruby
extconf.rb:11:in sys': tar xjvf C:/Ruby187/lib/ruby/gems/1.8/gems/gpgme-2.0.1/ext/gpgme/libgpg-error-1.10.tar.bz2 failed! (RuntimeError) from extconf.rb:18:inbuild'
from extconf.rb:33

Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/gpgme-2.0.1 for inspection.
Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/gpgme-2.0.1/ext/gpgme/gem_make.out

@gobins
Copy link

gobins commented Sep 10, 2014

Hi, I'm stuck with the same issue. Did you get this solved for windows?

@gerggggggg
Copy link
Author

Nope, never got resolved. We've since upgraded to ruby 2 and rails 4 which I couldn't get to install properly on windows. I gave up and just installed Vitual Bix and an Ubuntu VM and I'm much happier now.

@ueno
Copy link
Owner

ueno commented Sep 12, 2014

Perhaps we could adopt rake-compiler and generate native gems for Windows. If anyone is willing to work on the port, I'd appreciate it.

@andrewcng
Copy link

Hi, I also have the same problem. I'm running Ruby 1.9.3 and Windows Server 2008 R2

@jhg03a
Copy link

jhg03a commented May 5, 2016

Having dug into things a bit with #81, the libgpg-error upstream code doesn't appear to take windows as a consideration. I'm not sure where the responsibility would go, but if you look around the internet a bit getting gpgme to work under windows natively appears to be non-trivial. Even this package's development build process makes assumptions like gpgme-config existing (which it doesn't under windows).

@c33s
Copy link

c33s commented Jun 6, 2021

has anybody found a solution?

@Zastai
Copy link

Zastai commented Nov 11, 2021

The issue seems to be that the sys/wait.h header is needed (by spawn-posix.c). But while MSYS2 has this header, MINGW64 does not, and Ruby seems to use MINGW64. So I guess it is an upstream portability issue.

@Danielku15
Copy link

I needed to setup a Ruby development environment on my machine to fix a bug in dependabot that was bothering me when I ran into this issue. I was able to solve the issue for me with following steps:

  1. Uninstall the 64bit version of Ruby and use 32bit one.
  2. Launch the msys2 shell ("C:\Ruby31\msys32\msys2.exe")
  3. install the required headers and libs using pacman -S msys2-runtime-devel
  4. Retry to install gpgme.

For me it's not a big deal to use the 32bit version. On the 64bit version I couldn't get it running. Somehow the include paths were not correctly setup or msys2-runtime-devel is even 32bit only? Maybe for some people this is a workaround.

Sidenote: Got compilation errors on stackprof after that 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants