Compiling ruby from source on windows

Hi to all,
I'm trying to compile ruby on my windows 7. I have already a ruby version installed (ruby 1.9.2p180).

I download the source from github:

1) Executed win32\configure.bat --> OK
2) launch nmake and this is the result:

compiling ./enc/trans/big5.c
big5.c
c1 : fatal error C1083: Cannot open source file: './enc/trans/big5.c': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.EXE"' : return code '0x2
'
Stop.

Searching in internet I found that this error is related from the absence of an installed version of ruby, but I have one ?!?

Can somebody help me?

thanks
Gianluca

you already have visual studio installed?
Regardless, I would suggest using MinGW plus the ruby recipes that the
rubyinstaller guys use...

···

--
Posted via http://www.ruby-forum.com/.

Why do you want to compile Ruby on Windows, when you can just download
windows installer. If you really want to compile something, do it on
Linux :slight_smile:

Take care

···

--
Posted via http://www.ruby-forum.com/.

Searching for a prebuilt visual studio SDK - or - building ruby with
visual studio. Any place I saw on the web:
  - There was 1.9.0 sdk. It worked with visual c++ 6.0
  - If you want to use mingw you're absolutely welcome, we have such
good SDKs and tools for you :slight_smile:
  - Oh visual studio? Plz get the .... out.
  - Building in visual studio? There is of course no official document
other than configure, nmake, nmake install.
  - Ruby forum? It may be done, but use mingw instead. Visual studio
support is provided, but its a *little* tricky.
    - Again, mingw is the *preferred* way :slight_smile:
    - A good responce: Have you installed visual studio? I guess not.
  - Other places:
    - Spectacular blog: http://apocryph.org/archives/401
    - Nothing different

I finally compiled and built my own SDK for visual studio. But of
course, I did it after I did what I had to do, and just because of my
own interests.
I guess this is one of those situations where I should choose between
developing upon an source project and building something from scratch in
VS. VS is my #1 choice in projects concerning windows, and since I
correctly think of it as the #1 tool in windows software development, I
am correct to assume that ruby is somehow f**king with Microsoft. Well,
its not M company or Ruby project that's suffering. Its me, the
developer.
Well, if all open source forums were linked to each other, I would have
liked to share this post with some other open source projects too.

···

--
Posted via http://www.ruby-forum.com/.

Why do we need Visual Studios if we got Ruby? Is it a compiler issue? Will
the aforementioned method compile to .exe and .dlls (if need be)?

···

On Fri, Sep 14, 2012 at 1:08 PM, Roger Pack <lists@ruby-forum.com> wrote:

you already have visual studio installed?
Regardless, I would suggest using MinGW plus the ruby recipes that the
rubyinstaller guys use...

--
Posted via http://www.ruby-forum.com/\.

Hi,
I have VS installed but the problem seems related to the generation of code with an installed version of ruby (that I have ...)

bye
Gianluca

···

________________________________
Da: Nathan Ahmed <elihu5991@gmail.com>
A: ruby-talk ML <ruby-talk@ruby-lang.org>
Inviato: Venerdì 14 Settembre 2012 16:58
Oggetto: Re: Compiling ruby from source on windows

Why do we need Visual Studios if we got Ruby? Is it a compiler issue? Will the aforementioned method compile to .exe and .dlls (if need be)?

On Fri, Sep 14, 2012 at 1:08 PM, Roger Pack <lists@ruby-forum.com> wrote:

you already have visual studio installed?

Regardless, I would suggest using MinGW plus the ruby recipes that the
rubyinstaller guys use...

--
Posted via http://www.ruby-forum.com/\.

Gianluca, Ruby doesn't build with VS (that I know of). You'll have to
install a version of Ruby from http://rubyinstaller.org/ and then
clone the repository at GitHub - oneclick/rubyinstaller: RubyInstaller for Windows - Build recipes and
follow its directions.

···

On Mon, Sep 17, 2012 at 2:04 AM, GPad <peterpan105105@yahoo.it> wrote:

Hi,
I have VS installed but the problem seems related to the generation of code
with an installed version of ruby (that I have ...)

Eric Christopherson wrote in post #1076323:

Hi,
I have VS installed but the problem seems related to the generation of code
with an installed version of ruby (that I have ...)

Gianluca, Ruby doesn't build with VS (that I know of). You'll have to
install a version of Ruby from http://rubyinstaller.org/ and then
clone the repository at GitHub - oneclick/rubyinstaller: RubyInstaller for Windows - Build recipes and
follow its directions.

While you can build part of the core of ruby with VS (I do it with
WinSDK 7.1 on Win7 32bit), one of the main issues is the dependency
libraries and keeping everything using the same msvcrt version. I know
of one person who creatively solves this puzzle; his solution is
documented in our RubyInstaller ML.

That said, it's so much easier to either download one of our pre-built
installers, or build from source by cloning our repo.

We make it almost trivial to build a full ruby from source with our
build recipes. The recipes download everything the build needs into a
sandbox and builds with an internal (selectable) mingw/mingw-w64 based
toolchain.

We even give you the capability to easily build tweaked versions. For
example, say you've cloned our repo to `C:\projects\rubyinstaller` and
you've cloned the ruby repo to `C:\projects\ruby-core` and you want to
build `trunk` using the recently announced 32bit TDM/MinGW 4.7.1
toolchain (we call 'em
DevKit's!).

One way to build is:

  cd c:\projects\rubyinstaller
  rake ruby19 local=c:\projects\ruby-core dkver=tdm-32-4.7.1

That's not so hard is it?

Once the build finishes you can test it all, grab the built artifacts
from the sandbox or tell the recipes to bundle everything up into a
convenient archive, and more.

We even have nice Jenkins-based CI server and goodies at
http://ci.rubyinstaller.org/

So, if you want to build Ruby for Windows on Windows (with or without
tweaks), we make it easy to do. You don't need to cross-compile from
Linux, even though you can if you'd like.

This should be enough to get you started. If it's not, swing by our ML
at

https://groups.google.com/forum/?fromgroups#!forum/rubyinstaller

and Luis, myself, or one of the other awesome RubyInstaller contributors
will try to help you out.

Jon

···

On Mon, Sep 17, 2012 at 2:04 AM, GPad <peterpan105105@yahoo.it> wrote:

---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums

--
Posted via http://www.ruby-forum.com/\.

Gianluca, Ruby doesn't build with VS (that I know of). You'll have to
install a version of Ruby from http://rubyinstaller.org/ and then
clone the repository at GitHub - oneclick/rubyinstaller: RubyInstaller for Windows - Build recipes and
follow its directions.

This is what I did!!

In my first e-mail I wrote:

I download the source from github:

1) Executed win32\configure.bat --> OK
2) launch nmake and this is the result:

compiling ./enc/trans/big5.c
big5.c
c1 : fatal error C1083: Cannot open source file: './enc/trans/big5.c': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.EXE"' : return code '0x2

Someone ask me If I have installed VS on my machine and I say Yes, but I try to compile Ruby from the command line.

I have also ruby installed (ruby 1.9.2p180)....

Sorry for the confusion

bye
Gianluca

Da: Jon Forums <lists@ruby-forum.com>
Inviato: Lunedì 17 Settembre 2012 20:37

We make it almost trivial to build a full ruby from source with our
build recipes.
[...]

One way to build is:

cd c:\projects\rubyinstaller
rake ruby19 local=c:\projects\ruby-core dkver=tdm-32-4.7.1

Thanks for your help, I will try and let you know

bye
Gianluca