From owner-freebsd-ports@FreeBSD.ORG Wed Mar 7 12:11:54 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96540106566C for ; Wed, 7 Mar 2012 12:11:54 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1721A8FC17 for ; Wed, 7 Mar 2012 12:11:53 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so4375748wib.13 for ; Wed, 07 Mar 2012 04:11:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=SGWccUObqfoNmrAVQdZTxb8yqTyRVAoq0gS5f4p5Smo=; b=hCci8i98LubeEOv078Zd72ZmFe0trw3dU5gbvn0YzdFAF/iYIyihvoPMgtWKFbZGVB Cw2Ak3jWoTf8057vLrUVmzwr3ViGfNekjXadp1GBo7SR8hsY306WPzdzPBYPz5Ag0fhM NKgaYsTUw3R3Fc81W7WLYWcz7a9CsArclDPDpPB7VmKYUg5rJePLsrpkQ3hm6Z4EoiVG BtF1Gg32Zd2HTpO7G44kBDwlrfMdAbsj+Zgr2XBIkNkkmrKqlZDVMoRgWWwo+M1B9fya PGrC6FaBeyvDQArusP42juH+x3GN6V+Z7ANpAJxhdbhzyiALHX4iNCcjLc6uhEivslqP 0nPg== MIME-Version: 1.0 Received: by 10.180.92.165 with SMTP id cn5mr4547929wib.1.1331122312976; Wed, 07 Mar 2012 04:11:52 -0800 (PST) Received: by 10.180.94.42 with HTTP; Wed, 7 Mar 2012 04:11:52 -0800 (PST) Date: Wed, 7 Mar 2012 12:11:52 +0000 Message-ID: From: "b. f." To: freebsd-ports@freebsd.org, Gautam , dinoex@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: 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: Wed, 07 Mar 2012 12:11:54 -0000 > Adding dinoex (Maintainer of graphics/png). > > On Mon, Feb 27, 2012 at 9:51 PM, Gautam wrote: > > > > > > >> Still didnt work for me -- did another buildworld and retried to check if > > there was something else messed up. > > > > I am moving back to base gcc for now. Waiting for redports lang/gcc > > backend to come up ;) and will check this again on 8-stable as well. > > > > > > > > I have tested this on three systems now -- 8.2-REL (fresh), 9.0-REL(fresh) > and 9.0-STABLE (original system). The problem is visible on all of these > releases. I have now root-caused this problem (that graphics/png does not > build with lang/gcc on 8.2 or 9.0), proposed solution solves it on all > three systems. > > Similar PRs were found: 155334 and 141238. > > Solution is to add -lssp_nonshared to LDADD in > work/libpng-1.4.8/scripts/makefile.freebsd. > > LDADD+= -lm -lz -lssp_nonshared > > However, I suppose this be conditional on OSVERSION >= 800000 so that it > doesnt break older FreeBSD releases but I am not sure of the final solution > to this -- maybe add a conditional patch ? How is that usually done? > > Should I file a PR for this? There are some unresolved problems with stack protection, but you should not have to encounter them when building this port. 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. 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. I have been building graphics/png in this way for years. You can and should dispense with the libmap.conf additions, the hardcoded CC, CXX, and CPP in make.conf, etc. b.