hpricot installation error

29 visualizações
Pular para a primeira mensagem não lida

Thyresias

não lida,
4 de mar. de 2010, 12:59:1204/03/2010
para RubyInstaller
Hi,
I just installed ruby-1.8.7-p249 using the installer, and then the
devkit.
I updated rubygems to 1.3.6, then tried to install hpricot. I got
this:

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

Luis Lavena

não lida,
4 de mar. de 2010, 13:04:0004/03/2010
para rubyin...@googlegroups.com

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

Thyresias

não lida,
4 de mar. de 2010, 13:10:1504/03/2010
para RubyInstaller
Thanks for following up, Luis. ^_^

> Just a quick question, what OS version (Xp, Vista, 7) and type (32/64) you have?
XP SP3, 32 bits

Thyresias

não lida,
4 de mar. de 2010, 13:12:1904/03/2010
para RubyInstaller
By the way, no luck with mongo_ext, either:

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

Luis Lavena

não lida,
4 de mar. de 2010, 13:18:3904/03/2010
para rubyin...@googlegroups.com

Thyresias

não lida,
4 de mar. de 2010, 13:23:2504/03/2010
para RubyInstaller

> By chance do you have DEP enabled?

It's set to "Turn on DEP for essential Windows programs and services
only". Should I set it to "AlwaysOff"?
-- Thierry

Luis Lavena

não lida,
4 de mar. de 2010, 13:31:1804/03/2010
para rubyin...@googlegroups.com

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.

Thyresias

não lida,
4 de mar. de 2010, 14:00:0104/03/2010
para RubyInstaller
> 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)
No problem, but I may not be able to test before tomorrow (it's 20:00
here ;)
Thanks again
-- Thierry

Luis Lavena

não lida,
4 de mar. de 2010, 15:22:0504/03/2010
para rubyin...@googlegroups.com

Ok, no problem.

Please proceed with the following:

1) Download the contents of the following gist:

http://gist.github.com/322066

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

Thyresias

não lida,
5 de mar. de 2010, 11:33:2205/03/2010
para RubyInstaller
Hi Luis,
It crashed the same way.
The requested output is below.
-- Thierry

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

Luis Lavena

não lida,
6 de mar. de 2010, 12:05:4906/03/2010
para rubyin...@googlegroups.com
On Fri, Mar 5, 2010 at 5:33 PM, Thyresias <thyr...@gmail.com> wrote:
> Hi Luis,
> It crashed the same way.
> The requested output is below.
> -- Thierry
>

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.

Juan Felipe Alvarez Saldarriaga

não lida,
6 de mar. de 2010, 13:56:3606/03/2010
para rubyin...@googlegroups.com
Thierry, 

gcc example works for me, but can't compile any gem, gcc always crash, I post something like this a fwe weeks ago:
My fix: Install virtual box, install ubuntu :'(

Luis Lavena

não lida,
6 de mar. de 2010, 19:23:5106/03/2010
para rubyin...@googlegroups.com
On Sat, Mar 6, 2010 at 7:56 PM, Juan Felipe Alvarez Saldarriaga
<neb...@gmail.com> wrote:
> Thierry,
> gcc example works for me, but can't compile any gem, gcc always crash, I
> post something like this a fwe weeks ago:
> http://groups.google.com/group/rubyinstaller/browse_thread/thread/b56521e55fd2b760

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.

Juan Felipe Alvarez Saldarriaga

não lida,
6 de mar. de 2010, 22:12:0206/03/2010
para RubyInstaller
Hi Luis,

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:

Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem