From owner-freebsd-ports@FreeBSD.ORG Wed Jun 25 08:11:44 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 69C71239 for ; Wed, 25 Jun 2014 08:11:44 +0000 (UTC) Received: from forward5h.mail.yandex.net (forward5h.mail.yandex.net [IPv6:2a02:6b8:0:f05::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1957427FC for ; Wed, 25 Jun 2014 08:11:43 +0000 (UTC) Received: from web16h.yandex.ru (web16h.yandex.ru [84.201.186.45]) by forward5h.mail.yandex.net (Yandex) with ESMTP id A763BD0083E; Wed, 25 Jun 2014 12:10:47 +0400 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web16h.yandex.ru (Yandex) with ESMTP id D0E14180C2B; Wed, 25 Jun 2014 12:10:45 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1403683846; bh=6bDeK7LoHxrlOnECOuvs0qypBt2VzgXeCijiE83NvUw=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=OA7UHJ0T8cHUys2zOvWsy+yXf4zNWejKGJeMS/oVFPP1wiQ6QtsNXr3n3LA3cEA08 U6ClRX/qEUvj64lHr6vvgnjTFhwyKFI7Qioubunoy9aelZpoMf+5YJQ8Ef8YeeE350 CPHoSYUh4IgU5eO4iQKlza7wjbwdo+W50SRbONHU= Received: from fw01.smlabs.net (fw01.smlabs.net [185.5.42.3]) by web16h.yandex.ru with HTTP; Wed, 25 Jun 2014 12:10:45 +0400 From: Konstantin Tokarev To: Vitaly Magerya , Sergei G , "ports@FreeBSD.org" In-Reply-To: <53A9867D.2070203@gmail.com> References: <53A91FD6.9030205@gmail.com> <53A9867D.2070203@gmail.com> Subject: Re: Patch for premake 4.4 beta 5 from premake 4 MIME-Version: 1.0 Message-Id: <3439841403683845@web16h.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 25 Jun 2014 12:10:45 +0400 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r Cc: premake , 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: Wed, 25 Jun 2014 08:11:44 -0000 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