From owner-freebsd-ports@FreeBSD.ORG Wed Feb 22 04:15:51 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 02380106566C for ; Wed, 22 Feb 2012 04:15:51 +0000 (UTC) (envelope-from execve@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id AD3898FC14 for ; Wed, 22 Feb 2012 04:15:49 +0000 (UTC) Received: by iaeo4 with SMTP id o4so13274340iae.13 for ; Tue, 21 Feb 2012 20:15:49 -0800 (PST) Received-SPF: pass (google.com: domain of execve@gmail.com designates 10.50.203.66 as permitted sender) client-ip=10.50.203.66; Authentication-Results: mr.google.com; spf=pass (google.com: domain of execve@gmail.com designates 10.50.203.66 as permitted sender) smtp.mail=execve@gmail.com; dkim=pass header.i=execve@gmail.com Received: from mr.google.com ([10.50.203.66]) by 10.50.203.66 with SMTP id ko2mr24051905igc.7.1329884149559 (num_hops = 1); Tue, 21 Feb 2012 20:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=WdK3GYVYcPfmBn0cXx8eicGkmqC3cU5PVy+XKYqAb4U=; b=Ixea51WrTxK1Xj47q/O/44UzYsIXp4q5+v87aGTc1s2JzYEztTsbMSvPnlILJHxu3i 3fIBajK5baGeYMYqoEI/NimAsyTAh11lc4+EEtXIMnRiWdhEYWL+Zj9k9EHIsITWBeqA ys3D9nHwiBgVBD0owGCPfM4YG83o36Tz/1iRM= MIME-Version: 1.0 Received: by 10.50.203.66 with SMTP id ko2mr19432996igc.7.1329884149474; Tue, 21 Feb 2012 20:15:49 -0800 (PST) Sender: execve@gmail.com Received: by 10.231.102.9 with HTTP; Tue, 21 Feb 2012 20:15:49 -0800 (PST) In-Reply-To: References: Date: Wed, 22 Feb 2012 09:45:49 +0530 X-Google-Sender-Auth: QDxT8sgNIhuG0233-8ptBtGewzs Message-ID: From: Gautam To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: graphics/png does not build with lang/gcc X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 04:15:51 -0000 Hi, Reminder - any pointers on this one? Including Doug who had posted similar problem in 2010. On Sat, Feb 18, 2012 at 4:17 PM, Gautam wrote: > Hi, > > I am running GENERIC on > > FreeBSD 9.0-STABLE FreeBSD 9.0-STABLE #2: Mon Jan 30 04:18:20 IST 2012 > > with the tree csupped just before the build. > > I setup lang/gcc as per > http://www.freebsd.org/doc/en/articles/custom-gcc/article.html > > added following to /etc/make.conf > CC=gcc46 > CXX=g++46 > CPP=cpp46 > > and the following to /etc/libmap.config > libgcc_s.so.1 gcc46/libgcc_s.so.1 > libgomp.so.1 gcc46/libgomp.so.1 > libobjc.so.3 gcc46/libobjc.so.2 > libssp.so.0 gcc46/libssp.so.0 > libstdc++.so.6 gcc46/libstdc++.so.6 > > > When I tried to rebuild some ports, I found a problem with linking > graphics/png. > > I found a similar problem mentioned in > http://lists.freebsd.org/pipermail/freebsd-ports/2010-June/062166.html* > *but no conclusion to the same. > > # idprio 31 make > ===> License check disabled, port has not defined LICENSE > ===> Found saved configuration for png-1.4.8 > ===> Extracting for png-1.4.8 > => SHA256 Checksum OK for libpng-1.4.8.tar.xz. > => SHA256 Checksum OK for libpng-1.4.8-apng.patch.gz. > ..... > gcc46 -fpic -DPIC -O2 -pipe -march=pentium4 -fno-strict-aliasing > -march=pentium4 -I. -std=gnu99 -fstack-protector -c pngpread.c -o > pngpread.So > gzip -cn libpng.3 > libpng.3.gz > gzip -cn libpngpf.3 > libpngpf.3.gz > gzip -cn png.5 > png.5.gz > gcc46 -O2 -pipe -march=pentium4 -fno-strict-aliasing -march=pentium4 -I. > -std=gnu99 -fstack-protector -c pngtest.c > building static png library > building shared library libpng.so.6 > ranlib libpng.a > pngread.So: In function `png_create_read_struct_2': > pngread.c:(.text+0x4e7): undefined reference to `__stack_chk_fail_local' > pngrutil.So: In function `png_inflate': > pngrutil.c:(.text+0x166): undefined reference to `__stack_chk_fail_local' > pngrutil.So: In function `png_decompress_chunk': > pngrutil.c:(.text+0x6e6): undefined reference to `__stack_chk_fail_local' > pngrutil.So: In function `.L69': > pngrutil.c:(.text+0x90f): undefined reference to `__stack_chk_fail_local' > pngrutil.So: In function `png_handle_cHRM': > pngrutil.c:(.text+0x1431): undefined reference to `__stack_chk_fail_local' > pngrutil.So:pngrutil.c:(.text+0x19d9): more undefined references to > `__stack_chk_fail_local' follow > collect2: ld returned 1 exit status > *** Error code 1 > gcc46 -O2 -pipe -march=pentium4 -fno-strict-aliasing -march=pentium4 -I. > -std=gnu99 -fstack-protector -L. -static -o pngtest pngtest.o -lpng -lz -lm > 1 error > *** Error code 1 > > Stop in /usr/ports/graphics/png. > *** Error code 1 > > Stop in /usr/ports/graphics/png. > --- > I have seen different workarounds for this online for e.g, SSP_CFLAGS= in /etc/make.conf or patching /etc/rc.d/ldconfig to pick up /usr/local/lib/gcc46 first but somehow these do not seem clean enough. Or is it a straightforward port specific problem -- that needs to be fixed in graphics/png. I suspect that I am not alone in wanting to build ports with lang/gcc, so how are others avoiding this situation? Thanks in advance! Gautam