From owner-freebsd-ports@FreeBSD.ORG Sun May 27 15:29:34 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B13EF1065670; Sun, 27 May 2012 15:29:34 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 51EE48FC14; Sun, 27 May 2012 15:29:34 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 9D32A40008; Sun, 27 May 2012 17:29:33 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 921D040007; Sun, 27 May 2012 17:29:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (h-45-105.a163.priv.bahnhof.se [94.254.45.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 69D7140006; Sun, 27 May 2012 17:29:32 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3W0lVh2Gj7z8ggx; Sun, 27 May 2012 17:29:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id IABEpu97Ga43; Sun, 27 May 2012 17:29:29 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [10.1.0.4]) by mx.daemonic.se (Postfix) with ESMTPS id 3W0lVd682bz8ggv; Sun, 27 May 2012 17:29:29 +0200 (CEST) Received: from [IPv6:2001:470:dca9:1::4] (vivi.daemonic.se [IPv6:2001:470:dca9:1::4]) by mail.daemonic.se (Postfix) with ESMTPSA id 3W0lVd5sCfz9Ctq; Sun, 27 May 2012 17:29:29 +0200 (CEST) Message-ID: <4FC24859.3090401@daemonic.se> Date: Sun, 27 May 2012 17:29:29 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Oliver Pinter References: <4FC1082A.9090801@acsalaska.net> <4FC112A1.7080600@acsalaska.net> <4FC128C6.1020902@acsalaska.net> <4FC1FCF9.4090305@daemonic.se> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: ports@freebsd.org, Mel Flynn , x11@freebsd.org Subject: Re: libX11 and clang: compile error 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: Sun, 27 May 2012 15:29:34 -0000 On 2012-05-27 16:54, Oliver Pinter wrote: > On 5/27/12, Niclas Zeising wrote: >> On 2012-05-26 21:06, Oliver Pinter wrote: >>> On 5/26/12, Mel Flynn wrote: >>>> On 26-5-2012 20:40, Oliver Pinter wrote: >>>>> On 5/26/12, Mel Flynn wrote: >>>>>> On 26-5-2012 19:17, Oliver Pinter wrote: >>>>>>> I think src.conf is relevant, while it changes the system behavior, >>>>>>> as >>>>>>> changed the default cc from gcc-4.2 to clang. >>>>>> >>>>>> Thinking it doesn't make it so. Run: >>>>>> grep _WITHOUT_SRCCONF /usr/share/mk/*.mk >>>>>> >>>>>> Then investigate. >>>>>> Setting CC in /etc/src.conf has *no effect on CC passed to the ports*. >>>>>> Really. It does not. >>>>>> The file that can do that is /etc/make.conf. >>>>>> Another way is setting CC in your environment variables, through >>>>>> /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what >>>>>> not. >>>>>> >>>>>> In order to debug your issue, you should provide the output of what >>>>>> make >>>>>> thinks CC and CPP are and backtrack where they are set. >>>>>> Start with: >>>>>> make -C /usr/ports/x11/libX11 -V CC -V CPP >>>>>> -- >>>>>> Mel >>>>>> >>>>> >>>>> After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and >>>>> c++ has changed: >>>> >>>> See ports/166373. >>>> >>>> Also, the fact that your /usr/bin/cpp == clang-cpp is relevant! >>>> Especially if you report: >>>>> Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ... >>>> >>>> -- >>>> Mel >>>> >>> >>> this is a workaround, see the attached file >> >> This is a known issue and is being looked into. The issue is that clang >> cpp and gcc cpp behaves differently wrt. -traditional. >> We will try to find a general approach that works for all xorg ports >> that use cpp -traditional, probably regardless of the regular compiler >> used. >> >> Regards! >> -- >> Niclas Zeising >> > > Hi! > > Attached a patch - the idea mostly based on ports/166373, but extended > with runtime compiler checking. > > With this patch the xorg related ports building fine. A slightly different approach was just committed to the FreeBSD xorg development repoistory[1]. Regards! -- Niclas Zeising [1] https://trillian.chruetertee.ch/svn/ports/trunk