ports/182682: www/chromium : fix build with clang and GNU ar
Christoph Moench-Tegeder
cmt at burggraben.net
Sat Oct 5 12:20:00 UTC 2013
>Number: 182682
>Category: ports
>Synopsis: www/chromium : fix build with clang and GNU ar
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 05 12:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list