From cmt@elch.exwg.net  Sat Oct  5 12:17:53 2013
Return-Path: <cmt@elch.exwg.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id BF29556A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Oct 2013 12:17:53 +0000 (UTC)
	(envelope-from cmt@elch.exwg.net)
Received: from smtp.burggraben.net (base.exwg.net [IPv6:2a01:4f8:140:50a2::2])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 7D1EA2D42
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Oct 2013 12:17:53 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by smtp.burggraben.net (Postfix) with ESMTP id 2E90A6003CF
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Oct 2013 14:17:52 +0200 (CEST)
Received: from smtp.burggraben.net ([127.0.0.1])
	by localhost (ns.burggraben.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 5bOXaOEyaBS5 for <FreeBSD-gnats-submit@freebsd.org>;
	Sat,  5 Oct 2013 14:17:51 +0200 (CEST)
Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7b43:1:6a05:caff:fe01:aae9])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "elch.exwg.net", Issuer "Christoph Moench-Tegeder" (verified OK))
	by smtp.burggraben.net (Postfix) with ESMTPS
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Oct 2013 14:17:51 +0200 (CEST)
Received: by elch.exwg.net (Postfix, from userid 1000)
	id 72995312B1; Sat,  5 Oct 2013 14:17:51 +0200 (CEST)
Message-Id: <20131005121751.72995312B1@elch.exwg.net>
Date: Sat,  5 Oct 2013 14:17:51 +0200 (CEST)
From: Christoph Moench-Tegeder <cmt@burggraben.net>
Reply-To: Christoph Moench-Tegeder <cmt@burggraben.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: www/chromium : fix build with clang and GNU ar
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         182682
>Category:       ports
>Synopsis:       www/chromium : fix build with clang and GNU ar
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-chromium
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 05 12:20:00 UTC 2013
>Closed-Date:    Mon Oct 14 12:12:00 UTC 2013
>Last-Modified:  Mon Oct 14 12:20:02 UTC 2013
>Originator:     Christoph Moench-Tegeder
>Release:        FreeBSD 9.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD elch.exwg.net 9.2-RELEASE FreeBSD 9.2-RELEASE #11 r255911: Fri Sep 27 17:09:40 CEST 2013 cmt@elch.exwg.net:/usr/obj/usr/src/sys/ELCH amd64

www/chromium    chromium-29.0.1547.76
===> The following configuration options are available for chromium-29.0.1547.76:
     CODECS=on: Compile and enable patented codecs like H.264
     DEBUG=off: Install debug symbols
     GCC=off: Build Chromium with GCC 4.6+
     GCONF=on: GConf configuration backend support
     PULSEAUDIO=on: PulseAudio sound server support
     TEST=off: Build and/or run tests
===> Use 'make config' to modify these settings
devel/binutils  binutils-2.23.2
clang from base
  (FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610)

>Description:
	The chromium build picks up ar from PATH, which happens to have
    $LOCALBASE/bin/ listed before /usr/bin/ (no surprise so far).
    ld from clang does not like GNU ar files, so building with GCC=off
    fails with
: /usr/bin/ld:obj/third_party/ffmpeg/libffmpeg_yasm.a: file format not recognized; treating as linker script
: /usr/bin/ld:obj/third_party/ffmpeg/libffmpeg_yasm.a:1: syntax error
: clang++: error: linker command failed with exit code 1 (use -v to see invocation)
: [1576/11978] ACTION Generating resources from app/generated_resources.grd
: ninja: build stopped: subcommand failed.
: *** [do-build] Error code 1

    This does not happen when using gcc instead of clang.
>How-To-Repeat:
	just type make...
>Fix:
	when using clang as compiler (GCC=off), force the use of base ar via
	CONFIGURE_ENV ("works for me"):

Index: Makefile
===================================================================
--- Makefile	(revision 329444)
+++ Makefile	(working copy)
@@ -139,6 +139,7 @@
 .endif
 GYP_DEFINES+=	clang=1
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-clang
+CONFIGURE_ENV+= AR=/usr/bin/ar
 .if ${OSVERSION} >= 1000054
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-libc++
 .endif


Regards,
Christoph
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-chromium 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Oct 5 12:20:09 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182682 
State-Changed-From-To: open->closed 
State-Changed-By: rene 
State-Changed-When: Mon Oct 14 12:11:43 UTC 2013 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182682 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182682: commit references a PR
Date: Mon, 14 Oct 2013 12:11:31 +0000 (UTC)

 Author: rene
 Date: Mon Oct 14 12:11:22 2013
 New Revision: 330311
 URL: http://svnweb.freebsd.org/changeset/ports/330311
 
 Log:
   Allow building with clang when GNU ar (from devel/binutils) is installed
   and LOCALBASE/bin comes before /usr/bin in $PATH
   
   PR:		ports/182682
   Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net>
 
 Modified:
   head/www/chromium/Makefile
 
 Modified: head/www/chromium/Makefile
 ==============================================================================
 --- head/www/chromium/Makefile	Mon Oct 14 12:10:40 2013	(r330310)
 +++ head/www/chromium/Makefile	Mon Oct 14 12:11:22 2013	(r330311)
 @@ -140,6 +140,7 @@ CXX=		clang++
  .endif
  GYP_DEFINES+=	clang=1
  EXTRA_PATCHES+=	${FILESDIR}/extra-patch-clang
 +CONFIGURE_ENV+=	AR=/usr/bin/ar
  .endif
  
  .if ${OSVERSION} >= 1000052 && !exists(${LOCALBASE}/include/execinfo.h)
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: "Matthew D. Fuller" <fullermd@over-yonder.net>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/182682: www/chromium : fix build with clang and GNU ar
Date: Mon, 14 Oct 2013 07:11:49 -0500

 The better solution is probably to override AR directly, not just
 fiddle it in CONFIGURE_ENV.  I've been banging into this error, and I
 can successfully build by setting it on the command line: i.e.,
 
 % make AR=/usr/bin/ar
 
>Unformatted:
