Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] lib/oe/utils: Set stderr for host_gcc_version()
@ 2018-12-13  3:19 Robert Yang
  2018-12-13  3:19 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2018-12-13  3:19 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 8bc0d2f2197430723f8b2d0785169e48c883eedb:

  mdadm: Drop redundant patches and fix build with clang (2018-12-09 11:08:07 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/stderr
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/stderr

Robert Yang (1):
  lib/oe/utils: Set stderr for host_gcc_version()

 meta/lib/oe/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.7.4



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

* [PATCH 1/1] lib/oe/utils: Set stderr for host_gcc_version()
  2018-12-13  3:19 [PATCH 0/1] lib/oe/utils: Set stderr for host_gcc_version() Robert Yang
@ 2018-12-13  3:19 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2018-12-13  3:19 UTC (permalink / raw)
  To: openembedded-core

Fixed:
$ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc
$ rm -fr tmp/hosttools/ && bitbake -p
[snip]
ERROR: Error running gcc  --version:

It didn't print the error message, now it is:
ERROR: Error running gcc  --version: ccache: error: Could not find compiler "gcc" in PATH

For the error itself, it is because ccache is not in my HOSTTOOLS, so this is
an expected error.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oe/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8a584d6..29b4115 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -366,7 +366,8 @@ def host_gcc_version(d, taskcontextonly=False):
     try:
         env = os.environ.copy()
         env["PATH"] = d.getVar("PATH")
-        output = subprocess.check_output("%s --version" % compiler, shell=True, env=env).decode("utf-8")
+        output = subprocess.check_output("%s --version" % compiler, \
+                    shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
     except subprocess.CalledProcessError as e:
         bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
 
-- 
2.7.4



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

end of thread, other threads:[~2018-12-13  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13  3:19 [PATCH 0/1] lib/oe/utils: Set stderr for host_gcc_version() Robert Yang
2018-12-13  3:19 ` [PATCH 1/1] " Robert Yang

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