[Win32utils-devel] Trouble creating mingw binary

Luis Lavena luislavena at gmail.com
Sat Jan 23 11:58:47 EST 2010


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."

-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry


More information about the win32utils-devel mailing list