From owner-freebsd-gnome@FreeBSD.ORG Mon Jul 25 04:14:20 2011 Return-Path: Delivered-To: freebsd-gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58CB51065670 for ; Mon, 25 Jul 2011 04:14:20 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 369C58FC0C for ; Mon, 25 Jul 2011 04:14:19 +0000 (UTC) Received: by pzk5 with SMTP id 5so24082508pzk.17 for ; Sun, 24 Jul 2011 21:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=sEgBtaqnCEUmoZa3UWv6JMmP5dCrhbpvQLQY7Sy8zXw=; b=UhGUb1/pCwVAueK80TBGoMsTPOlXyVESygHPkwIpTxciIRZjUUkQVDES3ZCP/2RXa/ yLYb65Uqxbm0KvBtwM7678BN2nGMh7qR+mfrF98mlCxnetq2JEvH3nw4MpqlNQNTtnuu P+1hq2kRI7v16/k2p+QfJYqPLXuA3NtmVnavs= MIME-Version: 1.0 Received: by 10.68.51.165 with SMTP id l5mr3178383pbo.439.1311565522757; Sun, 24 Jul 2011 20:45:22 -0700 (PDT) Received: by 10.68.40.72 with HTTP; Sun, 24 Jul 2011 20:45:22 -0700 (PDT) Date: Mon, 25 Jul 2011 03:45:22 +0000 Message-ID: From: "b. f." To: freebsd-gnome@FreeBSD.org, "Sameer R. Manek" Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: compiling glib20 in ports with gcc v4.6.2 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2011 04:14:20 -0000 > .if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc46) > CC=gcc46 > CXX=g++46 > CPP=cpp46 > CFLAGS+=-mssse3 > CPUTYPE?=core2 > LD=/usr/local/bin/ld > .endif Just use USE_GCC=4.6 with your cpu-specific additions to CFLAGS, and the latest patch from PR ports/155201, it will be easier. As it is, you are missing all of the other devel/binutils utilities that are set by USE_BINUTILS (which is implied by USE_GCC=4.6); the important additions to the CFLAGS and LDFLAGS in bsd.gcc.mk that will point the resulting binaries to the libraries in /usr/local/lib/gcc46, rather than the older incompatible ones with identical names and major version numbers in the base system; and the registering of lang/gcc46 as a runtime dependency in the package database. Also, as you have seen, it is a known, long-standing problem with ports that use devel/libtool, that they will often break if devel/libtool is not built with the same compiler and toolchain as the port. A simple, although not very convenient, way to fix this is to rebuild devel/libtool with appropriate compiler before building such ports (although, in your case, you will have to ensure that devel/libtool is not always built with USE_GCC=4.6, or you will break your package accounting system with circular dependencies). A proper solution is more complicated, involving either a substantially-modified libtool, or separate per-compiler libtool ports, or rebuilding a temporary libtool during the build of each port that uses it. Such a solution may be introduced into Ports as we prepare for wider use of multiple compilers and toolchains, but for now you will have to work around the problem. b.