Modify

Opened 10 years ago

Closed 10 years ago

#2659 closed defect (fixed)

[PATCH] 7.09 SDK fails under POSIX shell

Reported by: b.candler@… Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:

Description

Build Kamikaze 7.09 under Ubuntu 6.10, whose default /bin/sh is dash (a POSIX shell). See https://wiki.ubuntu.com/DashAsBinSh

Tell it to build the SDK and it builds just fine. However, when you untar the SDK, cd into it and try to use it, it fails:

$ make -n
cmd() { &>/dev/null make $* || {  echo "Build failed. Please re-run make with V=99 to see what's going on"; false; } } 3>&1 4>&2; cmd package/compile
/bin/sh: Syntax error: "&" unexpected
make: *** [world] Error 2

The following patch seems to fix it:

--- include/verbose.mk.orig     2007-11-06 11:40:05.000000000 +0000
+++ include/verbose.mk  2007-11-06 11:40:20.000000000 +0000
@@ -38,7 +38,7 @@
   else
     export QUIET:=1
     ifeq ($(KBUILD_VERBOSE),0)
-      MAKE:=&>/dev/null $(MAKE)
+      MAKE:=>/dev/null 2>&1 $(MAKE)
     endif
     MAKE:=cmd() { $(MAKE) $$* || {  echo "Build failed. Please re-run make with V=99 to see what's going on"; false; } } 3>&1 4>&2; cmd
   endif

The problem can also be replicated under Ubuntu 6.06, if you symlink /bin/sh -> dash instead of bash.

Please note that this system does have /bin/bash installed, and it has been detected: inside the untarred SDK, I can see

$ cat tmp/.host.mk 
HOST_OS:=Linux
HOST_ARCH:=i686
GNU_HOST_NAME:=i486-linux-gnu
TAR:=/bin/tar
BASH:=/bin/bash

It's just that the SDK (or make) appears to be using /bin/sh instead of /bin/bash. So another solution would be to get it to honour the $(BASH) setting.

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

added in r9643

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.