Skip to content

Instantly share code, notes, and snippets.

@jonforums
Created September 26, 2012 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonforums/3789857 to your computer and use it in GitHub Desktop.
Save jonforums/3789857 to your computer and use it in GitHub Desktop.
Building EM on Win7 32bit
# IMPORTANT: ruby built with same mingw-w64 based toolchain as used to build EM
# beware `config.h` diffs due to toolchain header diffs
C:\Users\Jon\Documents\CDev\eventmachine-git>ruby --version && gcc --version
ruby 2.0.0dev (2012-09-26 trunk 37036) [i386-mingw32]
gcc (rubenvb-4.7.2-release) 4.7.2
C:\Users\Jon\Documents\CDev\eventmachine-git>rake compile
...
linking shared-object rubyeventmachine.so
cd -
install -c tmp/i386-mingw32/rubyeventmachine/2.0.0/rubyeventmachine.so lib/rubyeventmachine.so
...
linking shared-object fastfilereaderext.so
cd -
install -c tmp/i386-mingw32/fastfilereaderext/2.0.0/fastfilereaderext.so lib/fastfilereaderext.so
# dammit...`or` vs `=` precedence :P
C:\Users\Jon\Documents\CDev\eventmachine-git>git diff
diff --git a/ext/extconf.rb b/ext/extconf.rb
index 679b809..01133ba 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -77,7 +77,7 @@ have_func('rb_time_new')
# Minor platform details between *nix and Windows:
if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
- GNU_CHAIN = ENV['CROSS_COMPILING'] or $1 == 'mingw'
+ GNU_CHAIN = ENV['CROSS_COMPILING'] || $1 == 'mingw'
OS_WIN32 = true
add_define "OS_WIN32"
else
diff --git a/ext/fastfilereader/extconf.rb b/ext/fastfilereader/extconf.rb
index 1c1ba9f..c618930 100644
--- a/ext/fastfilereader/extconf.rb
+++ b/ext/fastfilereader/extconf.rb
@@ -17,7 +17,7 @@ add_define 'BUILD_FOR_RUBY'
# Minor platform details between *nix and Windows:
if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
- GNU_CHAIN = ENV['CROSS_COMPILING'] or $1 == 'mingw'
+ GNU_CHAIN = ENV['CROSS_COMPILING'] || $1 == 'mingw'
OS_WIN32 = true
add_define "OS_WIN32"
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment