From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 8 08:40:02 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 332E1106566B for ; Fri, 8 Jul 2011 08:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 103DA8FC18 for ; Fri, 8 Jul 2011 08:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p688e1Rg057710 for ; Fri, 8 Jul 2011 08:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p688e17h057709; Fri, 8 Jul 2011 08:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 8 Jul 2011 08:40:01 GMT Resent-Message-Id: <201107080840.p688e17h057709@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C46F0106566B for ; Fri, 8 Jul 2011 08:31:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 9AB728FC13 for ; Fri, 8 Jul 2011 08:31:01 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p688V12u034623 for ; Fri, 8 Jul 2011 08:31:01 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p688V1B1034622; Fri, 8 Jul 2011 08:31:01 GMT (envelope-from nobody) Message-Id: <201107080831.p688V1B1034622@red.freebsd.org> Date: Fri, 8 Jul 2011 08:31:01 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/158722: [patch] devel/gobject-introspection does not build if CC is not cc X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2011 08:40:02 -0000 >Number: 158722 >Category: ports >Synopsis: [patch] devel/gobject-introspection does not build if CC is not cc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 08 08:40:01 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_8 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu May 19 21:34:59 CEST 2011 root@mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8 amd64 >Description: The post-patch: section of devel/gobject-introspection makes a supstitution of cc in the file giscanner/sourcescanner.py. For easy reading I will assume CC="XX XY" Line 237: for filename in filenames: if (filename.endswith('.c') or filename.endswith('.cpp') or filename.endswith('.cc') or filename.endswith('.cxx')): filename = os.path.abspath(filename) self._scanner.lex_filename(filename) else: headers.append(filename) Turns to: for filename in filenames: if (filename.endswith('.c') or filename.endswith('.cpp') or filename.endswith('.XX YY') or filename.endswith('.cxx')): filename = os.path.abspath(filename) self._scanner.lex_filename(filename) else: headers.append(filename) I think it's clear why that isn't a good idea. The next affected line is 273: cpp_args = ['cc', '-E', '-C', '-I.', '-'] cpp_args += self._cpp_options proc = subprocess.Popen(cpp_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) Turns to: cpp_args = ['XX YY', '-E', '-C', '-I.', '-'] cpp_args += self._cpp_options proc = subprocess.Popen(cpp_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) However the subprocess.Popen constructor requires the following form: cpp_args = ['XX', 'YY', '-E', '-C', '-I.', '-'] >How-To-Repeat: Build with no-default CC, to trigger a build fail use CC with spaces. >Fix: The attached patch causes line 239 no longer to be touched and performs the correct substitution for subprocess.Popen in line 273. Patch attached with submission follows: diff -Nur gobject-introspection.orig/Makefile gobject-introspection/Makefile --- gobject-introspection.orig/Makefile 2011-07-08 09:36:31.000000000 +0200 +++ gobject-introspection/Makefile 2011-07-08 10:29:54.000000000 +0200 @@ -40,11 +40,8 @@ MAN1= g-ir-compiler.1 g-ir-generate.1 g-ir-scanner.1 -.include - post-patch: - @${REINPLACE_CMD} -e 's|'cc'|'${CC:Q}'|g' \ + @${REINPLACE_CMD} -e "s|'cc'|'${CC:Q:C/[[:space:]]+/', '/g}'|g" \ ${WRKSRC}/giscanner/sourcescanner.py -.include - +.include >Release-Note: >Audit-Trail: >Unformatted: