From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f194.google.com (mail-io0-f194.google.com [209.85.223.194]) by mail.openembedded.org (Postfix) with ESMTP id 39230787E5 for ; Wed, 31 Jan 2018 17:15:01 +0000 (UTC) Received: by mail-io0-f194.google.com with SMTP id l17so15992908ioc.3 for ; Wed, 31 Jan 2018 09:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:subject:to:cc:date:in-reply-to:references :mime-version; bh=lG4d+c78AdN3u5JBlWrnOswhYQZXlobPSLS1csdpgfI=; b=I5fsN5OmCR8j5KueNv12zhLlItLFUS4Lw8dZCTk9x+nmZAOOk9NsMnMmNK0Fzy3XsH pIN/hZxQQtS0akb8dCWo+ez4RjB4m8IGOaaeDpFNeI71PiXKK5qeuAGXxuH6w2TGf/bE NNqCGaSNqnjInnBRwH9xUOgEMzIg6qqjdVNeYvJFpZ6XZ7ECLcjt2eyNOu8muJpcShTs 6QZ5wy7Smn1i1Paxq8ddNxjLlyoVQsTyH9slbLeR1NwSx/pi2LIAw43Uzuk7Z8ZJROOz iDG4PKSNInHCtHZUa5BePQengofOiVMfsp3IYaAJn6XMB+mYwEogu1ck5pmlvCWlBSxq Mi1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:subject:to:cc:date:in-reply-to :references:mime-version; bh=lG4d+c78AdN3u5JBlWrnOswhYQZXlobPSLS1csdpgfI=; b=Mp9C3uvX2NECCDLy9eoGGC+kB2+QOuNdXD/XtNgrMqurtNdZ68+B6cE4FYiTpYZYFl vCsiyLlR3WGlfaa9dcMRMBi6TvV7Vx5qsyUXcRFWPtAGPSJwcy7buWTW9OU+HQnwOfYC HHMnmU8YUK/F1Dt3Aqn3zewq6b94qyK+RFPwXZpLoi0ZFQtGwL/iQ6GXGkmENwasy+hZ c8weEpS2VV2sIxQPvAoy9HhGJz1/t8JGeNxbdOfYS0J8amKmzocC8PEzwsrpoo5s7p0p neSSFEV6F9dO3aGQtOsGWOQqPhwzWz5WSehbmHg8cuDrUwbpiUlf0yF3wWYoi7fvm645 FYfQ== X-Gm-Message-State: AKwxytfvRvoHOFNqOU3ejo6A2HLf5P0SJ/KwAJEbHm3ft3Rjkbf3bHIn F6QGjUD5I1b2t+1E38muurQ= X-Google-Smtp-Source: AH8x224raZPUs76U9i2rfmpR4BVmjPr7b/f796IJv5KTfoVo13gM+RPzfW5GVBjoSd1D4kpL2vN3YA== X-Received: by 10.107.104.8 with SMTP id d8mr34380911ioc.119.1517418903112; Wed, 31 Jan 2018 09:15:03 -0800 (PST) Received: from ola-842mrw1.ad.garmin.com ([204.77.163.55]) by smtp.googlemail.com with ESMTPSA id o73sm3627524ito.4.2018.01.31.09.15.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jan 2018 09:15:02 -0800 (PST) From: Joshua Watt X-Google-Original-From: Joshua Watt Message-ID: <1517418902.31752.88.camel@gmail.com> To: Martin Jansa Date: Wed, 31 Jan 2018 11:15:02 -0600 In-Reply-To: References: <20180130083003.39-1-Martin.Jansa@gmail.com> <1517418291.31752.85.camel@gmail.com> X-Mailer: Evolution 3.26.2 (3.26.2-1.fc27) Mime-Version: 1.0 Cc: Andreas =?ISO-8859-1?Q?M=FCller?= , Joe Slater , Stefan Agner , OE-core Subject: Re: [PATCH] waf.bbclass: check that waf exists before trying to execute it X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2018 17:15:02 -0000 Content-Type: multipart/alternative; boundary="=-8GBq7TMbZr/Lw/tjoC9C" --=-8GBq7TMbZr/Lw/tjoC9C Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Wed, 2018-01-31 at 18:07 +0100, Martin Jansa wrote: > What about the recipes which don't have ${S}/waf at all (and might > inherit waf from possibly wrong reasons), like all those waf-samba > recipes mentioned before? Ya, sorry I should have clarified: This should fix it for recipes that only include waf.bbclass (e.g. jack and my local waf recipes that were also getting the same error). I still think that perhaps waf- samba.bbclass probably shouldn't be inheriting from waf.bbclass if the intent is that those projects doesn't actually have ${S}/waf.... but to be fair I haven't looked closely at the recipes that inherit waf- samba.bbclass. > On Wed, Jan 31, 2018 at 6:04 PM, Joshua Watt > wrote: > > Sorry, I wasn't sure if I should make my patch in-reply-to this > > thread.... > > > > I think I fixed this correctly in http://lists.openembedded.org/pip > > ermail/openembedded-core/2018-January/147041.html > > > > Thanks, > > Joshua Watt > > > > On Wed, 2018-01-31 at 00:39 +0100, Martin Jansa wrote: > > > +Stefan > > > > > > On Wed, Jan 31, 2018 at 12:38 AM, Martin Jansa > > l.com> wrote: > > > > Thanks Andreas, > > > > jack is the only one which inherits waf directly not through > > > > waf-samba. > > > > > > > > More surprisingly it also has ${S}/waf it seems: > > > > https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b2198 > > > > 1d9c869629299f357/waf > > > > > > > > So the WARNING: shown for jack probably had different reason > > > > than the rest of them and that is: > > > > > > > > jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version > > > > Error: run waf-light from a folder containing waflib > > > > > > > > > > > > it doesn't like running waf from outside ${S} > > > > and waf_preconfigure is executed from ${TOPDIR} before > > > > do_configure switches to ${S} > > > > > > > > I don't know how common this situation is, if all waf scripts > > > > are like that, this one (after "cd ../jack/1.9.12-r0/git") > > > > says: > > > > waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0) > > > > > > > > so I'll leave that to original author to figure it out, I don't > > > > use waf anywhere, so I cannot properly test the use case he was > > > > trying to fix. > > > > > > > > Regards, > > > > > > > > > > > > > > > > > > > > On Tue, Jan 30, 2018 at 11:41 PM, Andreas Müller > > > @gmail.com> wrote: > > > > > On Tuesday, January 30, 2018, Martin Jansa > > > > l.com> wrote: > > > > > > +Andreas who added waf inherit in jack in:commit > > > > > > 0f8f1973e229a0799098bc2334416fec8c608b50 > > > > > > Author: Andreas Müller > > > > > > Date: Sat Oct 8 12:03:32 2016 +0200 > > > > > > > > > > > > jack: swap to jack2 > > > > > As far as I can see is jack2 configured with waf. Don't > > > > > remember why I chose waf-samba. Because I am on business trip > > > > > I cannot take care before next week. > > > > > > > > > > Andreas > > > > > > +Bian who added waf samba in: > > > > > > commit 962e346df99696a10657a2ea7b2166dfaf290289 > > > > > > Author: Bian Naimeng > > > > > > Date: Tue Jun 16 14:18:25 2015 +0900 > > > > > > > > > > > > waf-samba: add new class > > > > > > > > > > > > waf-samba is a build system used by samba related > > > > > > software > > > > > > > > > > > > +Joe and Joe and who maintains samba and related recipes + > > > > > > meta-networking > > > > > > > > > > > > > > > > > > On Tue, Jan 30, 2018 at 1:03 PM, Burton, Ross > > > > > intel.com> wrote: > > > > > > > Why would they do that? Shouldn't it be a fatal bug if > > > > > > > waf isn't found? > > > > > > > On 30 January 2018 at 08:30, Martin Jansa > > > > > > mail.com> wrote: > > > > > > > > * there are some recipes like jack and other which > > > > > > > > inherit waf-samba > > > > > > > > > > > > > > > > which inherits waf, but they don't use waf for > > > > > > > > configure, strange isn't > > > > > > > > > > > > > > > > it? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > * fixes: > > > > > > > > > > > > > > > > WARNING: libldb-1.1.29-r0 do_configure: Unable to > > > > > > > > execute waf --version, exit code 127. Assuming waf > > > > > > > > version without bindir/libdir support. > > > > > > > > > > > > > > > > WARNING: samba-4.6.7-r0 do_configure: Unable to execute > > > > > > > > waf --version, exit code 127. Assuming waf version > > > > > > > > without bindir/libdir support. > > > > > > > > > > > > > > > > WARNING: libtalloc-2.1.9-r0 do_configure: Unable to > > > > > > > > execute waf --version, exit code 127. Assuming waf > > > > > > > > version without bindir/libdir > > > > > > > > > > > > > > > > support. > > > > > > > > > > > > > > > > WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 > > > > > > > > do_configure: Unable to execute waf --version, exit > > > > > > > > code 1. Assuming waf version without bindir/libdir > > > > > > > > support. > > > > > > > > > > > > > > > > WARNING: libtevent-0.9.31-r0 do_configure: Unable to > > > > > > > > execute waf --version, exit code 127. Assuming waf > > > > > > > > version without bindir/libdir support. > > > > > > > > > > > > > > > > WARNING: libtdb-1.3.14-r0 do_configure: Unable to > > > > > > > > execute waf --version, exit code 127. Assuming waf > > > > > > > > version without bindir/libdir support. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Martin Jansa > > > > > > > > > > > > > > > > --- > > > > > > > > > > > > > > > > meta/classes/waf.bbclass | 3 +++ > > > > > > > > > > > > > > > > 1 file changed, 3 insertions(+) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > diff --git a/meta/classes/waf.bbclass > > > > > > > > b/meta/classes/waf.bbclass > > > > > > > > > > > > > > > > index c3e744e5de..eec4d9496d 100644 > > > > > > > > > > > > > > > > --- a/meta/classes/waf.bbclass > > > > > > > > > > > > > > > > +++ b/meta/classes/waf.bbclass > > > > > > > > > > > > > > > > @@ -29,6 +29,9 @@ python waf_preconfigure() { > > > > > > > > > > > > > > > > from distutils.version import StrictVersion > > > > > > > > > > > > > > > > srcsubdir = d.getVar('S') > > > > > > > > > > > > > > > > wafbin = os.path.join(srcsubdir, 'waf') > > > > > > > > > > > > > > > > + if not os.path.isfile(wafbin): > > > > > > > > > > > > > > > > + bb.note("%s doesn't exist, cannot check > > > > > > > > whether it supports --bindir/--libdir" % wafbin) > > > > > > > > > > > > > > > > + return > > > > > > > > > > > > > > > > status, result = oe.utils.getstatusoutput(wafbin + > > > > > > > > " --version") > > > > > > > > > > > > > > > > if status != 0: > > > > > > > > > > > > > > > > bb.warn("Unable to execute waf --version, exit > > > > > > > > code %d. Assuming waf version without bindir/libdir > > > > > > > > support." % status) > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > 2.15.1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > > > > > Openembedded-core mailing list > > > > > > > > > > > > > > > > Openembedded-core@lists.openembedded.org > > > > > > > > > > > > > > > > http://lists.openembedded.org/mailman/listinfo/openembe > > > > > > > > dded-core > > > > > > > > > > > > > > > > > > > > --=-8GBq7TMbZr/Lw/tjoC9C Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Wed, 2018-01-31 at 18:07 +0100, Martin Jan= sa wrote:
What about the r= ecipes which don't have ${S}/waf at all (and might inherit waf from possibl= y wrong reasons), like all those waf-samba recipes mentioned before?
<= /blockquote>

Ya, sorry I should have clarified: This sho= uld fix it for recipes that only include waf.bbclass (e.g. jack and my loca= l waf recipes that were also getting the same error). I still think that pe= rhaps waf-samba.bbclass probably shouldn't be inheriting from waf.bbclass i= f the intent is that those projects doesn't actually have ${S}/waf.... but = to be fair I haven't looked closely at the recipes that inherit waf-samba.b= bclass.


On Wed, Jan 31, 2018 at 6:04 PM, Josh= ua Watt <jpewhacker@gmail.com> wrote:
Sorry, I wasn't sure if I should make my patch in-repl= y-to this thread....

=
Thanks,
Joshua Watt

On Wed, 2018-01-31 at 00:39 +0100, Martin Jansa wrote:
+Stefan

On Wed, Jan 31, 2018 at 12:= 38 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
=
Thanks Andreas,

<= div>jack is the only one which inherits waf directly not through waf-samba.=

More surprisingly it also has ${S}/waf it seems:<= /div>

So the WARNING: shown for jack probably had dif= ferent reason than the rest of them and that is:

<= div>jack/1.9.12-r0 $ jack/1.9.12-r0/g= it/waf --version
Error: run waf-light from a folder containing wa= flib

it doesn't like running waf from ou= tside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_c= onfigure switches to ${S}

I don't know how common = this situation is, if all waf scripts are like that, this one (after "cd ..= /jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111= c1b20e811370bc0)

so I'll leave that to or= iginal author to figure it out, I don't use waf anywhere, so I cannot prope= rly test the use case he was trying to fix.

Regard= s,



On Tue, Jan 30, 2018 at 11:41 PM, Andre= as M=C3=BCller <schnitzeltony@gmail.com> wrote:


On Tuesday, January 30, 2018, Martin = Jansa <marti= n.jansa@gmail.com> wrote:
+Andreas who added waf inherit in jack in:
commit 0f8f1973e22= 9a0799098bc2334416fec8c608b50
Author: Andreas M=C3=BCller &l= t;schnitz= eltony@googlemail.com>
Date:   Sat Oct 8 12:03:3= 2 2016 +0200

    jack: swap to jack2
As far as I can see is jack2 configu= red with waf. Don't remember why I chose waf-samba. Because I am on busines= s trip I cannot take care before next week.

Andreas

+Bian who added waf samba in:
commit 962e346df99696a10657a2= ea7b2166dfaf290289
Author: Bian Naimeng <biannm@cn.fujitsu.com>
Date:   Tue Jun 16 14:18:25 2015 +0900

    waf-samba: add new class
    =
    waf-samba is a build system used by samba related = software

+Joe and Joe and who maintains samb= a and related recipes + meta-networking


On Tue, Jan 30, 2018 at 1:= 03 PM, Burton, Ross <ross.burton@intel.com> wrote:
Why would they do that?  Sho= uldn't it be a fatal bug if waf isn't found?

On 30 January 2018 at 08:30, Mar= tin Jansa <martin.jansa@gmail.com> wrote:
* there are some recipes like jack a= nd other which inherit waf-samba
which inherits waf, but they don't use waf for configure, strange isn't
it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, ex= it code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit= code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, = exit code 127. Assuming waf version without bindir/libdir
support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to = execute waf --version, exit code 1. Assuming waf version without bindir/lib= dir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version,= exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, ex= it code 127. Assuming waf version without bindir/libdir support.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index c3e744e5de..eec4d9496d 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir =3D d.getVar('S')
     wafbin =3D os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whethe= r it supports --bindir/--libdir" % wafbin)
+        return
     status, result =3D oe.utils.getstatusoutput(wafbin= + " --version")
     if status !=3D 0:
         bb.warn("Unable to execute waf --version,= exit code %d. Assuming waf version without bindir/libdir support." % statu= s)
--<= br> 2.15.1

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/m= ailman/listinfo/openembedded-core






--=-8GBq7TMbZr/Lw/tjoC9C--