From owner-freebsd-questions@FreeBSD.ORG Mon Dec 9 19:16:01 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29AAD72E for ; Mon, 9 Dec 2013 19:16:01 +0000 (UTC) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA36217EA for ; Mon, 9 Dec 2013 19:16:00 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id k14so3825989wgh.34 for ; Mon, 09 Dec 2013 11:15:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:date:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=QJhQpBLcKmIOC2HcBeWGqMawTj4PR0qB93Bp/VVNFxc=; b=G/v44+KFtJShsMMsWHAIUshPxZqGmBFXkkHH4RTv3F0sT547llLBNF1Qoqd7YFe6eZ y8idVT/10t+3v1W8EYkVjTLOGxQqMNNHyHwKHNfWsRHKlDgoxcFDnpJnYee6MLoofGSg fTPBdDIFOLE6PwwWZ2xtoc3TLova7HwhqHQYv/ciC5DOMD3vnfgEpF2CFNuVhoLZo4BZ kDaKjd7zRMOc4vfJK95nOTJSdnkkcUUORcht/l5MeMkXu2JT/QPmwmfeVx897hp3/uyF U928Fn2BuHpSdmyJxTvqqaQzPp/Fq7k6BBz/EkjzCdKpnxBHasJFzBcTsJOhU9Nf6Xzw R/gw== X-Received: by 10.194.161.233 with SMTP id xv9mr5270432wjb.79.1386616559174; Mon, 09 Dec 2013 11:15:59 -0800 (PST) Received: from localhost (client-86-29-171-142.brhm-bam-3.adsl.virginm.net. [86.29.171.142]) by mx.google.com with ESMTPSA id fj8sm19792593wib.1.2013.12.09.11.15.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Dec 2013 11:15:57 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Tue, 10 Dec 2013 19:15:50 +0000 From: Peter Harrison Date: Tue, 10 Dec 2013 19:15:50 +0000 To: Roland Smith Subject: Re: How to compile a port with GCC instead of clang Message-ID: <20131210191550.GA1802@thinkpad.piggybox> References: <20131208114706.GA56474@slackbox.erewhon.net> <20131209204601.GA1948@thinkpad.piggybox> <20131208225208.GA59009@slackbox.erewhon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20131208225208.GA59009@slackbox.erewhon.net> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: questions@freebsd.org, Peter Harrison X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 19:16:01 -0000 Sunday, 8 December 2013 at 23:52:08 +0100, Roland Smith said: > On Mon, Dec 09, 2013 at 08:46:01PM +0000, Peter Harrison wrote: > > Sunday, 8 December 2013 at 12:47:06 +0100, Roland Smith said: > > > On Sun, Dec 08, 2013 at 10:54:55AM +0000, Peter Harrison wrote: > > > > Hello list. > > > >=20 > > > > How can I compile www/chromium with GCC instead of clang? > > > >=20 > > > > If I compile it with clang I end up with a broken binary that won't= render > > > > pages properly. If I compile it with gcc it works flawlessly. > > > >=20 > > > > But the knob to choose gcc has been removed in the recent updates. = So now I > > > > have a broken chromium. How can I compile it with gcc instead? > > >=20 > > > Add the following to your /etc/make.conf: > > >=20 > > > .if ${.CURDIR:M*/www/chromium} > > > USE_GCC?=3Dyes > > > .endif > > >=20 > > > See /usr/ports/Mk/bsd.gcc.mk for the possible values of USE_GCC. > >=20 > > Thanks Roland. > >=20 > > That worked, but sadly seems to have just uncovered why the gcc option = was removed. Built with clang my chromium still doesn't function properly. = Attempting to build with gcc produces the error below. > >=20 > > Anyone got any idea either how to build a functioning chromium with cla= ng, or how to successfully build it with gcc? >=20 > You would have to remove the offending options from the chromium build sy= stem. > Grep will tell you where to find them, I guess. >=20 > I'm not familiar with ninja or gyp, but it seems like it is still using c= lang options > when using gcc. Maybe you need to add something to GYP_DEFINES in the port > Makefile, like use_gcc=3D1? There doesn't seem to be anything related in > third_party/lzma_sdk/lzma_sdk.gyp Thanks Roland. Changing the GYP_DEFINES also makes it attempt to compile wi= th gcc, but fail in the same place. I'm in the same place on gyp and ninja, but I'll have a tinker. Thanks anyway. Peter. >=20 > > Attempting to build with gcc I get: > >=20 > > [2/12492] CC obj/third_party/lzma_sdk/lzma_sdk.7zAlloc.o > > FAILED: gcc46 -MMD -MF obj/third_party/lzma_sdk/lzma_sdk.7zAlloc.o.d -D= ANGLE_DX11 -D_FILE_OFFSET_BITS=3D64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM= _BUILD -DUSE_DEFAULT_RENDER_THEME=3D1 -DUSE_LIBJPEG_TURBO=3D1 -DUSE_NSS=3D1= -DUSE_X11=3D1 -DENABLE_ONE_CLICK_SIGNIN -DGTK_DISABLE_SINGLE_INCLUDES=3D1 = -DUSE_XI2_MT=3D2 -DENABLE_REMOTING=3D1 -DENABLE_WEBRTC=3D1 -DUSE_PROPRIETAR= Y_CODECS -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIF= ICATIONS -DENABLE_GPU=3D1 -DENABLE_EGLIMAGE=3D1 -DENABLE_TASK_MANAGER=3D1 -= DENABLE_EXTENSIONS=3D1 -DENABLE_PLUGIN_INSTALLATION=3D1 -DENABLE_PLUGINS=3D= 1 -DENABLE_SESSION_SERVICE=3D1 -DENABLE_THEMES=3D1 -DENABLE_BACKGROUND=3D1 = -DENABLE_AUTOMATION=3D1 -DENABLE_GOOGLE_NOW=3D1 -DCLD_VERSION=3D1 -DENABLE_= FULL_PRINTING=3D1 -DENABLE_PRINTING=3D1 -DENABLE_SPELLCHECK=3D1 -DENABLE_CA= PTIVE_PORTAL_DETECTION=3D1 -DENABLE_MANAGED_USERS=3D1 -D_7ZIP_ST -D_LZMA_PR= OB32 -DNDEBUG -DOFFICIAL_BUILD -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=3D= 0 -I../../third_party/lzma_sdk -fstack-protector --param=3Dssp-buffer-size= =3D4 -pthread -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -= Wno-missing-field-initializers -fvisibility=3Dhidden -pipe -fPIC -Wheader-h= ygiene -Wno-char-subscripts -Wno-unused-function -Wno-covered-switch-defaul= t -Wstring-conversion -Wno-c++11-narrowing -Wno-reserved-user-defined-liter= al -Wno-deprecated-register -momit-leaf-frame-pointer -fcolor-diagnostics -= Wno-format -m32 -mmmx -O2 -fdata-sections -ffunction-sections -fno-unwind-t= ables -fno-asynchronous-unwind-tables -O2 -pipe -fno-stack-protector -Wno-u= nknown-warning-option -Wl,-rpath=3D/usr/local/lib/gcc46 -fno-strict-aliasin= g -c ../../third_party/lzma_sdk/7zAlloc.c -o obj/third_party/lzma_sdk/lzma= _sdk.7zAlloc.o > > cc1: error: unrecognized command line option '-Wheader-hygiene' > > cc1: error: unrecognized command line option '-Wstring-conversion' > > cc1: error: unrecognized command line option '-fcolor-diagnostics' > > cc1: warning: unrecognized command line option "-Wno-unknown-warning-op= tion" [enabled by default] > > cc1: warning: unrecognized command line option "-Wno-deprecated-registe= r" [enabled by default] > > cc1: warning: unrecognized command line option "-Wno-reserved-user-defi= ned-literal" [enabled by default] > > cc1: warning: unrecognized command line option "-Wno-c++11-narrowing" [= enabled by default] > > cc1: warning: unrecognized command line option "-Wno-covered-switch-def= ault" [enabled by default] > > ninja: build stopped: subcommand failed. > > *** [do-build] Error code 1 > >=20 > > Stop in /usr/ports/www/chromium. > > *** [build] Error code 1 > >=20 > >=20 > > Many thanks, > >=20 > >=20 > >=20 > >=20 > > Peter. > >=20 > >=20 > >=20 > > >=20 > > >=20 > > > Roland > > > --=20 > > > R.F.Smith http://rsmith.home.xs4all= =2Enl/ > > > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much apprecia= ted] > > > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A= 725) > >=20 >=20 > --=20 > R.F.Smith http://rsmith.home.xs4all.nl/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)