Issue #12643 has been reported by Dvis Mosns.

----------------------------------------
Bug #12643: When generating exts.mk need to escape newlines for @echo
https://bugs.ruby-lang.org/issues/12643

* Author: Dvis Mosns
* Status: Open
* Priority: Normal
* Assignee: 
* 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: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>