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. Fix: when using clang as compiler (GCC=off), force the use of base ar via CONFIGURE_ENV ("works for me"): Regards, Christoph--8NEhyWjaUjrKt46nPIiFFWhRDhEbkRcVHGioVNLUWFAzbRNz Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" 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 How-To-Repeat: just type make...
Responsible Changed From-To: freebsd-ports-bugs->freebsd-chromium Over to maintainer (via the GNATS Auto Assign Tool)
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"
State Changed From-To: open->closed Committed, thanks!
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