[Win32utils-devel] [ win32utils-Bugs-27692 ] win32-service install error with 1.9.1

noreply at rubyforge.org noreply at rubyforge.org
Mon Aug 30 13:58:00 EDT 2010


Bugs item #27692, was opened at 2010-01-15 13:27
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=27692&group_id=85

Category: win32-service
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Helder Aranha (hmspider)
Assigned to: Nobody (None)
Summary: win32-service install error with 1.9.1

Initial Comment:
googled this for a while, no joy.

goal is to install v0.5.2 in order to use mongrel_services gem on Vista.

 RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.9.1
  - RUBYGEMS PREFIX: C:/Ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5
  - 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.9.1
     - C:/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

c:/Ruby/bin/ruby.exe extconf.rb
checking for RegisterServiceCtrlHandlerEx()... yes
checking for EnumServicesStatusEx()... yes
checking for QueryServiceStatusEx()... yes
creating Makefile

make
gcc -I. -Ic:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/c/Ruby/include/ruby-1.9.1/ruby/backward -I/c/Ruby/include/ruby-1.9.1 -I. -DHAVE_REGISTERSERVICECTRLHANDLEREX -DHAVE_ENUMSERVICESSTATUSEX -DHAVE_QUERYSERVICESTATUSEX    -O2 -g -Wall -Wno-parentheses   -o service.o -c service.c
In file included from service.c:7:
service.h: In function 'rb_get_dependencies':
service.h:80: error: 'struct RArray' has no member named 'len'
service.h: In function 'rb_get_controls_accepted':
service.h:232: error: 'struct RArray' has no member named 'len'
service.c: In function 'Service_Event_Dispatch':
service.c:91: error: 'struct RArray' has no member named 'ptr'
service.c:92: error: 'struct RArray' has no member named 'ptr'
service.c: In function 'Ruby_Service_Ctrl':
service.c:104: error: '__try' undeclared (first use in this function)
service.c:104: error: (Each undeclared identifier is reported only once
service.c:104: error: for each function it appears in.)
service.c:105: error: expected ';' before '{' token
service.c: In function 'Service_Ctrl':
service.c:159: error: '__try' undeclared (first use in this function)
service.c:160: error: expected ';' before '{' token
service.c: In function 'service_configure':
service.c:663: error: 'struct RArray' has no member named 'len'
service.c:667: error: 'struct RArray' has no member named 'len'
service.c:669: error: 'struct RArray' has no member named 'ptr'
service.c:674: error: 'struct RArray' has no member named 'len'
service.c: In function 'service_create':
service.c:846: error: 'struct RArray' has no member named 'len'
service.c:850: error: 'struct RArray' has no member named 'len'
service.c:852: error: 'struct RArray' has no member named 'ptr'
service.c:857: error: 'struct RArray' has no member named 'len'
service.c: In function 'service_start':
service.c:1562: error: 'struct RArray' has no member named 'len'
service.c:1568: error: 'struct RArray' has no member named 'len'
service.c:1570: error: 'struct RArray' has no member named 'len'
service.c:1603: warning: passing argument 3 of 'StartServiceA' from incompatible pointer type
c:\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/winsvc.h:239: note: expected 'const CHAR **' but argument is of type 'TCHAR **'
make: *** [service.o] Error 1

----------------------------------------------------------------------

Comment By: Jacques Petit (jrpetit)
Date: 2010-08-30 17:58

Message:
Comment out the SEH lines as they really don't add much.
//__try {

//}
//__finally {
//} 

The finally clause is used in this code as a guarantee that the critical section will be unlocked if an exception occurs.

I prefer to just have the process die if an exception occurs at this layer and let ruby exit with an error. Since there isn't any exception trapping anyways, the critical section unlock is unneeded.

Then manually build the gem in:
 c:\Ruby\lib\ruby\gems\1.9.1\gems\win32-service-0.7.1

gem build win32-service.gemspec

----------------------------------------------------------------------

Comment By: Murmansk Manny (murmansk)
Date: 2010-05-23 15:08

Message:
Waiting for 1.9.x compatibility. Any 0.7.1 preview?

----------------------------------------------------------------------

Comment By: nick ricketts (nightshade427)
Date: 2010-02-21 18:20

Message:
I got around this with binary install using

 "gem install win32-service --platform x86-mswin32"

Hope this helps you out.

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2010-02-21 16:10

Message:
There a couple of solutions. One is to finally roll out the pure Ruby version. I just haven't had time to look at in a while, nor test it with 1.9.x. I'm curious if we need the 2 separate files for 1.9.x, actually.

The other, using the current code base, is to link in libseh and see if that works.

Regards,

Dan


----------------------------------------------------------------------

Comment By: nick ricketts (nightshade427)
Date: 2010-02-08 22:39

Message:
The problem is __try doesn't work with the new Window Ruby Installer since it is using MinGW. So the native ext wont build. It needs to be converted to be compatible with MinGW since that is the direction the windows ruby stuff is going. I wish I knew more about C so I could help out with it.

----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2010-02-08 22:36

Message:
Hello,

Can you try the beta version of mongrel service?

http://groups.google.com/group/rubyinstaller/browse_thread/thread/ad530be7daf1f2d9

----------------------------------------------------------------------

Comment By: nick ricketts (nightshade427)
Date: 2010-02-08 21:18

Message:
Any get this working???


Installation of win32-service will fail as it uses SEH (Structured
Exception Handling), something that is only 100% available under
Microsoft compiler and not portable to GCC (MinGW)

There is a library called libseh that mimics it, but is not 100%
compatible.

After that thing, RArray->len references should be changed
to RARRAY_LEN macros instead.

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2010-01-31 15:31

Message:
I've updated the code in git to make it compatible for 1.9.x. I'm working out some other issues, but look for 0.7.1 soon.

Regards,

Dan

----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2010-01-15 16:27

Message:
Installation of win32-service will fail as it uses SEH (Structured Exception Handling), something that is only 100% available under Microsoft compiler and not portable to GCC (MinGW)

There is a library called libseh that mimics it, but is not 100% compatible.

After that thing, RArray->len references should be changed to RARRAY_LEN macros instead.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=27692&group_id=85


More information about the win32utils-devel mailing list