From: "arton (Akio Tajima)" Date: 2013-12-05T02:41:27+09:00 Subject: [ruby-core:58859] [ruby-trunk - Bug #9213] mkmf.rb emits invalid destination directory name for mswin32/64 Issue #9213 has been updated by arton (Akio Tajima). I think the DESTDIR setting is for DOS like prefix. So this is the patch. --- mkmf.rb.org 2013-12-05 02:38:38.508908700 +0900 +++ mkmf.rb 2013-12-05 02:38:59.788774499 +0900 @@ -1849,6 +1849,7 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARA prefix = mkintpath(CONFIG["prefix"]) if destdir = prefix[$dest_prefix_pattern, 1] mk << "\nDESTDIR = #{destdir}\n" + prefix = prefix[destdir.size..-1] end mk << "prefix = #{with_destdir(prefix).unspace}\n" CONFIG.each do |key, var| ---------------------------------------- Bug #9213: mkmf.rb emits invalid destination directory name for mswin32/64 https://bugs.ruby-lang.org/issues/9213#change-43414 Author: arton (Akio Tajima) Status: Open Priority: Normal Assignee: Category: lib Target version: current: 2.1.0 ruby -v: ruby 2.0.0p353 (2013-11-22) [i386-mswin32_100] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN The install process of traditional extended library (=non gem) uses extconf.rb for creating Makefile and install the library by (n)make install. However it does not work correctly because of FileUtil.mkdir met bad directory name as 'c:c:/...'. This is caused by DESTDIR and prefix combination. When one does not specify DESTDIR, rbconfig.rb create it as 'DESTDIR = TOPDIR && TOPDIR[/\A[a-z]:/i] || '' unless defined? DESTDIR' #=> 'C:' or 'D:'. By the other hand CONFIG['prefix'] is (TOPDIR || DESTDIR + '/usr') so the prefixdir also contains 'c:' or 'd:' ... The definition for install directories in mkmf.rb is defined as both DESTDIR and CONFIG['prefix'] directory for example '$(DESTDIR)$(vendorarchdir)$(target_prefix)'. It causes the double drive letter name 'c:c:...'. While there are some workarounds as using setup.rb or gem, it's harmful for the testing phase of extended libraries. -- http://bugs.ruby-lang.org/