Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] Avoid misleading error output caused by missing shell quotes
@ 2014-11-12 13:31 Jens Stimpfle
  2014-11-12 13:31 ` [Buildroot] [PATCH 2/2] Unclutter standard error output while feature testing for 32 bit gcc Jens Stimpfle
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jens Stimpfle @ 2014-11-12 13:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Jens Stimpfle <debian@jstimpfle.de>
---

Notes:
    When g++ is not installed, a misleading error message turns up because
    of a bad combination of an unquoted shell variable and control flow.
    
    > ~/buildroot$ make
    >
    > You may have to install 'g++' on your build machine
    > /home/testuser/buildroot/support/dependencies/dependencies.sh: 136: [: -lt: unexpected operator
    
    This is a nonintrusive workaround.

 support/dependencies/dependencies.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index a9c5b31..4b8991d 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -118,7 +118,6 @@ CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null)
 if [ -z "$CXXCOMPILER" ] ; then
 	CXXCOMPILER=$(which c++ 2> /dev/null)
 fi
-
 if [ -z "$CXXCOMPILER" ] ; then
 	echo
 	echo "You may have to install 'g++' on your build machine"
@@ -130,7 +129,8 @@ if [ ! -z "$CXXCOMPILER" ] ; then
 		echo
 		echo "You may have to install 'g++' on your build machine"
 	fi
-
+fi
+if [ ! -z "$CXXCOMPILER_VERSION" ] ; then
 	CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g")
 	CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
 	if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
-- 
2.1.1

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

end of thread, other threads:[~2014-12-08 21:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 13:31 [Buildroot] [PATCH 1/2] Avoid misleading error output caused by missing shell quotes Jens Stimpfle
2014-11-12 13:31 ` [Buildroot] [PATCH 2/2] Unclutter standard error output while feature testing for 32 bit gcc Jens Stimpfle
2014-11-18 22:38   ` Yann E. MORIN
2014-11-18 22:36 ` [Buildroot] [PATCH 1/2] Avoid misleading error output caused by missing shell quotes Yann E. MORIN
2014-12-08 21:33 ` Thomas Petazzoni

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