From owner-freebsd-ports@FreeBSD.ORG Thu Jun 26 00:06:45 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA77352C for ; Thu, 26 Jun 2014 00:06:45 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A80C247A for ; Thu, 26 Jun 2014 00:06:45 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id w62so2878194wes.38 for ; Wed, 25 Jun 2014 17:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Lt9hK3PW1qbebsUAvYKyHRtPEHkYv4PmPNthsxKIpik=; b=jbEvIq7MH0Z0IdUChiuuXn2OgF5L/L1Y0527S1VlRIQpaSegwQCNLjETpW66sr1QNM 9ehAkHzAwkm/qBDVjHx674ZZA0f/Xxs83zMTQ29BTnmZZzCAfI8MmdnHlgAa9TbR5Wyn 1kPIGsrFk3m4xJJKi1SqniPD+mj4naWKSoUHKcDNaJK6LAL5FT5w7EJtawvG7GUhN22Z ncvZRGtejbd9n599EetLl8TCGJ0JOKID74AEI1kKGTJAkiFWjaAyLZ/NOsR1ayapN4bN wGVlqmiayO+8LBbltCF/FmFgSJpWnVsD7+K//DTkMVJ/CMJuCocpIuHq0xcXtuk9RIjp 1iLA== MIME-Version: 1.0 X-Received: by 10.195.18.8 with SMTP id gi8mr13088960wjd.75.1403741203591; Wed, 25 Jun 2014 17:06:43 -0700 (PDT) Received: by 10.216.124.5 with HTTP; Wed, 25 Jun 2014 17:06:43 -0700 (PDT) In-Reply-To: <3439841403683845@web16h.yandex.ru> References: <53A91FD6.9030205@gmail.com> <53A9867D.2070203@gmail.com> <3439841403683845@web16h.yandex.ru> Date: Wed, 25 Jun 2014 17:06:43 -0700 Message-ID: Subject: Re: Patch for premake 4.4 beta 5 from premake 4 From: Sergei G To: Konstantin Tokarev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "ports@FreeBSD.org" , premake , Vitaly Magerya , Jason Perkins X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 00:06:45 -0000 I should've probably posted in here, but I have created yesterday issue in official premake bug tracking system with reference to this thread. https://bitbucket.org/premake/premake-dev/issue/241/freebsd-10-support-on-44-beta-5 On Wed, Jun 25, 2014 at 1:10 AM, Konstantin Tokarev wrote: > CC'ing premake developers. > > 24.06.2014, 18:09, "Vitaly Magerya" : > > TL;DR: could a brave ports comitter apply an update for > > devel/premake4 at [1]? That would be much appreciated. > > > > Redports logs for this update are at [2]. > > > > Note that redports for some reason doesn't invoke regression-test > > target today; probably a bug on their part. > > > > On 2014-06-24 09:51, Sergei G wrote: > >> I had to update Premake 4 port (4.3) to 4.4 beta 5 on FreeBSD > >> 10.0-RELEASE #0. > >> > >> I included patch file with changes applied to Premake 4 port. The > >> changes consist of: > >> > >> 3 regression tests failed (it appears due to at least one missing > patch > >> file): > > The main cause of these regressions is actually a very strange > > one (and you're right that those patches are what fixed it in > > the past). So, in one of it's routines premake tries to open > > '/etc/ld.so.conf'; it does so via Lua function 'io.open'. Now, > > FreeBSD doesn't have that file, and in theory 'io.open' should > > return 'nil', which should cause premake to skip this file. What > > actually happens is that 'io.open' returns some object that is > > neither nil, nor a proper file object. Premake thinks that 'io.open' > > succeeded, and tries to read from that non-nil, non-file object, > > which doesn't work. > > > > Why doesn't 'io.open' return 'nil' here is a mystery to me. Maybe > > premake ships with buggy Lua sources. I don't know. > > > > In any case, this problem is fixed in the patch at [1]. > >> Once I installed premake I observed that it generated Makefile with > gcc > >> in it, instead of clang. Should switch to clang be applied at premake > or > >> Box2D project level? > > It appears that Premake only supports GCC for its "gmake" target. > > > > It is possible to simply replace "gcc" with "clang" in the premake > > sources, and it will mostly work, but: > > 1) it will not work for projects that use advanced options, since > > clang does not support, and in fact fails on some of the flags > > premake may pass to it ("-ffast-math" for example); > > 2) makefiles generated on FreeBSD will fail on other platforms > > (not sure if premake promises them to work though). > > > > The long-term solution for premake is to recognize "clang" as a > > valid compiler, and provide a set of flags it understands. > > > > The short-term solution for programs that use premake is to either > > require GCC from ports, or to manually replace "gcc" with "clang" > > before building, patching out incompatible compiler flags, if any. > > > > Note that Box2D v2.3.1 doesn't seem to use any flags that clang > > doesn't understand, so it is safe to change "gcc" into "cc", and > > "g++" into "c++" in the makefiles that premake generates for it. > > > > [1] http://tx97.net/~magv/diff/premake-4.4.b5.diff > > [2] https://redports.org/buildarchive/20140624134401-54287/ > > _______________________________________________ > > freebsd-ports@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org > " > > -- > Regards, Konstantin >