From: merch-redmine@... Date: 2019-07-25T17:24:50+00:00 Subject: [ruby-core:93912] [Ruby master Bug#12643] When generating exts.mk need to escape newlines for @echo Issue #12643 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed This appears to be fixed in the master branch, which currently does: ``` err and err.scan(/.+/) do |ee| mf.puts %Q<\t@echo "\t#{ee.gsub(/["`$^]/, '\\\\\\&')}"> end ``` Since `/.+/` is not a multiline regular expression, newlines should not be included in `ee`. ---------------------------------------- Bug #12643: When generating exts.mk need to escape newlines for @echo https://bugs.ruby-lang.org/issues/12643#change-80012 * Author: davispuh (D��vis Mos��ns) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.0dev (2016-08-01 trunk 55789) [x64-mingw32] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Currently if some extension fails to compile then whole build will break because of syntax error in exts.mk With MinGW ~~~ exts.mk:1526: *** missing separator. Stop. make: *** [uncommon.mk:217: build-ext] Error 2 ~~~ With nmake (MSVC) ~~~ exts.mk(1528) : fatal error U1034: syntax error : separator missing Stop. NMAKE : fatal error U1077: '"D:\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.EXE"' : return code '0x2' Stop. ~~~ This happens because newline isn't escaped for @echo in generated exts.mk ~~~ note: @echo "*** Following extensions failed to configure:" @echo "../../../../ext/-test-/file/extconf.rb:458: The compiler failed to generate an executable file. You have to install development tools first. " ~~~ I've attached a patch which fixes this. ---Files-------------------------------- 0001-Escape-newlines-for-echo-when-generating-exts.mk.patch (761 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: