From: "raylinn@... (ray linn)" Date: 2012-10-15T15:01:45+09:00 Subject: [ruby-core:47998] [Backport93 - Backport #7163][Open] Chomp problem in pkg_config of mkmf.rb (ruby 1.9.3 P286) Issue #7163 has been reported by raylinn@gmail.com (ray linn). ---------------------------------------- Backport #7163: Chomp problem in pkg_config of mkmf.rb (ruby 1.9.3 P286) https://bugs.ruby-lang.org/issues/7163 Author: raylinn@gmail.com (ray linn) Status: Open Priority: Normal Assignee: Category: Target version: when compiled the ext packages under mingw64 + MSYS, mkmf reports error like this: "gcc -o conftest -Ic:/ruby64/include/ruby-1.9.1/x64-mingw32 -Ic:/ruby64/include/ruby-1.9.1/ruby/backward -Ic:/ruby64/include/ruby-1.9.1 -I. -I./.. -D_FILE_OFFSET_BITS=64 -O2 -finline-functions -I/usr/local/include -D__USE_MINGW_ANSI_STDIO -IC:/msys/1.0/local/include conftest.c -L. -Lc:/ruby64/lib -L. -L/usr/local/lib -LC:/msys/1.0/local/lib -lssl -lcrypto -lx64-msvcrt-ruby191 -lshell32 -lws2_32 -limagehlp " gcc: fatal error: no input files compilation terminated. the root cause is several enter characters are added in this compile command, these enters are from the pkg_config in mkmf.rb, add chomp in the following line in pkg_config function, issue is fixed. cflags = get['cflags'] ldflags = get['libs'] libs = get['libs-only-l'] as cflags = get['cflags'].chomp ldflags = get['libs'].chomp libs = get['libs-only-l'].chomp the attached is mkmf.log before/after the change. -- http://bugs.ruby-lang.org/