Bugs: Browse | Submit New | Admin

[#29405] no consideration about MSWin

Date:
2011-10-16 01:01
Priority:
3
Submitted By:
arton Tajima (arton)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
no consideration about MSWin

Detailed description
Hi,

Thanks for your porting effort for racc into ruby 1.9 C API.
But in extconf.rb, this badly accepts the presence of unix command uname. and it causes error for mswin users and effective
for osx users only.


Fetching: racc-1.4.6.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing racc:
        ERROR: Failed to build gem native extension.

        c:/progra~2/ruby-1.9.3/bin/ruby.exe extconf.rb
extconf.rb:3:in ``': No such file or directory - uname -p (Errno::ENOENT)
        from extconf.rb:3:in `<main>'

------------------------
I'v tested above patch with rubinius and snow leopard's original /usr/bin/ruby, and naturally it runs very well
in Windows.

--- ext\racc\cparse\extconf.rb~ Sun Oct 16 09:37:31 2011
+++ ext\racc\cparse\extconf.rb  Sun Oct 16 09:47:38 2011
@@ -1,6 +1,8 @@
 # $Id$

-ENV["ARCHFLAGS"] = "-arch #{`uname -p` =~ /powerpc/ ? 'ppc' : 'i386'}"
+if RUBY_PLATFORM =~ /darwin/
+  ENV["ARCHFLAGS"] = "-arch #{`uname -p` =~ /powerpc/ ? 'ppc' : 'i386'}"
+end

 require 'mkmf'

So, please consider MSWin users.
Thanks in advance.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item