Message ID | 20181217084710.16192-1-thomas.petazzoni@bootlin.com |
---|---|
State | Accepted |
Headers | show |
Series | package/netsurf: use TMP_PREFIX inside the build directory | expand |
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes: > The netsurf build system creates a stamp file inside TMP_PREFIX to > know if the build was done, and if the stamp file exists, it doesn't > do any build. Therefore, having this stamp file in STAGING_DIR > prevents from rebuilding netsurf, even after removing its entire build > directory: the stamp file exists in STAGING_DIR, and netsurf doesn't > build anything, causing the installation to fail. > We fix this by putting this temporary directory inside the netsurf > build directory. > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > --- > package/netsurf/netsurf.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/package/netsurf/netsurf.mk b/package/netsurf/netsurf.mk > index e5a251b9c1..e4ed4fd1a7 100644 > --- a/package/netsurf/netsurf.mk > +++ b/package/netsurf/netsurf.mk > @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \ > BUILD_CC="$(HOSTCC)" \ > CC="$(TARGET_CC)" \ > AR="$(TARGET_AR)" \ > - TMP_PREFIX=$(STAGING_DIR)/usr \ > + TMP_PREFIX=$(@D)/tmpusr \ Why do we have to set it at all? It looks like it defaults to a directory under the build dir as well?
Le lun. 17 déc. 2018 à 23:48, Peter Korsgaard <peter@korsgaard.com> a écrit : > >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes: > > > The netsurf build system creates a stamp file inside TMP_PREFIX to > > know if the build was done, and if the stamp file exists, it doesn't > > do any build. Therefore, having this stamp file in STAGING_DIR > > prevents from rebuilding netsurf, even after removing its entire build > > directory: the stamp file exists in STAGING_DIR, and netsurf doesn't > > build anything, causing the installation to fail. > > > We fix this by putting this temporary directory inside the netsurf > > build directory. > > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > > --- > > package/netsurf/netsurf.mk | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > diff --git a/package/netsurf/netsurf.mk b/package/netsurf/netsurf.mk > > index e5a251b9c1..e4ed4fd1a7 100644 > > --- a/package/netsurf/netsurf.mk > > +++ b/package/netsurf/netsurf.mk > > @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \ > > BUILD_CC="$(HOSTCC)" \ > > CC="$(TARGET_CC)" \ > > AR="$(TARGET_AR)" \ > > - TMP_PREFIX=$(STAGING_DIR)/usr \ > > + TMP_PREFIX=$(@D)/tmpusr \ > > Why do we have to set it at all? It looks like it defaults to a > directory under the build dir as well? > > without TMP_PREFIX=$(STAGING_DIR)/usr, a fresh build fails with : COMPILE: src/stylesheet.c In file included from src/stylesheet.c:12: src/stylesheet.h:14:10: fatal error: libwapcaplet/libwapcaplet.h: No such file or directory #include <libwapcaplet/libwapcaplet.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. /home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/share/netsurf-buildsystem/makefiles/Makefile.top:584: recipe for target 'build-x86_64-linux-gnu-arm-linux-gnueabihf-release-lib-static/src_stylesheet.o' failed make[2]: *** [build-x86_64-linux-gnu-arm-linux-gnueabihf-release-lib-static/src_stylesheet.o] Error 1 make[2]: Leaving directory '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/libcss' Makefile:119: recipe for target '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/build-stamp' failed make[1]: *** [/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/build-stamp] Error 2 make[1]: Leaving directory '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8' package/pkg-generic.mk:229: recipe for target '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/.stamp_built' failed make: *** [/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/.stamp_built] Error 2 François > -- > Bye, Peter Korsgaard > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > <div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">Le lun. 17 déc. 2018 à 23:48, Peter Korsgaard <<a href="mailto:peter@korsgaard.com">peter@korsgaard.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>>>>> "Thomas" == Thomas Petazzoni <<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>> writes:<br> <br> > The netsurf build system creates a stamp file inside TMP_PREFIX to<br> > know if the build was done, and if the stamp file exists, it doesn't<br> > do any build. Therefore, having this stamp file in STAGING_DIR<br> > prevents from rebuilding netsurf, even after removing its entire build<br> > directory: the stamp file exists in STAGING_DIR, and netsurf doesn't<br> > build anything, causing the installation to fail.<br> <br> > We fix this by putting this temporary directory inside the netsurf<br> > build directory.<br> <br> > Signed-off-by: Thomas Petazzoni <<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>><br> > ---<br> > package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a> | 2 +-<br> > 1 file changed, 1 insertion(+), 1 deletion(-)<br> <br> > diff --git a/package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a> b/package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a><br> > index e5a251b9c1..e4ed4fd1a7 100644<br> > --- a/package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a><br> > +++ b/package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a><br> > @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \<br> > BUILD_CC="$(HOSTCC)" \<br> > CC="$(TARGET_CC)" \<br> > AR="$(TARGET_AR)" \<br> > - TMP_PREFIX=$(STAGING_DIR)/usr \<br> > + TMP_PREFIX=$(@D)/tmpusr \<br> <br> Why do we have to set it at all? It looks like it defaults to a<br> directory under the build dir as well?<br> <br></blockquote><div><br></div><div>without TMP_PREFIX=$(STAGING_DIR)/usr, a fresh build fails with :</div><div> COMPILE: src/stylesheet.c<br>In file included from src/stylesheet.c:12:<br>src/stylesheet.h:14:10: fatal error: libwapcaplet/libwapcaplet.h: No such file or directory<br> #include <libwapcaplet/libwapcaplet.h><br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>compilation terminated.<br>/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/share/netsurf-buildsystem/makefiles/Makefile.top:584: recipe for target 'build-x86_64-linux-gnu-arm-linux-gnueabihf-release-lib-static/src_stylesheet.o' failed<br>make[2]: *** [build-x86_64-linux-gnu-arm-linux-gnueabihf-release-lib-static/src_stylesheet.o] Error 1<br>make[2]: Leaving directory '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/libcss'<br>Makefile:119: recipe for target '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/build-stamp' failed<br>make[1]: *** [/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/build-stamp] Error 2<br>make[1]: Leaving directory '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8'<br>package/<a href="http://pkg-generic.mk:229">pkg-generic.mk:229</a>: recipe for target '/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/.stamp_built' failed<br>make: *** [/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/.stamp_built] Error 2<br><br></div><div>François<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> -- <br> Bye, Peter Korsgaard<br> _______________________________________________<br> buildroot mailing list<br> <a href="mailto:buildroot@busybox.net" target="_blank">buildroot@busybox.net</a><br> <a href="http://lists.busybox.net/mailman/listinfo/buildroot" rel="noreferrer" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br> </blockquote></div></div></div>
Hello, On Mon, 17 Dec 2018 23:48:34 +0100, Peter Korsgaard wrote: > >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes: > > > The netsurf build system creates a stamp file inside TMP_PREFIX to > > know if the build was done, and if the stamp file exists, it doesn't > > do any build. Therefore, having this stamp file in STAGING_DIR > > prevents from rebuilding netsurf, even after removing its entire build > > directory: the stamp file exists in STAGING_DIR, and netsurf doesn't > > build anything, causing the installation to fail. > > > We fix this by putting this temporary directory inside the netsurf > > build directory. > > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > > --- > > package/netsurf/netsurf.mk | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > diff --git a/package/netsurf/netsurf.mk b/package/netsurf/netsurf.mk > > index e5a251b9c1..e4ed4fd1a7 100644 > > --- a/package/netsurf/netsurf.mk > > +++ b/package/netsurf/netsurf.mk > > @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \ > > BUILD_CC="$(HOSTCC)" \ > > CC="$(TARGET_CC)" \ > > AR="$(TARGET_AR)" \ > > - TMP_PREFIX=$(STAGING_DIR)/usr \ > > + TMP_PREFIX=$(@D)/tmpusr \ > > Why do we have to set it at all? It looks like it defaults to a > directory under the build dir as well? Indeed, it does. So it's obviously simpler to drop it. I'll respin the patch. Thanks! Thomas
On 18/12/2018 08:48, Thomas Petazzoni wrote: > Hello, > > On Mon, 17 Dec 2018 23:48:34 +0100, Peter Korsgaard wrote: >>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes: >> >> > The netsurf build system creates a stamp file inside TMP_PREFIX to >> > know if the build was done, and if the stamp file exists, it doesn't >> > do any build. Therefore, having this stamp file in STAGING_DIR >> > prevents from rebuilding netsurf, even after removing its entire build >> > directory: the stamp file exists in STAGING_DIR, and netsurf doesn't >> > build anything, causing the installation to fail. >> >> > We fix this by putting this temporary directory inside the netsurf >> > build directory. As observed by Francois, this makes the build fail the first time. Adding an mkdir solves the issue, so I've added that and applied to master, thanks. Probably a better solution would be an upstreamable patch that does it, but oh well. Regards, Arnout >> >> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> >> > --- >> > package/netsurf/netsurf.mk | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> >> > diff --git a/package/netsurf/netsurf.mk b/package/netsurf/netsurf.mk >> > index e5a251b9c1..e4ed4fd1a7 100644 >> > --- a/package/netsurf/netsurf.mk >> > +++ b/package/netsurf/netsurf.mk >> > @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \ >> > BUILD_CC="$(HOSTCC)" \ >> > CC="$(TARGET_CC)" \ >> > AR="$(TARGET_AR)" \ >> > - TMP_PREFIX=$(STAGING_DIR)/usr \ >> > + TMP_PREFIX=$(@D)/tmpusr \ >> >> Why do we have to set it at all? It looks like it defaults to a >> directory under the build dir as well? > > Indeed, it does. So it's obviously simpler to drop it. I'll respin the > patch. Thanks! As
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: Hi, >>> > - TMP_PREFIX=$(STAGING_DIR)/usr \ >>> > + TMP_PREFIX=$(@D)/tmpusr \ >>> >>> Why do we have to set it at all? It looks like it defaults to a >>> directory under the build dir as well? >> >> Indeed, it does. So it's obviously simpler to drop it. I'll respin the >> patch. Thanks! > As As?
diff --git a/package/netsurf/netsurf.mk b/package/netsurf/netsurf.mk index e5a251b9c1..e4ed4fd1a7 100644 --- a/package/netsurf/netsurf.mk +++ b/package/netsurf/netsurf.mk @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \ BUILD_CC="$(HOSTCC)" \ CC="$(TARGET_CC)" \ AR="$(TARGET_AR)" \ - TMP_PREFIX=$(STAGING_DIR)/usr \ + TMP_PREFIX=$(@D)/tmpusr \ NETSURF_CONFIG="$(NETSURF_CONFIG)" \ PREFIX=/usr
The netsurf build system creates a stamp file inside TMP_PREFIX to know if the build was done, and if the stamp file exists, it doesn't do any build. Therefore, having this stamp file in STAGING_DIR prevents from rebuilding netsurf, even after removing its entire build directory: the stamp file exists in STAGING_DIR, and netsurf doesn't build anything, causing the installation to fail. We fix this by putting this temporary directory inside the netsurf build directory. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- package/netsurf/netsurf.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)