Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] serf: fix 'ccache' builds
@ 2014-11-20 10:28 Enrico Scholz
  2014-11-20 20:32 ` Burton, Ross
  2014-11-21 16:55 ` [PATCH v2] " Enrico Scholz
  0 siblings, 2 replies; 4+ messages in thread
From: Enrico Scholz @ 2014-11-20 10:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Enrico Scholz

'scons' cleans the environment which breaks ccache builds because
CCACHEDIR can point to an unexpected location:

| ccache arm-linux-gnueabi-gcc ... context.c
| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)

Issue is described in

  http://www.scons.org/wiki/ImportingEnvironmentSettings

and because 'bitbake' cleans environment we can pass it completely
instead of trying to enumerate needed env.

With the 'env.patch' the FULLCC variable is not needed anymore (which
would break when CC is 'ccache arm-...-gcc' and host ccache is used)
because the correct $PATH is available during scons build.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta/recipes-support/serf/serf/env.patch | 28 ++++++++++++++++++++++++++++
 meta/recipes-support/serf/serf_1.3.6.bb  |  8 +++-----
 2 files changed, 31 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-support/serf/serf/env.patch

diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 0000000..9d073e9
--- /dev/null
+++ b/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
+'scons' cleans the environment which breaks ccache builds because
+CCACHEDIR can point to an unexpected location:
+
+| ccache arm-linux-gnueabi-gcc ... context.c
+| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
+
+Issue is described in
+
+  http://www.scons.org/wiki/ImportingEnvironmentSettings
+
+and because 'bitbake' cleans environment we can pass it completely
+instead of trying to enumerate needed env.
+
+Upstream-Status: Inappropriate
+
+
+Index: serf-1.3.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct
++++ serf-1.3.6/SConstruct
+@@ -149,6 +149,7 @@ if sys.platform == 'win32':
+ env = Environment(variables=opts,
+                   tools=('default', 'textfile',),
+                   CPPPATH=['.', ],
++                  ENV = os.environ,
+                   )
+
+ env.Append(BUILDERS = {
diff --git a/meta/recipes-support/serf/serf_1.3.6.bb b/meta/recipes-support/serf/serf_1.3.6.bb
index 08b04d3..cd9e47d 100644
--- a/meta/recipes-support/serf/serf_1.3.6.bb
+++ b/meta/recipes-support/serf/serf_1.3.6.bb
@@ -1,6 +1,7 @@
 
 SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.6.tar.bz2 \
-           file://norpath.patch"
+           file://norpath.patch \
+           file://env.patch"
 SRC_URI[md5sum] = "7fe38fa6eab078e0beabf291d8e4995d"
 SRC_URI[sha256sum] = "ca637beb0399797d4fc7ffa85e801733cd9c876997fac4a4fd12e9afe86563f2"
 
@@ -9,12 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
 DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
 
-FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}"
-FULLCC_class-native = "${CC}"
-
 do_compile() {
 	${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
-		CC="${FULLCC}" \
+		CC="${CC}" \
 		APR=`which apr-1-config` APU=`which apu-1-config` \
 		CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
 		OPENSSL="${STAGING_EXECPREFIXDIR}"
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] serf: fix 'ccache' builds
  2014-11-20 10:28 [PATCH] serf: fix 'ccache' builds Enrico Scholz
@ 2014-11-20 20:32 ` Burton, Ross
  2014-11-21 16:55 ` [PATCH v2] " Enrico Scholz
  1 sibling, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2014-11-20 20:32 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

On 20 November 2014 10:28, Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
wrote:

>  meta/recipes-support/serf/serf_1.3.6.bb  |  8 +++-----
>

I've just pulled the 1.3.8 upgrade on this list into my master-under-test
branch, would you be able to replicate with that version and update the
patch?

Ross

[-- Attachment #2: Type: text/html, Size: 787 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] serf: fix 'ccache' builds
  2014-11-20 10:28 [PATCH] serf: fix 'ccache' builds Enrico Scholz
  2014-11-20 20:32 ` Burton, Ross
@ 2014-11-21 16:55 ` Enrico Scholz
  2014-12-09  1:45   ` Kang Kai
  1 sibling, 1 reply; 4+ messages in thread
From: Enrico Scholz @ 2014-11-21 16:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: Enrico Scholz

'scons' cleans the environment which breaks ccache builds because
CCACHEDIR can point to an unexpected location:

| ccache arm-linux-gnueabi-gcc ... context.c
| ccache: failed to create .../serf/1.3.8-r0/.home/.ccache (No such file or directory)

Issue is described in

  http://www.scons.org/wiki/ImportingEnvironmentSettings

and because 'bitbake' cleans environment we can pass it completely
instead of trying to enumerate needed env.

With the 'env.patch' the FULLCC variable is not needed anymore (which
would break when CC is 'ccache arm-...-gcc' and host ccache is used)
because the correct $PATH is available during scons build:

| sh: .../sysroots/x86_64-oe-linux/usr/bin/arm-linux-gnueabi/ccache: No such file or directory
| scons: *** [context.o] Error 127

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta/recipes-support/serf/serf/env.patch | 28 ++++++++++++++++++++++++++++
 meta/recipes-support/serf/serf_1.3.8.bb  |  9 +++------
 2 files changed, 31 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-support/serf/serf/env.patch

diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 0000000..9d073e9
--- /dev/null
+++ b/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
+'scons' cleans the environment which breaks ccache builds because
+CCACHEDIR can point to an unexpected location:
+
+| ccache arm-linux-gnueabi-gcc ... context.c
+| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
+
+Issue is described in
+
+  http://www.scons.org/wiki/ImportingEnvironmentSettings
+
+and because 'bitbake' cleans environment we can pass it completely
+instead of trying to enumerate needed env.
+
+Upstream-Status: Inappropriate
+
+
+Index: serf-1.3.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct
++++ serf-1.3.6/SConstruct
+@@ -149,6 +149,7 @@ if sys.platform == 'win32':
+ env = Environment(variables=opts,
+                   tools=('default', 'textfile',),
+                   CPPPATH=['.', ],
++                  ENV = os.environ,
+                   )
+
+ env.Append(BUILDERS = {
diff --git a/meta/recipes-support/serf/serf_1.3.8.bb b/meta/recipes-support/serf/serf_1.3.8.bb
index 10db122..e818889 100644
--- a/meta/recipes-support/serf/serf_1.3.8.bb
+++ b/meta/recipes-support/serf/serf_1.3.8.bb
@@ -1,7 +1,7 @@
 
 SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-${PV}.tar.bz2 \
-           file://norpath.patch"
-SRC_URI[md5sum] = "2e4efe57ff28cb3202a112e90f0c2889"
+           file://norpath.patch \
+           file://env.patch"
 SRC_URI[sha256sum] = "e0500be065dbbce490449837bb2ab624e46d64fc0b090474d9acaa87c82b2590"
 
 LICENSE = "Apache-2.0"
@@ -9,12 +9,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
 DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
 
-FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}"
-FULLCC_class-native = "${CC}"
-
 do_compile() {
 	${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
-		CC="${FULLCC}" \
+		CC="${CC}" \
 		APR=`which apr-1-config` APU=`which apu-1-config` \
 		CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
 		OPENSSL="${STAGING_EXECPREFIXDIR}"
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] serf: fix 'ccache' builds
  2014-11-21 16:55 ` [PATCH v2] " Enrico Scholz
@ 2014-12-09  1:45   ` Kang Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Kai @ 2014-12-09  1:45 UTC (permalink / raw)
  To: Enrico Scholz, openembedded-core

On 2014年11月22日 00:55, Enrico Scholz wrote:
> 'scons' cleans the environment which breaks ccache builds because
> CCACHEDIR can point to an unexpected location:
>
> | ccache arm-linux-gnueabi-gcc ... context.c
> | ccache: failed to create .../serf/1.3.8-r0/.home/.ccache (No such file or directory)
>
> Issue is described in
>
>    http://www.scons.org/wiki/ImportingEnvironmentSettings
>
> and because 'bitbake' cleans environment we can pass it completely
> instead of trying to enumerate needed env.
>
> With the 'env.patch' the FULLCC variable is not needed anymore (which
> would break when CC is 'ccache arm-...-gcc' and host ccache is used)
> because the correct $PATH is available during scons build:
>
> | sh: .../sysroots/x86_64-oe-linux/usr/bin/arm-linux-gnueabi/ccache: No such file or directory
> | scons: *** [context.o] Error 127
>
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>   meta/recipes-support/serf/serf/env.patch | 28 ++++++++++++++++++++++++++++
>   meta/recipes-support/serf/serf_1.3.8.bb  |  9 +++------
>   2 files changed, 31 insertions(+), 6 deletions(-)
>   create mode 100644 meta/recipes-support/serf/serf/env.patch
>
> diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
> new file mode 100644
> index 0000000..9d073e9
> --- /dev/null
> +++ b/meta/recipes-support/serf/serf/env.patch
> @@ -0,0 +1,28 @@
> +'scons' cleans the environment which breaks ccache builds because
> +CCACHEDIR can point to an unexpected location:
> +
> +| ccache arm-linux-gnueabi-gcc ... context.c
> +| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
> +
> +Issue is described in
> +
> +  http://www.scons.org/wiki/ImportingEnvironmentSettings
> +
> +and because 'bitbake' cleans environment we can pass it completely
> +instead of trying to enumerate needed env.
> +
> +Upstream-Status: Inappropriate
> +
> +
> +Index: serf-1.3.6/SConstruct
> +===================================================================
> +--- serf-1.3.6.orig/SConstruct
> ++++ serf-1.3.6/SConstruct
> +@@ -149,6 +149,7 @@ if sys.platform == 'win32':
> + env = Environment(variables=opts,
> +                   tools=('default', 'textfile',),
> +                   CPPPATH=['.', ],
> ++                  ENV = os.environ,
> +                   )
> +
> + env.Append(BUILDERS = {
> diff --git a/meta/recipes-support/serf/serf_1.3.8.bb b/meta/recipes-support/serf/serf_1.3.8.bb
> index 10db122..e818889 100644
> --- a/meta/recipes-support/serf/serf_1.3.8.bb
> +++ b/meta/recipes-support/serf/serf_1.3.8.bb
> @@ -1,7 +1,7 @@
>   
>   SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-${PV}.tar.bz2 \
> -           file://norpath.patch"
> -SRC_URI[md5sum] = "2e4efe57ff28cb3202a112e90f0c2889"

Why remove md5sum? I think it is typo, and warning shows:

WARNING: Missing md5 SRC_URI checksum for 
/.../build/downloads/serf-1.3.8.tar.bz2, consider adding to the recipe:
SRC_URI[md5sum] = "2e4efe57ff28cb3202a112e90f0c2889"


--Kai

> +           file://norpath.patch \
> +           file://env.patch"
>   SRC_URI[sha256sum] = "e0500be065dbbce490449837bb2ab624e46d64fc0b090474d9acaa87c82b2590"
>   
>   LICENSE = "Apache-2.0"
> @@ -9,12 +9,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
>   
>   DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
>   
> -FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}"
> -FULLCC_class-native = "${CC}"
> -
>   do_compile() {
>   	${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
> -		CC="${FULLCC}" \
> +		CC="${CC}" \
>   		APR=`which apr-1-config` APU=`which apu-1-config` \
>   		CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
>   		OPENSSL="${STAGING_EXECPREFIXDIR}"


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-09  1:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 10:28 [PATCH] serf: fix 'ccache' builds Enrico Scholz
2014-11-20 20:32 ` Burton, Ross
2014-11-21 16:55 ` [PATCH v2] " Enrico Scholz
2014-12-09  1:45   ` Kang Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox