Bugs: Browse | Submit New | Admin

[#27692] win32-service install error with 1.9.1

Date:
2010-01-15 13:27
Priority:
3
Submitted By:
Helder Aranha (hmspider)
Assigned To:
Daniel Berger (djberg96)
Category:
win32-service
State:
Closed
Summary:
win32-service install error with 1.9.1

Detailed description
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

Add A Comment: Notepad

Please login


Followup

Message
Date: 2011-10-26 16:13
Sender: Daniel Berger

Should work for both 1.8 and 1.9 with the release of 0.7.2.
Date: 2010-08-30 17:58
Sender: Jacques Petit

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
Date: 2010-05-23 15:08
Sender: Murmansk Manny

Waiting for 1.9.x compatibility. Any 0.7.1 preview?
Date: 2010-02-21 18:20
Sender: nick ricketts

I got around this with binary install using

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

Hope this helps you out.
Date: 2010-02-21 16:10
Sender: Daniel Berger

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
Date: 2010-02-08 22:39
Sender: nick ricketts

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.
Date: 2010-02-08 22:36
Sender: Luis Lavena

Hello,

Can you try the beta version of mongrel service?

http://groups.google.com/group/rubyinstaller/browse_thread/thread
/ad530be7daf1f2d9
Date: 2010-02-08 21:18
Sender: nick ricketts

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.
Date: 2010-01-31 15:31
Sender: Daniel Berger

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
Date: 2010-01-15 16:27
Sender: Luis Lavena

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.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
status_idOpen2011-10-26 16:13djberg96
resolution_idNone2011-10-26 16:13djberg96
artifact_group_idNone2011-10-26 16:13djberg96
assigned_tonone2011-10-26 16:13djberg96
close_date2011-10-26 16:132011-10-26 16:13djberg96