I pushed parts of Jon’s patch today and added explicit dllexports for the build and defined dllimports in the ruby.h for extensions using it. I was then able to completely build cext support and run Thin on my Windows machine here. I haven’t gotten the specs to work, but I already know the fix for that, just didn’t have the time, yet.
cext built without error and exports 331 symbols rather than 652 with
–export-all-symbols
Jon, could you test? I have e.g. native mongrel and rfuzz with passing specs here, so those should definitely run. You could also try curb, eventmachine, racc, ruby-pg which I have mostly working here (mostly some spec failures here and there)
-Tim
- RedCloth fails due to missing rb_obj_clone symbol
- EventMachine fails due to unrecognized -EHs and -GR options
- should -fexceptions be removed from RbConfigLibrary.java?
- attached patch removes -mimpure-text (Solaris only, now Win32?) and
makes CC usage a bit more flexible.
- FYI, I still haven’t found a way to remove cc.bat and cc (shell
script) from DevKit so that the Makefile’s built from
RbConfigLibrary.java can have their “CC=cc” overridden.
=== FAILURE DETAILS ===
C:\Users\Jon\Documents\CDev\rdiscount>gem install RedCloth
–platform=ruby
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Temporarily enhancing PATH to include DevKit…
Building native extensions. This could take a while…
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.
C:/Users/Jon/Documents/JavaDev/jruby/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf’ library
very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
C:/Users/Jon/Documents/JavaDev/jruby/lib/ruby/1.8/mkmf.rb:31 warning:
already initiali
zed constant RUBY_PLATFORM
creating Makefile
make
cc -I. -IC:/Users/Jon/Documents/JavaDev/jruby/lib/native/include
-IC:/Users/Jon/Docum
ents/JavaDev/jruby/lib/native/include/ruby -I. -fno-omit-frame-pointer
-fno-strict-al
iasing -fexceptions -O2 -m32 -march=native -mtune=native -c
redcloth_attributes.c
cc -I. -IC:/Users/Jon/Documents/JavaDev/jruby/lib/native/include
-IC:/Users/Jon/Docum
ents/JavaDev/jruby/lib/native/include/ruby -I. -fno-omit-frame-pointer
-fno-strict-al
iasing -fexceptions -O2 -m32 -march=native -mtune=native -c
redcloth_inline.c
cc -I. -IC:/Users/Jon/Documents/JavaDev/jruby/lib/native/include
-IC:/Users/Jon/Docum
ents/JavaDev/jruby/lib/native/include/ruby -I. -fno-omit-frame-pointer
-fno-strict-al
iasing -fexceptions -O2 -m32 -march=native -mtune=native -c
redcloth_scan.c
cc -shared -o redcloth_scan.dll redcloth_attributes.o
redcloth_inline.o redcloth_sca
n.o -L"." -L"/Users/Jon/Documents/JavaDev/jruby/lib"
-LC:/Users/Jon/Documents/JavaDev/
jruby/lib/native/i386-Windows -ljruby-cext
-Wl,–enable-auto-image-base,–enable-auto-
import -m32 -march=native -mtune=native
redcloth_scan.o:redcloth_scan.c:(.text+0xa33b): undefined reference to
`rb_obj_clone’
collect2: ld returned 1 exit status
make: *** [redcloth_scan.dll] Error 1
C:\Users\Jon\Documents\CDev\rdiscount>gem install eventmachine
–platform=ruby
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Temporarily enhancing PATH to include DevKit…
Building native extensions. This could take a while…
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
C:/Users/Jon/Documents/JavaDev/jruby/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf’ library
very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
C:/Users/Jon/Documents/JavaDev/jruby/lib/ruby/1.8/mkmf.rb:31 warning:
already initiali
zed constant RUBY_PLATFORM
checking for rb_trap_immediate in ruby.h,rubysig.h… no
checking for rb_thread_blocking_region()… conftest.c:2:0: fatal error:
when writing
output to : Broken pipe
compilation terminated.
checking for inotify_init() in sys/inotify.h… no
checking for __NR_inotify_init in sys/syscall.h… no
checking for writev() in sys/uio.h… no
checking for rb_thread_check_ints()… no
checking for rb_time_new()… conftest.c:2:0: fatal error: when writing
output to : In
valid argument
compilation terminated.
checking for windows.h… yes
checking for winsock.h… yes
checking for main() in -lkernel32… yes
checking for main() in -lrpcrt4… yes
checking for main() in -lgdi32… yes
checking for main() in -lssleay32… no
creating Makefile
make
g++ -I. -I.
-IC:/Users/Jon/Documents/JavaDev/jruby/lib/native/include/ruby -I.
-DBUILD
_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_TIME_NEW
-DOS_WIN32 -D
HAVE_WINDOWS_H -DHAVE_WINSOCK_H -EHs -GR -DWITHOUT_SSL
-fno-omit-frame-pointer -fno-s
trict-aliasing -fexceptions -m32 -march=native -mtune=native -c
binder.cpp
g++.exe: unrecognized option ‘-EHs’
g++.exe: unrecognized option ‘-GR’
g++ -I. -I.
-IC:/Users/Jon/Documents/JavaDev/jruby/lib/native/include/ruby -I.
-DBUILD
_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_TIME_NEW
-DOS_WIN32 -D
HAVE_WINDOWS_H -DHAVE_WINSOCK_H -EHs -GR -DWITHOUT_SSL
-fno-omit-frame-pointer -fno-s
trict-aliasing -fexceptions -m32 -march=native -mtune=native -c
cmain.cpp
cmain.cpp: In function ‘int evma_send_file_data_to_connection(long
unsigned int, const
char*)’:
cmain.cpp:752:20: error: ‘fstat’ was not declared in this scope
g++.exe: unrecognized option ‘-EHs’
g++.exe: unrecognized option ‘-GR’
make: *** [cmain.o] Error 1