diff mbox series

package/netsurf: use TMP_PREFIX inside the build directory

Message ID 20181217084710.16192-1-thomas.petazzoni@bootlin.com
State Accepted
Headers show
Series package/netsurf: use TMP_PREFIX inside the build directory | expand

Commit Message

Thomas Petazzoni Dec. 17, 2018, 8:47 a.m. UTC
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(-)

Comments

Peter Korsgaard Dec. 17, 2018, 10:48 p.m. UTC | #1
>>>>> "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?
Francois Perrad Dec. 18, 2018, 7:18 a.m. UTC | #2
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 &lt;<a href="mailto:peter@korsgaard.com">peter@korsgaard.com</a>&gt; 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">&gt;&gt;&gt;&gt;&gt; &quot;Thomas&quot; == Thomas Petazzoni &lt;<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>&gt; writes:<br>
<br>
 &gt; The netsurf build system creates a stamp file inside TMP_PREFIX to<br>
 &gt; know if the build was done, and if the stamp file exists, it doesn&#39;t<br>
 &gt; do any build. Therefore, having this stamp file in STAGING_DIR<br>
 &gt; prevents from rebuilding netsurf, even after removing its entire build<br>
 &gt; directory: the stamp file exists in STAGING_DIR, and netsurf doesn&#39;t<br>
 &gt; build anything, causing the installation to fail.<br>
<br>
 &gt; We fix this by putting this temporary directory inside the netsurf<br>
 &gt; build directory.<br>
<br>
 &gt; Signed-off-by: Thomas Petazzoni &lt;<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>&gt;<br>
 &gt; ---<br>
 &gt;  package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a> | 2 +-<br>
 &gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
 &gt; 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>
 &gt; index e5a251b9c1..e4ed4fd1a7 100644<br>
 &gt; --- a/package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a><br>
 &gt; +++ b/package/netsurf/<a href="http://netsurf.mk" rel="noreferrer" target="_blank">netsurf.mk</a><br>
 &gt; @@ -78,7 +78,7 @@ NETSURF_MAKE_OPTS = \<br>
 &gt;      BUILD_CC=&quot;$(HOSTCC)&quot; \<br>
 &gt;      CC=&quot;$(TARGET_CC)&quot; \<br>
 &gt;      AR=&quot;$(TARGET_AR)&quot; \<br>
 &gt; -    TMP_PREFIX=$(STAGING_DIR)/usr \<br>
 &gt; +    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 &lt;libwapcaplet/libwapcaplet.h&gt;<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 &#39;build-x86_64-linux-gnu-arm-linux-gnueabihf-release-lib-static/src_stylesheet.o&#39; 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 &#39;/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/libcss&#39;<br>Makefile:119: recipe for target &#39;/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/inst-framebuffer/build-stamp&#39; 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 &#39;/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8&#39;<br>package/<a href="http://pkg-generic.mk:229">pkg-generic.mk:229</a>: recipe for target &#39;/home/dev/checkout/BR/build/lime_netsurf_fb/build/netsurf-3.8/.stamp_built&#39; 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>
Thomas Petazzoni Dec. 18, 2018, 7:48 a.m. UTC | #3
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
Arnout Vandecappelle Feb. 3, 2019, 8:36 p.m. UTC | #4
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
Peter Korsgaard Feb. 4, 2019, 10:23 a.m. UTC | #5
>>>>> "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 mbox series

Patch

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