[kde-solaris] GNU Makefiles should only use Bourne Shell Syntax -
Not Bash. (was: Re: Unhelpful error building dcop in kdelibs)
funtoos at yahoo.com
Mon Jan 31 20:29:05 CET 2005
But understand that the guy(most of the young brigade
of developers) who started out using and knowing only
bash, will probably not know much about compatibility
with sh and the scripts he is writing are working
perfect because he is doing his development on linux.
Most of the time they don't even have the access to
solaris/hpux to test out their stuff. What do you
expect for free, people!!
I am not encouraging people to digress from
documentation but GNU should probably make it a
requirement to have /bin/sh point to /bin/bash for
using its libraries/tools. I have been using that
setup on my solaris forever and I have yet to see any
--- Rolf Sponsel <Rolf.Sponsel at kstr.lth.se> wrote:
> Stefan Teleman, 2005-01-31 17:30 GMT +01:00, wrote:
> > No.
> > The GNU autoconf/libtool/configure stuff is
> written for the
> > *GNU/Linux* /bin/sh. On GNU/Linux systems,
> /bin/sh is either a
> > symlink to the Bourne Again Shell, a.k.a. bash, or
> a duplicate
> > of the /bin/bash binary:
> > [steleman at darthvader][~][01/31/2005 7:27:44]>>
> ls -la /bin/sh
> > lrwxrwxrwx 1 root root 4
> 2003-12-27 23:33 /bin/sh ->
> > bash
> GNU, and the GNU tools, have been around long before
> the name Linux even existed.
> The presence of a link '/bin/sh' ponting to bash
> state that there is something called "GNU/Linux*
> It only indicates that bash, which is the
> "Shell of the GNU operating system", is
> an sh-compatible shell. See bash, at:
> This is why it's perfectly legal to link '/bin/sh'
> to bash.
> But this is also the reason for why, ususally Linux
> *don't* understand why it's so important for
> portability to
> stay away of non-sh-syntax available in bash.
> > [steleman at darthvader][~][01/31/2005 11:22:09]>>
> uname -a
> > Linux darthvader.nyc.rr.com 2.4.20-6 #1 Thu Feb 27
> 10:06:59 EST 2003
> > i686 i686 i386 GNU/Linux
> > (this is RedHat 9).
> > The Bourne shell and the Bourne Again Shell are
> not one and the same.
> Exactly! And this is why they, the GNU people,
> point out that it is important to distinguish
> between them,
> and always make sure that e.g. bash extensions are
> not to
> being used (as explicitly stated in the GNU
> > On Solaris, CONFIG_SHELL must be explicitly set to
> /bin/bash, and the
> > #!/bin/sh directives at top of all autoconf
> scripts should be changed
> > to #!/bin/bash, including libtool and ./configure,
> because /bin/sh
> > and /bin/bash are two different binaries. /bin/sh
> on Solaris is the
> > old, original Bourne shell, written by Stephen
> Bourne. The easiest
> > way of doing this is to do
> > :1,$ s#/bin/sh#/bin/bash#g
> > in ./configure and in libtool.
> ... which, of course, is the wrong way of solving
> the problem
> in the long run (although fine for overcoming
> problems in
> anticipation for the build files to become
> > It is not true that the FSF pages contain
> references to the Bourne
> > shell. They contain references to /bin/sh, which
> on GNU/Linux means
> > the Bourne Again Shell, i.e. bash.
> > --Stefan
> I'm sorry to have to disappoint you here (although I
> fully can
> understand your logic). The documentation explicitly
> "Write the Makefile commands (and any shell scripts,
> such as configure) to run in sh, not in csh. Don't
> use any special features of ksh or bash."
> > -------
> > On Monday 31 January 2005 09:26, Rolf Sponsel
> >>If you need bash to run the Makefile,
> >>then the Makefile does not follow
> >>the gnu makefile recommendations,
> >>and thus should be fixed.
> >>Please have a look at the GNU make documentation.
> >>GNU make: Makefile Basics
> >> 14.1 General Conventions for Makefiles
> >>Bourne shell, NOT Bourne again shell!
> >>Help spreading the awareness about this!
> >>/ Rolf
> >>Michael Lambrellis, 2005-01-31 05:57 GMT +01:00,
> >>>OK. I got past this. I had to replace all the
> "SHELL = /bin/sh"
> >>>lines in the Makefiles with "SHELL = /my/bash".
> By the way, is
> >>>there an easy way to do this using the configure
> script? Is it as
> >>>simple as: SHELL=/my/bash ./configure ...
> >>>In any case, I used a little search-and replace
> tool called gsar
> >>>that I HIGHLY recommend to have around.
> >>>... SNIP ...
> Rolf Sponsel
> This message is from the kde-solaris mailing list.
> Account management:
> Archives: http://lists.kde.org/.
> More info: http://www.kde.org/faq.html.
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
More information about the kde-solaris