* [PATCH] classes/waf: Fix builds when B != S
@ 2018-11-30 21:55 Joshua Watt
2018-11-30 23:00 ` Burton, Ross
2018-12-01 3:01 ` [PATCH v2] " Joshua Watt
0 siblings, 2 replies; 11+ messages in thread
From: Joshua Watt @ 2018-11-30 21:55 UTC (permalink / raw)
To: openembedded-core
Waf requires that the current working directory be ${S} (the location of
the wscript) when building. Most of the time, this was true only because
B defaults to S. However, anything that changed that behavior (notably,
using externalsrc) would break the recipe. Remedy this by explicitly
changing cwd to ${S} when running waf commands. As a happy side effect,
B can be set up for "out of tree" builds to keep the source directory
clean.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/classes/waf.bbclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 19e93761b39..9cb5b68f449 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -1,6 +1,8 @@
# avoids build breaks when using no-static-libs.inc
DISABLE_STATIC = ""
+B = "${WORKDIR}/${BPN}-${PV}"
+
EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
python waf_preconfigure() {
@@ -22,16 +24,16 @@ python waf_preconfigure() {
do_configure[prefuncs] += "waf_preconfigure"
waf_do_configure() {
- ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
+ (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
}
do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
waf_do_compile() {
- ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
+ (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
}
waf_do_install() {
- ${S}/waf install --destdir=${D}
+ (cd ${S} && ./waf install --destdir=${D})
}
EXPORT_FUNCTIONS do_configure do_compile do_install
--
2.19.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH] classes/waf: Fix builds when B != S
2018-11-30 21:55 [PATCH] classes/waf: Fix builds when B != S Joshua Watt
@ 2018-11-30 23:00 ` Burton, Ross
2018-12-01 0:01 ` Joshua Watt
2018-12-01 3:01 ` [PATCH v2] " Joshua Watt
1 sibling, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2018-11-30 23:00 UTC (permalink / raw)
To: Joshua Watt; +Cc: OE-core
On Fri, 30 Nov 2018 at 21:56, Joshua Watt <jpewhacker@gmail.com> wrote:
> +B = "${WORKDIR}/${BPN}-${PV}"
That's the default, so redundant.
Does waf support out-of-tree builds sufficiently well that we can
default - or even mandate - out of tree? i.e. follow meson and
cmake, and just set B=$WORKDIR/build in the class.
Ross
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH] classes/waf: Fix builds when B != S
2018-11-30 23:00 ` Burton, Ross
@ 2018-12-01 0:01 ` Joshua Watt
2018-12-01 0:30 ` Joshua Watt
0 siblings, 1 reply; 11+ messages in thread
From: Joshua Watt @ 2018-12-01 0:01 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
On Fri, Nov 30, 2018, 5:00 PM Burton, Ross <ross.burton@intel.com wrote:
> On Fri, 30 Nov 2018 at 21:56, Joshua Watt <jpewhacker@gmail.com> wrote:
> > +B = "${WORKDIR}/${BPN}-${PV}"
>
> That's the default, so redundant.
>
> Does waf support out-of-tree builds sufficiently well that we can
> default - or even mandate - out of tree? i.e. follow meson and
> cmake, and just set B=$WORKDIR/build in the class.
>
Yes. This patch already does that by adding "-o ${B}" in do_configure. I
will change it to ${WORKDIR}/build. Out if curiosity, why is that preferred
over ${WORKDIR}/${BPN}-${PV} ?
>
> Ross
>
[-- Attachment #2: Type: text/html, Size: 1395 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH] classes/waf: Fix builds when B != S
2018-12-01 0:01 ` Joshua Watt
@ 2018-12-01 0:30 ` Joshua Watt
0 siblings, 0 replies; 11+ messages in thread
From: Joshua Watt @ 2018-12-01 0:30 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
On Fri, Nov 30, 2018, 6:01 PM Joshua Watt <jpewhacker@gmail.com wrote:
>
>
> On Fri, Nov 30, 2018, 5:00 PM Burton, Ross <ross.burton@intel.com wrote:
>
>> On Fri, 30 Nov 2018 at 21:56, Joshua Watt <jpewhacker@gmail.com> wrote:
>> > +B = "${WORKDIR}/${BPN}-${PV}"
>>
>> That's the default, so redundant.
>>
>> Does waf support out-of-tree builds sufficiently well that we can
>> default - or even mandate - out of tree? i.e. follow meson and
>> cmake, and just set B=$WORKDIR/build in the class.
>>
>
> Yes. This patch already does that by adding "-o ${B}" in do_configure. I
> will change it to ${WORKDIR}/build. Out if curiosity, why is that preferred
> over ${WORKDIR}/${BPN}-${PV} ?
>
Hah, right. {WORKDIR}/${BPN}-${PV} is also the default value for ${S}, so
setting to ${WORKDIR}/build ensures they are different, which we want/need
for waf.
>> Ross
>>
>
[-- Attachment #2: Type: text/html, Size: 2389 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2] classes/waf: Fix builds when B != S
2018-11-30 21:55 [PATCH] classes/waf: Fix builds when B != S Joshua Watt
2018-11-30 23:00 ` Burton, Ross
@ 2018-12-01 3:01 ` Joshua Watt
2018-12-02 0:09 ` Khem Raj
1 sibling, 1 reply; 11+ messages in thread
From: Joshua Watt @ 2018-12-01 3:01 UTC (permalink / raw)
To: openembedded-core
Waf requires that the current working directory be ${S} (the location of
the wscript) when building. Most of the time, this was true only because
B defaults to S. However, anything that changed that behavior (notably,
using externalsrc) would break the recipe. Remedy this by explicitly
changing cwd to ${S} when running waf commands. As a happy side effect,
B can be set up for "out of tree" builds to keep the source directory
clean.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/classes/waf.bbclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 19e93761b39..8e6d754c299 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -1,6 +1,8 @@
# avoids build breaks when using no-static-libs.inc
DISABLE_STATIC = ""
+B = "${WORKDIR}/build"
+
EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
python waf_preconfigure() {
@@ -22,16 +24,16 @@ python waf_preconfigure() {
do_configure[prefuncs] += "waf_preconfigure"
waf_do_configure() {
- ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
+ (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
}
do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
waf_do_compile() {
- ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
+ (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
}
waf_do_install() {
- ${S}/waf install --destdir=${D}
+ (cd ${S} && ./waf install --destdir=${D})
}
EXPORT_FUNCTIONS do_configure do_compile do_install
--
2.19.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v2] classes/waf: Fix builds when B != S
2018-12-01 3:01 ` [PATCH v2] " Joshua Watt
@ 2018-12-02 0:09 ` Khem Raj
2018-12-03 20:14 ` Khem Raj
0 siblings, 1 reply; 11+ messages in thread
From: Khem Raj @ 2018-12-02 0:09 UTC (permalink / raw)
To: Joshua Watt, openembedded-core
Hi Joshua
There is a build failure for a2jmidid see
http://errors.yoctoproject.org/Errors/Details/202833/
Seem to be related can you validate
On 11/30/18 7:01 PM, Joshua Watt wrote:
> Waf requires that the current working directory be ${S} (the location of
> the wscript) when building. Most of the time, this was true only because
> B defaults to S. However, anything that changed that behavior (notably,
> using externalsrc) would break the recipe. Remedy this by explicitly
> changing cwd to ${S} when running waf commands. As a happy side effect,
> B can be set up for "out of tree" builds to keep the source directory
> clean.
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta/classes/waf.bbclass | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
> index 19e93761b39..8e6d754c299 100644
> --- a/meta/classes/waf.bbclass
> +++ b/meta/classes/waf.bbclass
> @@ -1,6 +1,8 @@
> # avoids build breaks when using no-static-libs.inc
> DISABLE_STATIC = ""
>
> +B = "${WORKDIR}/build"
> +
> EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
>
> python waf_preconfigure() {
> @@ -22,16 +24,16 @@ python waf_preconfigure() {
> do_configure[prefuncs] += "waf_preconfigure"
>
> waf_do_configure() {
> - ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
> + (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
> }
>
> do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
> waf_do_compile() {
> - ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
> + (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
> }
>
> waf_do_install() {
> - ${S}/waf install --destdir=${D}
> + (cd ${S} && ./waf install --destdir=${D})
> }
>
> EXPORT_FUNCTIONS do_configure do_compile do_install
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2] classes/waf: Fix builds when B != S
2018-12-02 0:09 ` Khem Raj
@ 2018-12-03 20:14 ` Khem Raj
2018-12-03 21:50 ` Andreas Müller
0 siblings, 1 reply; 11+ messages in thread
From: Khem Raj @ 2018-12-03 20:14 UTC (permalink / raw)
To: Joshua Watt, Patches and discussions about the oe-core layer
On Sat, Dec 1, 2018 at 4:09 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> Hi Joshua
>
> There is a build failure for a2jmidid see
>
> http://errors.yoctoproject.org/Errors/Details/202833/
>
> Seem to be related can you validate
>
> On 11/30/18 7:01 PM, Joshua Watt wrote:
> > Waf requires that the current working directory be ${S} (the location of
> > the wscript) when building. Most of the time, this was true only because
> > B defaults to S. However, anything that changed that behavior (notably,
> > using externalsrc) would break the recipe. Remedy this by explicitly
> > changing cwd to ${S} when running waf commands. As a happy side effect,
> > B can be set up for "out of tree" builds to keep the source directory
> > clean.
I have sent a workaround for a2jmidid to ml which means we can go
ahead with this change in OE-Core
> >
> > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > ---
> > meta/classes/waf.bbclass | 8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
> > index 19e93761b39..8e6d754c299 100644
> > --- a/meta/classes/waf.bbclass
> > +++ b/meta/classes/waf.bbclass
> > @@ -1,6 +1,8 @@
> > # avoids build breaks when using no-static-libs.inc
> > DISABLE_STATIC = ""
> >
> > +B = "${WORKDIR}/build"
> > +
> > EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
> >
> > python waf_preconfigure() {
> > @@ -22,16 +24,16 @@ python waf_preconfigure() {
> > do_configure[prefuncs] += "waf_preconfigure"
> >
> > waf_do_configure() {
> > - ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
> > + (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
> > }
> >
> > do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
> > waf_do_compile() {
> > - ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
> > + (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
> > }
> >
> > waf_do_install() {
> > - ${S}/waf install --destdir=${D}
> > + (cd ${S} && ./waf install --destdir=${D})
> > }
> >
> > EXPORT_FUNCTIONS do_configure do_compile do_install
> >
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2] classes/waf: Fix builds when B != S
2018-12-03 20:14 ` Khem Raj
@ 2018-12-03 21:50 ` Andreas Müller
2018-12-03 22:04 ` Khem Raj
2018-12-03 22:22 ` Joshua Watt
0 siblings, 2 replies; 11+ messages in thread
From: Andreas Müller @ 2018-12-03 21:50 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On Mon, Dec 3, 2018 at 9:14 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Sat, Dec 1, 2018 at 4:09 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > Hi Joshua
> >
> > There is a build failure for a2jmidid see
> >
> > http://errors.yoctoproject.org/Errors/Details/202833/
> >
> > Seem to be related can you validate
> >
> > On 11/30/18 7:01 PM, Joshua Watt wrote:
> > > Waf requires that the current working directory be ${S} (the location of
> > > the wscript) when building. Most of the time, this was true only because
> > > B defaults to S. However, anything that changed that behavior (notably,
> > > using externalsrc) would break the recipe. Remedy this by explicitly
> > > changing cwd to ${S} when running waf commands. As a happy side effect,
> > > B can be set up for "out of tree" builds to keep the source directory
> > > clean.
>
> I have sent a workaround for a2jmidid to ml which means we can go
> ahead with this change in OE-Core
>
> > >
> > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > > ---
> > > meta/classes/waf.bbclass | 8 +++++---
> > > 1 file changed, 5 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
> > > index 19e93761b39..8e6d754c299 100644
> > > --- a/meta/classes/waf.bbclass
> > > +++ b/meta/classes/waf.bbclass
> > > @@ -1,6 +1,8 @@
> > > # avoids build breaks when using no-static-libs.inc
> > > DISABLE_STATIC = ""
> > >
> > > +B = "${WORKDIR}/build"
> > > +
> > > EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
> > >
> > > python waf_preconfigure() {
> > > @@ -22,16 +24,16 @@ python waf_preconfigure() {
> > > do_configure[prefuncs] += "waf_preconfigure"
> > >
> > > waf_do_configure() {
> > > - ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
> > > + (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
> > > }
> > >
> > > do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
> > > waf_do_compile() {
> > > - ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
> > > + (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
> > > }
> > >
> > > waf_do_install() {
> > > - ${S}/waf install --destdir=${D}
> > > + (cd ${S} && ./waf install --destdir=${D})
> > > }
> > >
> > > EXPORT_FUNCTIONS do_configure do_compile do_install
> > >
> --
Hmm - the a2jmidid shows what's going to happen: All packets shipping
older waf need workaround hacks. This should not be the way to go
because then we can remove waf.bbclass entirely.
Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2] classes/waf: Fix builds when B != S
2018-12-03 21:50 ` Andreas Müller
@ 2018-12-03 22:04 ` Khem Raj
2018-12-03 22:22 ` Joshua Watt
1 sibling, 0 replies; 11+ messages in thread
From: Khem Raj @ 2018-12-03 22:04 UTC (permalink / raw)
To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer
On Mon, Dec 3, 2018 at 1:50 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>
> On Mon, Dec 3, 2018 at 9:14 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Sat, Dec 1, 2018 at 4:09 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > Hi Joshua
> > >
> > > There is a build failure for a2jmidid see
> > >
> > > http://errors.yoctoproject.org/Errors/Details/202833/
> > >
> > > Seem to be related can you validate
> > >
> > > On 11/30/18 7:01 PM, Joshua Watt wrote:
> > > > Waf requires that the current working directory be ${S} (the location of
> > > > the wscript) when building. Most of the time, this was true only because
> > > > B defaults to S. However, anything that changed that behavior (notably,
> > > > using externalsrc) would break the recipe. Remedy this by explicitly
> > > > changing cwd to ${S} when running waf commands. As a happy side effect,
> > > > B can be set up for "out of tree" builds to keep the source directory
> > > > clean.
> >
> > I have sent a workaround for a2jmidid to ml which means we can go
> > ahead with this change in OE-Core
> >
> > > >
> > > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > > > ---
> > > > meta/classes/waf.bbclass | 8 +++++---
> > > > 1 file changed, 5 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
> > > > index 19e93761b39..8e6d754c299 100644
> > > > --- a/meta/classes/waf.bbclass
> > > > +++ b/meta/classes/waf.bbclass
> > > > @@ -1,6 +1,8 @@
> > > > # avoids build breaks when using no-static-libs.inc
> > > > DISABLE_STATIC = ""
> > > >
> > > > +B = "${WORKDIR}/build"
> > > > +
> > > > EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
> > > >
> > > > python waf_preconfigure() {
> > > > @@ -22,16 +24,16 @@ python waf_preconfigure() {
> > > > do_configure[prefuncs] += "waf_preconfigure"
> > > >
> > > > waf_do_configure() {
> > > > - ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
> > > > + (cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
> > > > }
> > > >
> > > > do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
> > > > waf_do_compile() {
> > > > - ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
> > > > + (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
> > > > }
> > > >
> > > > waf_do_install() {
> > > > - ${S}/waf install --destdir=${D}
> > > > + (cd ${S} && ./waf install --destdir=${D})
> > > > }
> > > >
> > > > EXPORT_FUNCTIONS do_configure do_compile do_install
> > > >
> > --
> Hmm - the a2jmidid shows what's going to happen: All packets shipping
> older waf need workaround hacks. This should not be the way to go
> because then we can remove waf.bbclass entirely.
>
FWIW out of all meta-openembedded layers only 1 recipe was having
this issue, while the issue you mention is real, we might have to weigh
in if we should not do this just for a handful of recipes. My
suggestion would be to change the recipes if its not a cascade
> Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2] classes/waf: Fix builds when B != S
2018-12-03 21:50 ` Andreas Müller
2018-12-03 22:04 ` Khem Raj
@ 2018-12-03 22:22 ` Joshua Watt
2018-12-03 23:18 ` Andreas Müller
1 sibling, 1 reply; 11+ messages in thread
From: Joshua Watt @ 2018-12-03 22:22 UTC (permalink / raw)
To: Andreas Müller, Khem Raj
Cc: Patches and discussions about the oe-core layer
On Mon, 2018-12-03 at 22:50 +0100, Andreas Müller wrote:
> On Mon, Dec 3, 2018 at 9:14 PM Khem Raj <raj.khem@gmail.com> wrote:
> > On Sat, Dec 1, 2018 at 4:09 PM Khem Raj <raj.khem@gmail.com> wrote:
> > > Hi Joshua
> > >
> > > There is a build failure for a2jmidid see
> > >
> > > http://errors.yoctoproject.org/Errors/Details/202833/
> > >
> > > Seem to be related can you validate
> > >
> > > On 11/30/18 7:01 PM, Joshua Watt wrote:
> > > > Waf requires that the current working directory be ${S} (the
> > > > location of
> > > > the wscript) when building. Most of the time, this was true
> > > > only because
> > > > B defaults to S. However, anything that changed that behavior
> > > > (notably,
> > > > using externalsrc) would break the recipe. Remedy this by
> > > > explicitly
> > > > changing cwd to ${S} when running waf commands. As a happy side
> > > > effect,
> > > > B can be set up for "out of tree" builds to keep the source
> > > > directory
> > > > clean.
> >
> > I have sent a workaround for a2jmidid to ml which means we can go
> > ahead with this change in OE-Core
> >
> > > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > > > ---
> > > > meta/classes/waf.bbclass | 8 +++++---
> > > > 1 file changed, 5 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/meta/classes/waf.bbclass
> > > > b/meta/classes/waf.bbclass
> > > > index 19e93761b39..8e6d754c299 100644
> > > > --- a/meta/classes/waf.bbclass
> > > > +++ b/meta/classes/waf.bbclass
> > > > @@ -1,6 +1,8 @@
> > > > # avoids build breaks when using no-static-libs.inc
> > > > DISABLE_STATIC = ""
> > > >
> > > > +B = "${WORKDIR}/build"
> > > > +
> > > > EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
> > > >
> > > > python waf_preconfigure() {
> > > > @@ -22,16 +24,16 @@ python waf_preconfigure() {
> > > > do_configure[prefuncs] += "waf_preconfigure"
> > > >
> > > > waf_do_configure() {
> > > > - ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF}
> > > > ${EXTRA_OECONF}
> > > > + (cd ${S} && ./waf configure -o ${B} --prefix=${prefix}
> > > > ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
> > > > }
> > > >
> > > > do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
> > > > waf_do_compile() {
> > > > - ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-
> > > > j%d', limit=64)}
> > > > + (cd ${S} && ./waf build ${@oe.utils.parallel_make_argumen
> > > > t(d, '-j%d', limit=64)})
> > > > }
> > > >
> > > > waf_do_install() {
> > > > - ${S}/waf install --destdir=${D}
> > > > + (cd ${S} && ./waf install --destdir=${D})
> > > > }
> > > >
> > > > EXPORT_FUNCTIONS do_configure do_compile do_install
> > > >
> > --
> Hmm - the a2jmidid shows what's going to happen: All packets shipping
> older waf need workaround hacks. This should not be the way to go
> because then we can remove waf.bbclass entirely.
Yes, that might actually be the most "waf" answer to that problem...
for better or worse waf is designed to be fully self contained, so
having a "standard" class that builds it is somewhat problematic. Waf
itself could change at any time and render the canned configuration
useless. This doesn't really affect any of the projects using waf
because they usually just download (or build) the latest when they
start development and don't upgrade (or do so infrequently).
The other option that I've though about (not that I really like it) is
to have some sort of WAF_VERSION variable that waf.bbclass keys off of
to detect what support is available. However, even this isn't fool
proof because of add-in modules that you can choose to build into your
project's version of waf... these can basically do whatever you want
including adding new command line arguments, and adding or modifying
existing behaviors. I'm not in favor of going down the road of making
variables like WAF_HAS_GNU_DIRS_PLUGIN that each project has to
configure.
OTOH, as long as the projects we are building with waf currently use a
new enough version (I know 1.7 works and 1.4 is broken), our current
bbclass works and maybe that's "good enough" for now?
I'm open to suggestions.
>
> Andreas
--
Joshua Watt <JPEWhacker@gmail.com>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2] classes/waf: Fix builds when B != S
2018-12-03 22:22 ` Joshua Watt
@ 2018-12-03 23:18 ` Andreas Müller
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Müller @ 2018-12-03 23:18 UTC (permalink / raw)
To: jpewhacker; +Cc: Patches and discussions about the oe-core layer
On Mon, Dec 3, 2018 at 11:22 PM Joshua Watt <jpewhacker@gmail.com> wrote:
> > Hmm - the a2jmidid shows what's going to happen: All packets shipping
> > older waf need workaround hacks. This should not be the way to go
> > because then we can remove waf.bbclass entirely.
>
> Yes, that might actually be the most "waf" answer to that problem...
> for better or worse waf is designed to be fully self contained, so
> having a "standard" class that builds it is somewhat problematic. Waf
> itself could change at any time and render the canned configuration
> useless. This doesn't really affect any of the projects using waf
> because they usually just download (or build) the latest when they
> start development and don't upgrade (or do so infrequently).
>
> The other option that I've though about (not that I really like it) is
> to have some sort of WAF_VERSION variable that waf.bbclass keys off of
> to detect what support is available. However, even this isn't fool
> proof because of add-in modules that you can choose to build into your
> project's version of waf... these can basically do whatever you want
> including adding new command line arguments, and adding or modifying
> existing behaviors. I'm not in favor of going down the road of making
> variables like WAF_HAS_GNU_DIRS_PLUGIN that each project has to
> configure.
>
> OTOH, as long as the projects we are building with waf currently use a
> new enough version (I know 1.7 works and 1.4 is broken), our current
> bbclass works and maybe that's "good enough" for now?
>
> I'm open to suggestions.
Have meta-qt5-extra with many recipes on old sources which potentially
fail for this change. Will build with your's and Khem's patch and fix
affected recipes. Think version magic is not necessary.
Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-12-03 23:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-30 21:55 [PATCH] classes/waf: Fix builds when B != S Joshua Watt
2018-11-30 23:00 ` Burton, Ross
2018-12-01 0:01 ` Joshua Watt
2018-12-01 0:30 ` Joshua Watt
2018-12-01 3:01 ` [PATCH v2] " Joshua Watt
2018-12-02 0:09 ` Khem Raj
2018-12-03 20:14 ` Khem Raj
2018-12-03 21:50 ` Andreas Müller
2018-12-03 22:04 ` Khem Raj
2018-12-03 22:22 ` Joshua Watt
2018-12-03 23:18 ` Andreas Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox