[#47409] [ruby-trunk - Feature #6973][Open] Add an #integral? method to Numeric to test for whole-number values — "regularfry (Alex Young)" <alex@...>

12 messages 2012/09/03

[#47481] [ruby-trunk - Bug #7008][Open] rake is crashing when trying to compile ffi gem — "drookie (Eugene M. Zheganin Eugene M. Zheganin)" <eugene@...>

10 messages 2012/09/12

[#47505] [ruby-trunk - Feature #7019][Open] allow `private` and `protected` keywords to take blocks — "alexeymuranov (Alexey Muranov)" <redmine@...>

15 messages 2012/09/13

[#47582] [ruby-trunk - Bug #7037][Open] float formatting inconsistently rounds half to even — "headius (Charles Nutter)" <headius@...>

14 messages 2012/09/19

[#47638] [ruby-trunk - Bug #7046][Open] ERB#run and ERB#result are not safe for concurrent use — "headius (Charles Nutter)" <headius@...>

11 messages 2012/09/21

[#47655] [ruby-trunk - Feature #7051][Open] Extend caller_locations API to include klass and bindings. Allow caller_locations as a method hanging off Thread. — "sam.saffron (Sam Saffron)" <sam.saffron@...>

13 messages 2012/09/23

[#47657] [ruby-trunk - Feature #7055][Open] Allow `.foo=` as a synonym of `self.foo=` — "alexeymuranov (Alexey Muranov)" <redmine@...>

11 messages 2012/09/23

[#47730] [ruby-trunk - Bug #7085][Open] Subversion → GitHub gateway stops. — "shyouhei (Shyouhei Urabe)" <shyouhei@...>

27 messages 2012/09/29

[#47735] [ruby-trunk - Bug #7087][Open] ::ConditionVariable#wait does not work with Monitor because Monitor#sleep does not exist — "rklemme (Robert Klemme)" <shortcutter@...>

10 messages 2012/09/29

[#47759] [ruby-trunk - Bug #7092][Open] StringScanner start-of-line matches false positives, while lookbehind for a newline gives false negatives — "jayferd (Jay Adkisson)" <jjmadkisson@...>

8 messages 2012/09/30

[ruby-core:47618] [ruby-trunk - Bug #7036] Compiling extensions with Ruby in a path with spaces

From: "luislavena (Luis Lavena)" <luislavena@...>
Date: 2012-09-20 06:26:15 UTC
List: ruby-core #47618
Issue #7036 has been updated by luislavena (Luis Lavena).

File disable-libpathflag-mingw.v2.diff added

Nobu,

Looking at some of the changes you did couldn't understand entirely, but understood that $extmk gets set only when building from extmk.rb, which gave me the idea of the new patch I'm attaching.

This new patch set LIBPATHFLAG as empty allowing -L"%s" from mkmf to work.

It also quotes $ruby unless running in $extmk mode.

This new patch works for both compilation of Ruby stdlib extensions and after installation, to compile extensions from gems on path with spaces.

I know is very (very) naive approach, so will appreciate your feedback.

Thank you.

----------------------------------------
Bug #7036: Compiling extensions with Ruby in a path with spaces
https://bugs.ruby-lang.org/issues/7036#change-29571

Author: luislavena (Luis Lavena)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: misc
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-09-16 trunk 36983) [i386-mingw32]


=begin
Hello,

This has been reported several times to RubyInstaller: inability to install gems when Ruby has been installed in a path with spaces (e.g. (({C:\Program Files})))

Since this is presented to the user as (({gem install})) error, a deeper investigation revealed:

Generated Makefile contains a reference to (({RUBY})) that is not quoted, resulting in errors like this:

 V:\User Name\ruby-2.0.0dev-i386-mingw32\lib\ruby\gems\2.0.0\gems\json-1.7.5\ext\json\ext\generator>make
 generating generator-i386-mingw32.def
 /bin/sh: V:/User: No such file or directory
 make: *** [generator-i386-mingw32.def] Error 127

This can be easily solved by doing:

 ruby = #{$ruby.quote}

The second issue is more complicated, as is caused by (({$LIBPATH})) and (({libdir})):

 linking shared-object json/ext/generator.so
 gcc.exe: error: Name/ruby-2.0.0dev-i386-mingw32/lib: No such file or directory
 make: *** [generator.so] Error 1

While (({LIBPATH})) is being built using (({libpathflag})) method, this method fails to detect path with spaces since it uses (({LIBPATHFLAG})) from rbconfig

Since mkmf finds the above mentioned key in (({RbConfig::CONFIG})), it never attempts to use -L"%s" alternative:

  LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L"%s"'

Now, (({libpathflag})) do not detect a path with spaces because the array of options given are (({[".", "$(libdir)"]})).

In the case of Windows, LIBPATHFLAG shouldn't be hardcoded, or at least should always quote strings, considering Ruby can be relocated.

Nobu, Usa, Hiroshi, what are your thoughts about this?

I'm looking for some feedback before I start some modifications.

Thank you in advance for your time.
=end


-- 
http://bugs.ruby-lang.org/

In This Thread

Prev Next