From owner-freebsd-ports@FreeBSD.ORG Thu Mar 8 04:59:11 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 01A141065676; Thu, 8 Mar 2012 04:59:11 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 62F1A8FC0C; Thu, 8 Mar 2012 04:59:10 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so70516wgb.31 for ; Wed, 07 Mar 2012 20:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=y9knK2tHa+rRTZl7vPa5A9oaQT79VBmT2hxRtb30eik=; b=TjVMEuXuPfYzUqFWTYxPTZcoNJbfejH4ASJQBTSe9r8390bBzI6O7OABoZokY19xr9 sfAYY6kiN5KK5ubq+xvGHx7zf8usT5ugET+lJ0xeNwyKBaP4BrEDQO7pytft9BV9ac62 INoLOLLE6rzDj5ObqhBxKiTp7jRn3MHhffc58waMUKGtxGodPvVoQu6Q4N+k6bvKoUbs vm/IFFLuj3O+h2QsBAbU+lvoS0iFspQyppU1A44ixdL8TI7Tc5aFF1xiHrEFshEkGx5T cX2eUTerzVsbrIMxY9ULFfNt6OciGpT8A3qtE1/7nKzAA5U7A6tqy5vZP6HT6XePe95p XI3g== MIME-Version: 1.0 Received: by 10.180.7.231 with SMTP id m7mr38818412wia.3.1331182749533; Wed, 07 Mar 2012 20:59:09 -0800 (PST) Received: by 10.180.94.42 with HTTP; Wed, 7 Mar 2012 20:59:09 -0800 (PST) In-Reply-To: <20120308034704.GD16364@lonesome.com> References: <20120308034704.GD16364@lonesome.com> Date: Thu, 8 Mar 2012 04:59:09 +0000 Message-ID: From: "b. f." To: freebsd-ports@FreeBSD.org, Mark Linimon Content-Type: text/plain; charset=ISO-8859-1 Cc: Gautam , dinoex@freebsd.org Subject: Re: graphics/png does not build with lang/gcc X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 04:59:11 -0000 On 3/8/12, Mark Linimon wrote: > On Wed, Mar 07, 2012 at 12:11:52PM +0000, b. f. wrote: >> The custom gcc article that you are attempting to use was written at >> a time when some of the related port Makefiles had some shortcomings >> that no longer exist, and is not the recommended way to use lang/gcc* >> for ports. > > Would you be interested in helping to update it? If you like, I can suggest a few changes. But I thought that it was primarily Martin's article, which he wrote when he was benchmarking perl with different toolchains. > >> For all but a handful of ports that lang/gcc* depends upon, or >> those that don't respect the toolchain-related variables, you can just >> install lang/gcc or lang/gcc46 and set USE_GCC=4.6 in your build >> environment, an included Makefile, or on the command line. > > Setting USE_* in e.g. /etc/make.conf is always incorrect, see: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html#USE-VARS > > You can wind up in the degenerate case maknig gcc46 depend upon itself. That is why I wrote: "... all but a handful of ports that lang/gcc* depends upon ...". The OP wanted to find a way to use lang/gcc* in a custom build of a port -- which, as you know from your own work, isn't well-supported in Ports right now. (We make an attempt to be flexible, and there is some infrastructure to do so, but many ports aren't tested with different toolchains. Some tinkering is inevitably involved if any substantial number of ports are built in this way.) The OP was willing to use invasive changes suggested by the custom gcc article. Therefore, I assumed that he wasn't interested in strictly adhering to our guidelines, and just wanted a pragmatic solution, which is what I offered to him. Setting USE_GCC in this case is safer and easier than what he was doing. I didn't intend to suggest that anyone make unqualified use of it in make.conf. There is already far too much abuse of that special file. b.