Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

Geert VL
Hi,

I am trying to compile Vim 7.2.418 together with Ruby 1.9.1.
I use Visual C++ 2008 Express edition.

I use the following command line:

nmake -f Make_mvc.mak GUI=yes MSVCVER=9.0 PYTHON=c:\Python26 RUBY=c:
\Ruby19

This gives me the following error:

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Python requested (version 26) - root dir is "c:\Python26"
Ruby requested (version 19) - root dir is "c:\Ruby19"

cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -
D
FEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.
\ObjGYR/ /Ox
/GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT
-DFEAT_PY
THON -DFEAT_RUBY -DFEAT_BIG /Fd.\ObjGYR/ /Zi /I "c:\Ruby19\lib\ruby
\1.9.1\i386-m
ingw32" if_ruby.c
if_ruby.c
if_ruby.c(68) : fatal error C1083: Cannot open include file: 'ruby.h':
No such f
ile or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

I made the following changes in my Make_mvc.mak file for Ruby:
RUBY_VER = 19
RUBY_VER_LONG = 1.9.1
RUBY_PLATFORM = i386-mingw32


What did I do wrong?

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

winterTTr-2


On Fri, May 14, 2010 at 12:55 AM, Geert VL <geert.vanlaethem@gmail.com> wrote:
Hi,

I am trying to compile Vim 7.2.418 together with Ruby 1.9.1.
I use Visual C++ 2008 Express edition.

I use the following command line:

nmake -f Make_mvc.mak GUI=yes MSVCVER=9.0 PYTHON=c:\Python26 RUBY=c:
\Ruby19

This gives me the following error:

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Python requested (version 26) - root dir is "c:\Python26"
Ruby requested (version 19) - root dir is "c:\Ruby19"

cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -
D
FEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.
\ObjGYR/ /Ox
/GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT
-DFEAT_PY
THON -DFEAT_RUBY -DFEAT_BIG /Fd.\ObjGYR/ /Zi /I "c:\Ruby19\lib\ruby
\1.9.1\i386-m
ingw32" if_ruby.c
if_ruby.c
if_ruby.c(68) : fatal error C1083: Cannot open include file: 'ruby.h':
No such f
ile or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

I made the following changes in my Make_mvc.mak file for Ruby:
RUBY_VER = 19
RUBY_VER_LONG = 1.9.1
RUBY_PLATFORM = i386-mingw32


What did I do wrong?

I don't try to compile the ruby by myself, but i have some experience to  use the VS.
I think this is because that you did NOT tell the cl.exe the right INLUCDE path which should including the "ruby header files"

So , try to add the "header file path" before you run the "nmake"
>>> set INCLUDE=Your_Ruby_Header_Path;%INCLUDE%

then try to run the nmake again. I may be OK this time. :-)

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

Sergey Khorev
>> nmake -f Make_mvc.mak GUI=yes MSVCVER=9.0 PYTHON=c:\Python26 RUBY=c:
>> \Ruby19

You also need to specify RUBY_VER_LONG and, perhaps, RUBY_PLATFORM,

--
Sergey Khorev
http://sites.google.com/site/khorser
Can anybody think of a good tagline I can steal?

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

Geert VL
In reply to this post by winterTTr-2
Ok did that but then it gives me the following error:
 
c:\ruby19\include\ruby-1.9.1\ruby/ruby.h(64) : fatal error C1083: Cannot open in
clude file: 'inttypes.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.
 
I included in SET INCLUDE the path to my cygwin include headers that contains inttypes.h but then I get the following error:
 
Python requested (version 26) - root dir is "c:\Python26"
Ruby requested (version 19) - root dir is "c:\Ruby19"
        cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -D
FEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.\ObjGYR/ /Ox
/GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PY
THON -DFEAT_RUBY -DFEAT_BIG /Fd.\ObjGYR/ /Zi /I "c:\Ruby19\lib\ruby\1.9.1\i386-m
swin32" if_ruby.c
if_ruby.c
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(40) : warning C4005: 'NT' : macro rede
finition
        if_ruby.c(18) : see previous definition of 'NT'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(215) : error C2061: syntax error : ide
ntifier 'rb_w32_pipe_exec'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(215) : error C2059: syntax error : ';'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(215) : error C2059: syntax error : 'ty
pe'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(256) : error C2061: syntax error : ide
ntifier 'waitpid'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(256) : error C2059: syntax error : ';'
 
[More then 100 other errors]
 
 
Any idea?
 
 
 
Geert Van Laethem


 
On Fri, May 14, 2010 at 3:10 AM, winterTTr <[hidden email]> wrote:


On Fri, May 14, 2010 at 12:55 AM, Geert VL <geert.vanlaethem@gmail.com> wrote:
Hi,

I am trying to compile Vim 7.2.418 together with Ruby 1.9.1.
I use Visual C++ 2008 Express edition.

I use the following command line:

nmake -f Make_mvc.mak GUI=yes MSVCVER=9.0 PYTHON=c:\Python26 RUBY=c:
\Ruby19

This gives me the following error:

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Python requested (version 26) - root dir is "c:\Python26"
Ruby requested (version 19) - root dir is "c:\Ruby19"

cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -
D
FEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.
\ObjGYR/ /Ox
/GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT
-DFEAT_PY
THON -DFEAT_RUBY -DFEAT_BIG /Fd.\ObjGYR/ /Zi /I "c:\Ruby19\lib\ruby
\1.9.1\i386-m
ingw32" if_ruby.c
if_ruby.c
if_ruby.c(68) : fatal error C1083: Cannot open include file: 'ruby.h':
No such f
ile or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

I made the following changes in my Make_mvc.mak file for Ruby:
RUBY_VER = 19
RUBY_VER_LONG = 1.9.1
RUBY_PLATFORM = i386-mingw32


What did I do wrong?

I don't try to compile the ruby by myself, but i have some experience to  use the VS.
I think this is because that you did NOT tell the cl.exe the right INLUCDE path which should including the "ruby header files"

So , try to add the "header file path" before you run the "nmake"
>>> set INCLUDE=Your_Ruby_Header_Path;%INCLUDE%

then try to run the nmake again. I may be OK this time. :-)

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php



--
Writing is therapy. It heals. It guides. It calms. It helps make life worth living.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

Geert VL
Ok that problem is solved. It takes for a strange reason the wrong config.h file and that gives the aforementioned errors.
 
I am a step further and I think almost at the finish. Now I get the following error:
 
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(40) : warning C4005: 'NT' : macro rede
finition
        if_ruby.c(18) : see previous definition of 'NT'
if_ruby.c(595) : warning C4047: 'function' : 'char ***' differs in levels of ind
irection from 'char *(*)[1]'
if_ruby.c(595) : warning C4024: 'ruby_sysinit' : different types for formal and
actual parameter 2
if_ruby.c(698) : warning C4996: 'strcpy': This function or variable may be unsaf
e. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
.....
if_ruby.obj : error LNK2001: unresolved external symbol __imp__ruby_errinfo
gvim.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\link.EXE"' : return code '0x460'
Stop.
 
Any idea?
 


 
On Sat, May 15, 2010 at 1:38 AM, Geert Van Laethem <[hidden email]> wrote:
Ok did that but then it gives me the following error:
 
c:\ruby19\include\ruby-1.9.1\ruby/ruby.h(64) : fatal error C1083: Cannot open in
clude file: 'inttypes.h': No such file or directory

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.
 
I included in SET INCLUDE the path to my cygwin include headers that contains inttypes.h but then I get the following error:
 
Python requested (version 26) - root dir is "c:\Python26"
Ruby requested (version 19) - root dir is "c:\Ruby19"
        cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -D
FEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.\ObjGYR/ /Ox
/GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PY
THON -DFEAT_RUBY -DFEAT_BIG /Fd.\ObjGYR/ /Zi /I "c:\Ruby19\lib\ruby\1.9.1\i386-m
swin32" if_ruby.c
if_ruby.c
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(40) : warning C4005: 'NT' : macro rede
finition
        if_ruby.c(18) : see previous definition of 'NT'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(215) : error C2061: syntax error : ide
ntifier 'rb_w32_pipe_exec'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(215) : error C2059: syntax error : ';'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(215) : error C2059: syntax error : 'ty
pe'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(256) : error C2061: syntax error : ide
ntifier 'waitpid'
c:\ruby19\include\ruby-1.9.1\ruby/win32.h(256) : error C2059: syntax error : ';'
 
[More then 100 other errors]
 
 
Any idea?
 
 
 
Geert Van Laethem


 
On Fri, May 14, 2010 at 3:10 AM, winterTTr <[hidden email]> wrote:


On Fri, May 14, 2010 at 12:55 AM, Geert VL <geert.vanlaethem@gmail.com> wrote:
Hi,

I am trying to compile Vim 7.2.418 together with Ruby 1.9.1.
I use Visual C++ 2008 Express edition.

I use the following command line:

nmake -f Make_mvc.mak GUI=yes MSVCVER=9.0 PYTHON=c:\Python26 RUBY=c:
\Ruby19

This gives me the following error:

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Python requested (version 26) - root dir is "c:\Python26"
Ruby requested (version 19) - root dir is "c:\Ruby19"

cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -
D
FEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.
\ObjGYR/ /Ox
/GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT
-DFEAT_PY
THON -DFEAT_RUBY -DFEAT_BIG /Fd.\ObjGYR/ /Zi /I "c:\Ruby19\lib\ruby
\1.9.1\i386-m
ingw32" if_ruby.c
if_ruby.c
if_ruby.c(68) : fatal error C1083: Cannot open include file: 'ruby.h':
No such f
ile or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

I made the following changes in my Make_mvc.mak file for Ruby:
RUBY_VER = 19
RUBY_VER_LONG = 1.9.1
RUBY_PLATFORM = i386-mingw32


What did I do wrong?

I don't try to compile the ruby by myself, but i have some experience to  use the VS.
I think this is because that you did NOT tell the cl.exe the right INLUCDE path which should including the "ruby header files"

So , try to add the "header file path" before you run the "nmake"
>>> set INCLUDE=Your_Ruby_Header_Path;%INCLUDE%

then try to run the nmake again. I may be OK this time. :-)

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php



--
Writing is therapy. It heals. It guides. It calms. It helps make life worth living.



--
Writing is therapy. It heals. It guides. It calms. It helps make life worth living.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Vim 7.2.418 and Ruby 1.9.1 with Visual C++

Sergey Khorev
In reply to this post by Geert VL
Geert,

> I included in SET INCLUDE the path to my cygwin include headers that
> contains inttypes.h but then I get the following error:

I'm not sure it's a good idea to mix cygwin and MSVC headers.
Correct solution would be like patch below, although I didn't test it
because Ruby wants MSVC 6.0. Any site where I can download builds for
more recent MSVC?

--- ../vim72-bak/src/Make_mvc.mak Fri May 14 23:24:24 2010 +0200
+++ ./src/Make_mvc.mak Sat May 15 12:47:44 2010 +0400
@@ -740,7 +740,7 @@
 !message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
 CFLAGS = $(CFLAGS) -DFEAT_RUBY
 RUBY_OBJ = $(OUTDIR)\if_ruby.obj
-RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
+RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I
"$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I
"$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
 RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
 # Do we want to load Ruby dynamically?
 !if "$(DYNAMIC_RUBY)" == "yes"

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php