[Win32utils-devel] Trouble creating mingw binary

Daniel Berger djberg96 at gmail.com
Sat Jan 23 16:52:33 EST 2010


On Sat, Jan 23, 2010 at 2:45 PM, Daniel Berger <djberg96 at gmail.com> wrote:
> On Sat, Jan 23, 2010 at 9:58 AM, Luis Lavena <luislavena at gmail.com> wrote:
>> On Sat, Jan 23, 2010 at 1:23 PM, Daniel Berger <djberg96 at gmail.com> wrote:
>>> Hi,
>>>
>>> I'm trying to build a binary for win32-open with a mingw install but
>>> I'm having trouble. I've installed MinGW 5.1.6 and I've got gcc, etc.
>>> But, when I run "ruby extconf.rb; make" I get the following error:
>>>
>>> C:\Documents and Settings\djberge\Repositories\win32-open3\ext>ruby extconf.rb
>>> checking for ruby/io.h... no
>>> checking for rb_pid_t in ruby.h... yes
>>> creating Makefile
>>>
>>> C:\Documents and Settings\djberge\Repositories\win32-open3\ext>make
>>> make: *** No rule to make target `ruby.h', needed by `open3.o'.  Stop.
>>>
>>> I also tried mingw32-make with the same result:
>>>
>>> You can get the source here:
>>>
>>> git://github.com/djberg96/win32-open3.git
>>>
>>> Here's some environment info:
>>>
>>> RubyGems Environment:
>>>  - RUBYGEMS VERSION: 1.3.5
>>>  - RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
>>>  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
>>>  - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
>>>  - EXECUTABLE DIRECTORY: C:/Ruby/bin
>>>  - RUBYGEMS PLATFORMS:
>>>    - ruby
>>>    - x86-mingw32
>>>  - GEM PATHS:
>>>     - C:/Ruby/lib/ruby/gems/1.8
>>>     - C:/Documents and Settings/djberge/.gem/ruby/1.8
>>>  - GEM CONFIGURATION:
>>>     - :update_sources => true
>>>     - :verbose => true
>>>     - :benchmark => false
>>>     - :backtrace => false
>>>     - :bulk_threshold => 1000
>>>  - REMOTE SOURCES:
>>>     - http://gems.rubyforge.org/
>>>
>>> What's the trick?
>>
>> Move from directory with spaces to directory without spaces:
>>
>> C:\Users\Luis\Projects\oss\win32-open3\ext>ruby extconf.rb
>> checking for ruby/io.h... no
>> checking for rb_pid_t in ruby.h... yes
>> creating Makefile
>>
>> C:\Users\Luis\Projects\oss\win32-open3\ext>make
>> gcc -I. -I/C/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/lib/ruby/1.8/i386-mingw32
>> -I/C/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/lib/ruby/1.8/i386-mingw32
>> -Iwin32 -DHAVE_TYPE_RB_PID_T   -g -O2   -c win32/open3.c
>> win32/open3.c: In function `win32_pipe_finalize':
>> win32/open3.c:303: warning: passing arg 2 of `GetExitCodeProcess' from
>> incompatible pointer type
>> gcc -shared -s -o open3.so open3.o -L.
>> -LC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/lib -L.
>> -Wl,--enable-auto-image-base,--enable-auto-import,--export-all
>> -lmsvcrt-ruby18  -lshell32 -lws2_32
>>
>> >From MinGW site:
>>
>> http://www.mingw.org/wiki/Getting_Started
>>
>> "MinGW may have problems with paths containing spaces, and if not,
>> usually other programs used with MinGW will experience problems with
>> such paths. Thus, we strongly recommend that you do not install MinGW
>> in any location with spaces in the path name reference; i.e. you
>> should avoid installing into any subdirectory of "Program Files" or
>> "My Documents", or the like."
>
> Still won't work. Tried it on my Vista box. I installed MinGW at
> C:\MinGW. My git repo is at C:\Users\djberge\Repositories\win32-open3.
> Ruby is at C:\Ruby.
>
> c:\Users\djberge\Repositories\win32-open3\ext>gem env
> RubyGems Environment:
>  - RUBYGEMS VERSION: 1.3.5
>  - RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
>  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
>  - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
>  - EXECUTABLE DIRECTORY: C:/Ruby/bin
>  - RUBYGEMS PLATFORMS:
>    - ruby
>    - x86-mingw32
>  - GEM PATHS:
>     - C:/Ruby/lib/ruby/gems/1.8
>     - C:/Users/djberge/.gem/ruby/1.8
>  - GEM CONFIGURATION:
>     - :update_sources => true
>     - :verbose => true
>     - :benchmark => false
>     - :backtrace => false
>     - :bulk_threshold => 1000
>  - REMOTE SOURCES:
>     - http://gems.rubyforge.org/
>
> c:\Users\djberge\Repositories\win32-open3\ext>gcc -v
> Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
> Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc
> --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw
> 2 --prefix=/mingw --enable-threads --disable-nls
> --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --
> isable-shared --enable-sjlj-exceptions --enable-libgcj
> --disable-java-awt --without-x --enable-java-gc=boehm --disable-
> ibgcj-debug --enable-interpreter --enable-hash-synchronization
> --enable-libstdcxx-debug
> Thread model: win32
> gcc version 3.4.5 (mingw-vista special r3)
>
> Any ideas?

Now that I look, I don't see a ruby.h distributed with the mingw
bundle. Where did it go? Did I forgot to click some option when I
installed it?

Regards,

Dan


More information about the win32utils-devel mailing list