Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2014 12:10:45 +0400
From:      Konstantin Tokarev <annulen@yandex.ru>
To:        Vitaly Magerya <vmagerya@gmail.com>, Sergei G <sergeig.public@gmail.com>, "ports@FreeBSD.org" <ports@freebsd.org>
Cc:        premake <premake-users@lists.sourceforge.net>, Jason Perkins <starkos@industriousone.com>
Subject:   Re: Patch for premake 4.4 beta 5 from premake 4
Message-ID:  <3439841403683845@web16h.yandex.ru>
In-Reply-To: <53A9867D.2070203@gmail.com>
References:  <53A91FD6.9030205@gmail.com> <53A9867D.2070203@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
CC'ing premake developers.

24.06.2014, 18:09, "Vitaly Magerya" <vmagerya@gmail.com>:
> š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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3439841403683845>