C:\>gem install hpricot --no-ri
Building native extensions. This could take a while...
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for stdio.h... yes
creating Makefile
make
gcc -I. -I/C/Ruby/lib/ruby/1.8/i386-mingw32 -I/C/Ruby/lib/ruby/1.8/
i386-mingw32 -I. -DHAVE_STDIO_H -g -O2 -c fast_xs.c
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
make: *** [fast_xs.o] Error 3
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/
hpricot-0.8.2 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/hpricot-0.8.2/ext/
fast_xs/gem_make.out
Any idea about what the problem is?
Thanks
-- Thierry
Looks like what fast_xs is doing during compilation is making GCC
segfault and crash.
Going to test and confirm that later today.
Just a quick question, what OS version (Xp, Vista, 7) and type (32/64) you have?
--
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
C:\Ruby\src>gem install mongo_ext --no-ri
Building native extensions. This could take a while...
ERROR: Error installing mongo_ext:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for asprintf()... no
checking for ruby/st.h... no
checking for st.h... yes
checking for ruby/regex.h... no
checking for regex.h... yes
checking for ruby/encoding.h... no
creating Makefile
make
gcc -I. -I. -IC:/Ruby/lib/ruby/1.8/i386-mingw32 -I. -DHAVE_ST_H -
DHAVE_REGEX_H -g -O2 -c buffer.c
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
make: *** [buffer.o] Error 3
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/
mongo_ext-0.19.1 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/mongo_ext-0.19.1/ext/
cbson/gem_make.out
By chance do you have DEP enabled?
http://techblissonline.com/enable-disable-dep-in-windows-xp-vista/
It's set to "Turn on DEP for essential Windows programs and services
only". Should I set it to "AlwaysOff"?
-- Thierry
No, that is good. DEP sometimes interferes with compilers, which seems
is what is happening now.
The weird thing is that is happening with all the extensions.
Let me take a look later when I'm at home and provide you a simple
example for you to try out.
(don't want to think you're my guinea pig, but any testing from your
end will be helpful for you and others)
Thank you.
Ok, no problem.
Please proceed with the following:
1) Download the contents of the following gist:
2) Extract and put these two files (extconf.rb and my_extension.c)
into a new folder
3) Open a Ruby 1.8.7 command prompt (in case you haven't added ruby to
your PATH)
4) cd into that directory and execute:
4.1) ruby extconf.rb
You should see:
creating Makefile
4.2) Now trigger the compile process:
make
You should see:
gcc -I. -I/C/Users/Luis/Tools/Ruby/ruby-1.8.7-p249-i386-mingw32/lib/ruby/1.8/i386-mingw32
-I/C/Users/Luis/Tools/Ruby/ruby-1.8.7-p249-i386-mingw32/lib/ruby/1.8/i386-mingw32
-I. -g -O2 -c my_extension.c
gcc -shared -s -o my_extension.so my_extension.o -L.
-LC:/Users/Luis/Tools/Ruby/ruby-1.8.7-p249-i386-mingw32/lib -L.
-Wl,--enable-auto-image-base,--enable-auto-import,--export-all
-lmsvcrt-ruby18 -lshell32 -lws2_32
5) Test it worked:
ruby -I. -rmy_extension -e "puts Done."
Please let me know if the result of step 4.2, and what is the complete output.
Also include the following information:
PATH (set PATH)
gcc --version
gcc -print-search-dirs
make --version
C:\home\test>make
gcc -I. -I/c/ruby/lib/ruby/1.8/i386-mingw32 -I/c/ruby/lib/ruby/1.8/
i386-mingw32 -I. -g -
O2 -c my_extension.c
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
make: *** [my_extension.o] Error 3
C:\home\test>echo %PATH%
c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
\Program Files\Torto
iseSVN\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files
\EmEditor;C:\Program
Files\VisualSVN\bin;C:\Program Files\SAS Institute\Shared Files
\Formats;C:\Programs;C:\Ru
by\bin;C:\progra~1\utilit~1
C:\home\test>gcc --version
gcc.exe (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
C:\home\test>gcc -print-search-dirs
install: /mingw/lib/gcc/mingw32/3.4.5/
programs: =c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../libexec/gcc/
mingw32/3.4.5/;c:/Ruby/bin/.
./devkit/gcc/3.4.5/bin/../libexec/gcc/;/mingw/libexec/gcc/
mingw32/3.4.5/;/mingw/libexec/gc
c/mingw32/3.4.5/;/mingw/libexec/gcc/mingw32/;/mingw/lib/gcc/
mingw32/3.4.5/;/mingw/lib/gcc/
mingw32/;/usr/libexec/gcc/mingw32/3.4.5/;/usr/libexec/gcc/mingw32/;/
usr/lib/gcc/mingw32/3.
4.5/;/usr/lib/gcc/mingw32/;c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/
gcc/mingw32/3.4.5/..
/../../../mingw32/bin/mingw32/3.4.5/;c:/Ruby/bin/../devkit/gcc/3.4.5/
bin/../lib/gcc/mingw3
2/3.4.5/../../../../mingw32/bin/;/mingw/mingw32/bin/mingw32/3.4.5/;/
mingw/mingw32/bin/
libraries: =c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/;c:/Ruby/bin/../d
evkit/gcc/3.4.5/bin/../lib/gcc/;/mingw/lib/gcc/mingw32/3.4.5/;/usr/lib/
gcc/mingw32/3.4.5/;
c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/../../../../mingw32/lib/mingw
32/3.4.5/;c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/../../../../mingw32
/lib/;/mingw/mingw32/lib/mingw32/3.4.5/;/mingw/mingw32/lib/;/mingw/lib/
mingw32/3.4.5/;/min
gw/lib/;c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/../../../mingw32/3.4.
5/;c:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/../../../;/mingw/lib/mingw
32/3.4.5/;/mingw/lib/;/lib/mingw32/3.4.5/;/lib/;/usr/lib/
mingw32/3.4.5/;/usr/lib/
C:\home\test>make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
Very very weird.
This crash:
/* hello.c */
int main()
{
printf("Hello\n");
return 0;
}
And compile with this:
gcc hello.c -o hello.exe
If that is too, we can exclude that is Ruby or the extension the issue.
The weird part is that it crashes on your installation, while I have
tested both 32 and 64bits versions of Windows 7 without issues
That lead me think there is something wrong in your setup. I'm not
saying that you installed Ruby or the tools in a wrong way, but there
is something differently that is affecting GCC.
Does the simple C code compile successfully or also crash? That will help a lot.
>
> My fix: Install virtual box, install ubuntu :'(
That doesn't help solve the problem, that just eludes it.
Look:
C:\Users\jfalvarez\gist322066-f8921bf0c6bdea2693e4e54de32cc8bb2a90643f
\gist32206
6-f8921bf0c6bdea2693e4e54de32cc8bb2a90643f>make
gcc -I. -I/C/Ruby/lib/ruby/1.8/i386-mingw32 -I/C/Ruby/lib/ruby/1.8/
i386-mingw32
-I. -g -O2 -c my_extension.c
gcc -shared -s -o my_extension.so my_extension.o -L. -LC:/Ruby/lib -
L. -Wl,--en
able-auto-image-base,--enable-auto-import,--export-all -lmsvcrt-
ruby18 -lshel
l32 -lws2_32
C:\Users\jfalvarez\gist322066-f8921bf0c6bdea2693e4e54de32cc8bb2a90643f
\gist32206
6-f8921bf0c6bdea2693e4e54de32cc8bb2a90643f>ruby -I. -rmy_extension -e
"puts Done
."
my_extension has been loaded.
-e:1: syntax error, unexpected $end
C:\Users\jfalvarez>set PATH
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows
\System32
\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:
\Program F
iles (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files
\TortoiseSVN\bin
;C:\Lib\grails-1.2.1\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:
\Lib\apache-
maven-2.2.1\bin;C:\Ruby\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW
C:\Users\jfalvarez>gcc --version
gcc.exe (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
C:\Users\jfalvarez>gcc -print-search-dirs
install: /mingw/lib/gcc/mingw32/3.4.5/
programs: =C:/Ruby/bin/../devkit/gcc/3.4.5/bin/../libexec/gcc/
mingw32/3.4.5/;C:/
Ruby/bin/../devkit/gcc/3.4.5/bin/../libexec/gcc/;/mingw/libexec/gcc/
mingw32/3.4.
5/;/mingw/libexec/gcc/mingw32/3.4.5/;/mingw/libexec/gcc/mingw32/;/
mingw/lib/gcc/
mingw32/3.4.5/;/mingw/lib/gcc/mingw32/;/usr/libexec/gcc/
mingw32/3.4.5/;/usr/libe
xec/gcc/mingw32/;/usr/lib/gcc/mingw32/3.4.5/;/usr/lib/gcc/mingw32/;C:/
Ruby/bin/.
./devkit/gcc/3.4.5/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/
bin/mingw32/
3.4.5/;C:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/../../../../
mingw32/bin/;/mingw/mingw32/bin/mingw32/3.4.5/;/mingw/mingw32/bin/
libraries: =C:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5/;C:/Rub
y/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/;/mingw/lib/gcc/
mingw32/3.4.5/;/usr/lib
/gcc/mingw32/3.4.5/;C:/Ruby/bin/../devkit/gcc/3.4.5/bin/../lib/gcc/
mingw32/3.4.5
/../../../../mingw32/lib/mingw32/3.4.5/;C:/Ruby/bin/../devkit/gcc/
3.4.5/bin/../l
ib/gcc/mingw32/3.4.5/../../../../mingw32/lib/;/mingw/mingw32/lib/
mingw32/3.4.5/;
/mingw/mingw32/lib/;/mingw/lib/mingw32/3.4.5/;/mingw/lib/;C:/Ruby/
bin/../devkit/
gcc/3.4.5/bin/../lib/gcc/mingw32/3.4.5/../../../mingw32/3.4.5/;C:/Ruby/
bin/../de
vkit/gcc/3.4.5/bin/../lib/gcc/mingw32/3.4.5/../../../;/mingw/lib/
mingw32/3.4.5/;
/mingw/lib/;/lib/mingw32/3.4.5/;/lib/;/usr/lib/mingw32/3.4.5/;/usr/
lib/
C:\Users\jfalvarez>make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
Thanks.
On Mar 4, 3:22 pm, Luis Lavena <luislav...@gmail.com> wrote: