Ticket #3 (new defect)

Opened 19 months ago

Last modified 18 months ago

Failed win32 build with VC++ 6.0

Reported by: sergejf Owned by: lwu
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

First I need to mention that I'm not even sure you intend to support the sandbox natively under Windows (I hope you do, it's a great extension to Ruby :)

I tried building the extension under Windows XP with VC++ 6.0 and the latest Ruby one click installer, 1.8.24, using the source). I used the tar file you provided on http://code.whytheluckystiff.net/dist/sandbox-0.4.tgz. I ran across the following problems and had to give up:

1) I couldn't apply the patch under Windows, despite using the Win32 version of patch downloaded from sourceforge. I had to transfer the code to Debian and patch it there, then transfer it back to Windows.

2) I had to add #define SAVE_WIN32_EXCEPTION_LIST 1 in node.h of the patched code otherwise it would have been impossible to rebuild Ruby.

3) I couldn't build the sandbox C extension right off either: VC complained about VALUE variables declared in the body of functions. Moving them solved the issue, which I'm told does not happen with gcc (this particular issue makes me doubt the extension has recently been built under VC++ 6.0).

4) When the extension was finally built and installed together with the patched version of Ruby, I tried to execute the short example program in the Wiki: the sandbox came back with a nasty segmentation fault:

c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/sand_table.so: [BUG] Segmentation fault

This is where I left it. Since I'm not even sure that you intend to support the Windows platform I prefer not to spend time debugging the sandbox, although I would love to use it in my project.

Change History

Changed 18 months ago by lwu

  • owner changed from somebody to lwu

I'll take a look at this.

Changed 18 months ago by lwu

I don't have VC6 installed right now, but it seems that compiling recent Ruby under VC8 (Visual Studio Express 2005) isn't an easy thing to do:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/246886

It also seems there are binary incompatibilities between various versions of VC -- http://halostatue.ca/2006/09/21/ruby-on-windows-a-note-for-microsoft/ -- sigh.

There are some win32 binaries here, ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/

but the last time I checked, 1.8.6 still didn't have the one last error.c patch that _why posted, and the 1.9 bin isn't fresh enough.

(Note that you tried to patch 1.8.2x rather than 1.8.5, which I'm guessing probably doesn't work.)

Changed 18 months ago by lwu

Checked in changes to let Sandbox compile under VC++ Express 2005.

You can build Ruby 1.8.x or 1.9 from source on Windows like so:

http://groups.google.com/group/ruby-talk-google/msg/0a5ea6338bdba59e

In a similar fashion, I can compile Sandbox, but it still SEGVs...

Note: See TracTickets for help on using tickets.