From owner-freebsd-ports@FreeBSD.ORG Tue Jun 24 14:09:00 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D159461 for ; Tue, 24 Jun 2014 14:09:00 +0000 (UTC) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (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 B2E902D8B for ; Tue, 24 Jun 2014 14:08:59 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id s7so526704lbd.16 for ; Tue, 24 Jun 2014 07:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=y4scsg7/NXE54uaSsH5hR837y2e0jiOTx8BbhcOD+fc=; b=T50vTgCf26+4S53XwfBZbs+IbO9stIKyAfOVYTKlv1ha0LEHbw/YH+EkcqDnLJddLf g3nqr+OOydKP4vuHRoKnkE1q/y6TiL3MsW+qC6o8JeqZMCNluCYZnMXJUqvzptoI4kIT DtSwlzLrCBKNluWUOR8gExHPPUysVWE3KbLCXCWCQty941NNcZnqZx3YOf7BvPBNLsPC wJSxzaUdI/a7g8FCaM1JvpkXGOptomV4kv0T/ozl8jco///HDoI51XOYjTiNWJ4AtQJc zVEfqmv4anqyGN8nw6WQZJA+tvBl3Kq2vxr2Sl/ukz8bs8tWVURiOzbdmileuNFzCC7W tKUQ== X-Received: by 10.112.155.230 with SMTP id vz6mr707887lbb.73.1403618937388; Tue, 24 Jun 2014 07:08:57 -0700 (PDT) Received: from [172.29.2.131] (altimet-gw.cs2.dp.wnet.ua. [217.20.178.249]) by mx.google.com with ESMTPSA id mv10sm293497lbb.0.2014.06.24.07.08.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Jun 2014 07:08:56 -0700 (PDT) Message-ID: <53A9867D.2070203@gmail.com> Date: Tue, 24 Jun 2014 17:09:01 +0300 From: Vitaly Magerya User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Sergei G , ports@FreeBSD.org Subject: Re: Patch for premake 4.4 beta 5 from premake 4 References: <53A91FD6.9030205@gmail.com> In-Reply-To: <53A91FD6.9030205@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 24 Jun 2014 14:09:00 -0000 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/