X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=yXE FZn2OL1vWj35WqJZx9NQPlM+0NAHjyB72Cc4c1m9EaWuIDhIvspqroXD7dU1V6WN 9Linot+EscqvDoVPXEBJMiSEEv2Dv8hoHwJ1866q3UYUJijK08kJCy1NNPpvdJ+8 AS6hSeEWfsXYeTD+9gkgoxzVxJFNSwQbLgi4XGTY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=oGq3DQvDU c3J2k7VqyzDCszIgKQ=; b=KflCeLgl9d3yL0gb1IXtfzkbKcsprx9y/DPEKMxyZ 642J3q2g6kY/XC8sl6ZstQog4Rltsh4ac/zpNDuLksJbARChRL6H+pG1r90kD89Q 3R/uDbwqnbMCpXMjtR5MR+7dRCteBFtiuIVi0Z5E3KtTGgWYa7hwACqHDZj0qeWQ kg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: emea01-db3-obe.outbound.protection.outlook.com From: Denis Washington To: "cygwin AT cygwin DOT com" Subject: GCC / make escaping differences Date: Fri, 13 Mar 2015 09:50:31 +0000 Message-ID: authentication-results: cygwin.com; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR05MB0761; x-forefront-antispam-report: BMV:1;SFV:NSPM;SFS:(10019020)(979002)(6009001)(229853001)(64706001)(40100003)(2351001)(92566002)(50986999)(54356999)(102836002)(77156002)(66066001)(2900100001)(74316001)(62966003)(33656002)(2501003)(87936001)(75402003)(450100001)(86362001)(106356001)(46102003)(74482002)(122556002)(76576001)(2656002)(110136001)(107886001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB3PR05MB0761;H:DB3PR05MB0763.eurprd05.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5002009)(5005006);SRVR:DB3PR05MB0761;BCL:0;PCL:0;RULEID:;SRVR:DB3PR05MB0761; x-forefront-prvs: 05143A8241 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: denisw.de X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2015 09:50:31.2563 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ad881f14-eaa8-485d-ad61-b28111a91e12 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR05MB0761 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t2D9on3w031924 Hello, I tried to install the nokogiri Ruby gem today with a freshly installed Cygwin (and cygwin's ruby). Unfortunately, compilation of the native extension module fails with errors like: nokogiri.c:103:3: error: stray '\' in program rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATCHES), " ")); I suspected that this had something to do with the gcc command defined in the Makefile, which includes backslashes to escape quotes in -D values like this: -DNOKOGIRI_LIBXML2_PATH\=\"/home/.../2.9.2\" But here is the strange thing: if I copy the exact command displayed by make and run it directly in bash, it works flawlessly! I am completely puzzled. Is this some difference in how make and bash are interpreting escape sequences? Seems like a bug to me. The versions of make and bash are the most current as of today, i.e. GNU make 4.1 and bash 4.3.33. For reference, this is the complete command: gcc -I. -I/usr/include/ruby-2.0.0 -I/usr/include/ruby-2.0.0/ruby/backward -I/usr/include/ruby-2.0.0 -I. -DHAVE_XMLPARSEDOC -DHAVE_XSLTPARSESTYLESHEETDOC -DHAVE_EXSLTFUNCREGISTER -DHAVE_XMLHASFEATURE -DHAVE_XMLFIRSTELEMENTCHILD -DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -DHAVE_XMLRELAXNGSETVALIDSTRUCTUREDERRORS -DHAVE_XMLSCHEMASETVALIDSTRUCTUREDERRORS -DHAVE_XMLSCHEMASETPARSERSTRUCTUREDERRORS -I/home/Denis/.gem/ruby/gems/nokogiri-1.6.6.2/ports/x86_64-unknown-cygwin/libxslt/1.1.28/include -I/home/Denis/.gem/ruby/gems/nokogiri-1.6.6.2/ports/x86_64-unknown-cygwin/libxml2/2.9.2/include/libxml2 -DLIBXML_STATIC -I/home/Denis/.gem/ruby/gems/nokogiri-1.6.6.2/ports/x86_64-unknown-cygwin/libxml2/2.9.2/include/libxml2 -DLIBXML_STATIC -DNOKOGIRI_LIBXML2_PATH\=\"/home/Denis/.gem/ruby/gems/nokogiri-1.6.6.2/ports/x86_64-unknown-cygwin/libxml2/2.9.2\" -DNOKOGIRI_LIBXML2_PATCHES\=\"0001-Revert-Missing-initialization-for-the-catalog-module.patch\ 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch\" -DNOKOGIRI_LIBXSLT_PATH\=\"/home/Denis/.gem/ruby/gems/nokogiri-1.6.6.2/ports/x86_64-unknown-cygwin/libxslt/1.1.28\" -DNOKOGIRI_LIBXSLT_PATCHES\=\"0001-Adding-doc-update-related-to-1.1.28.patch\ 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch\ 0003-Initialize-pseudo-random-number-generator-with-curre.patch\ 0004-EXSLT-function-str-replace-is-broken-as-is.patch\ 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch\ 0007-Separate-function-for-predicate-matching-in-patterns.patch\ 0008-Fix-direct-pattern-matching.patch\ 0009-Fix-certain-patterns-with-predicates.patch\ 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch\ 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch\ 0014-Fix-for-bug-436589.patch\ 0015-Fix-mkdir-for-mingw.patch\" -ggdb -O2 -pipe -Wimplicit-function-declaration -g -DXP_UNIX -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DNOKOGIRI_USE_PACKAGED_LIBRARIES -o nokogiri.o -c nokogiri.c Regards, Denis Washington -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple