Problem with gems, Windows, C extension

Hi all,

Ruby 1.8.4 (one click)
gems 0.9.0

I’ve got a C extension that I’m trying to install via gems on my Windows
box
called ‘net-proto’. I can build and install the gem locally with no
problem. However, when I try to install it remotely I get this error:

C:\ruby\src>gem install net-proto
Building native extensions. This could take a while…
*** 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
–srcdir=.
–curdir
–ruby=c:/ruby/bin/ruby

ERROR: While executing gem … (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/net-
proto-1.0.1 for inspection.

I definitely have cl in my %PATH% so I’m not sure why it’s not picking
it
up:

C:>cl -v
Microsoft ® 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for
80x86
Copyright © Microsoft Corp 1984-1998. All rights reserved.

There is no mkmf.log and the gem_make.out file is empty. Below is the
gemspec I used to build the gem currently on RubyForge:

require “rubygems”

summary = "The net-proto package provides the getprotobyname(), "
summary += “getprotobynumber() and the getprotoent() methods for Ruby.”

spec = Gem::Specification.new do |gem|
gem.name = “net-proto”
gem.version = “1.0.1”
gem.author = “Daniel J. Berger”
gem.email = “[email protected]
gem.homepage = “http://www.rubyforge.org/projects/sysutils
gem.platform = Gem::Platform::RUBY
gem.summary = summary
gem.description = summary
gem.test_file = “test/tc_netproto.rb”
gem.has_rdoc = true
gem.extra_rdoc_files = [“CHANGES”,“README”]
gem.rubyforge_project = “sysutils”
files = Dir[“doc/"] + Dir["test/”] + Dir["[A-Z]*"]
files.delete_if{ |item| item.include?(“CVS”) }
gem.files = files
end

if $0 == FILE
spec.required_ruby_version = ‘>= 1.8.0’
spec.extensions = [“extconf.rb”]

case RUBY_PLATFORM
when /win32|windows|mingw|cygwin/i
file = ‘lib/net/windows.c’
when /linux/i
file = ‘lib/net/linux.c’
when /sunos|solaris/i
file = ‘lib/net/sunos.c’
else
file = ‘lib/net/generic.c’
end

spec.files += [‘lib/version.h’, file]

Gem.manage_gems
Gem::Builder.new(spec).build
end

Any ideas?

Thanks,

Dan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs