Re: autotools
Hi, > can't figure out how to download the files without all that HTML junk. The HTML view is for quick peeking. (I.e. Trac junk) SVN resides on a different URL. >From http://libburnia.pykix.org : " svn co http://libburnia-svn.pykix.org/libburn/trunk libburn_pykix For building the libraries and binaries you will need autotools of at least version 1.7. " Command ./bootstrap on my machine produces a ./configure with three occurences of "for ac_header in": $ grep 'for ac_header in' ./configure for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ for ac_header in dlfcn.h for ac_header in The last one is the offender. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools
Hi, me: > > There are two old forms of for-loops: Volker Kuhlmann: > Current bash lists it as valid syntax, so it's not "old". "Old" in the sense of not the "new" for (( expr1 ; expr2 ; expr3 )) ; do list ; done "Old" in the sense of being mentioned by S.R.Bourne in his book "The UNIX System". > Read the man bash again. I read in my man 1 bash: for name [ in word ] ; do list ; done Not: for name [ in [ word ] ] ; do list ; done > "If the expansion of the items following in results in an empty > list, no commands are executed, and the return status is 0." So meanwhile it is declared an intended feature indeed. Nevertheless ./configure created by autotools should rather not rely on such a border case. autotools claims to enable portability to a wide range of existing systems. I.e. systems not as they are specified today, but as they are installed in reality. Two elder Linux plus one (probably young) Solaris constitute enough existence to make this a bug in autotools resp. in our autotools configuration. Well, as said, we got our reasons to stick with autotools. Wether it lets us look stupid from time to time or not. Probably we deserve it. :)) Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools
On Tue 24 Apr 2007 23:27:15 NZST +1200, Thomas Schmitt wrote: > I read in my man 1 bash: > for name [ in word ] ; do list ; done > Not: > for name [ in [ word ] ] ; do list ; done And not: for name [ in word1 word2 ... wordn ] ; do list ; done yet it works as expected, or in a way to make it useful. I have no old "authoritative" sh at hand, but a Solaris 2.7 /bin/sh spits a dummy on an empty item list. I view that as a dumb design (one would have to enclose for loops in a check for empty item lists), since corrected. Agreed that anything wanting to be portable should take this sort of thing into account. I'd hate to be the one to sort out all the cr*p shells. Every other sane programming language allows empty loops. Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools
On Wed, Apr 25, 2007 at 01:13:14AM +1200, Volker Kuhlmann wrote: > I have no old "authoritative" sh at hand, but a Solaris 2.7 /bin/sh > spits a dummy on an empty item list. I view that as a dumb design (one > would have to enclose for loops in a check for empty item lists), since > corrected. I don't have a copy of POSIX.2 (the shell stuff), so I have to refer to the Single Unix Specification: http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_009_004_002 for name [ in word ... ] do compound-list done First, the list of words following in will be expanded to generate a list of items. Then, the variable name will be set to each item, in turn, and the compound-list executed each time. If no items result from the expansion, the compound-list will not be executed. You don't have to perform a separate check for an "empty item list". This is perfectly valid, and will do nothing: words="" for i in $words; do echo hello, world; done If Solaris's shell is giving any output or errors from the commands above, then it's crap. (Which means autoconf would have to work around it.) For Joerg: the fact that Solaris does NOT put its POSIX-compliant shell in /bin/sh is a source of unending pain. Since you can't use #!PATH=`getconf PATH`; sh in a script, it's useless in real life. Real scripts have to put SOMETHING on the shebang line, and the only thing we can use is #!/bin/sh Gods, how I wish POSIX had mandated something like "posix-shell" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools
Hi, Greg Wooledge: > http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_009_004_002 > First, the list of words following in will be expanded to generate a list > of items. Then, the variable name will be set to each item, in turn, > and the compound-list executed each time. If no items result from the > expansion, the compound-list will not be executed. Looks like these POSIX specs have been interpreted differently by the shell developers in the past. On the SuSE 6.x system: $ bash --version GNU bash, version 2.03.0(1)-release (i686-pc-linux-gnu) Copyright 1998 Free Software Foundation, Inc. $ for i in ; do echo hello ; done bash: syntax error near unexpected token `;' $ x="" $ for i in $x ; do echo hello ; done $ The decisive point seems wether the "list of words following in" is allowed to be empty or not. An empty result of its expansion is allowed and even a 9 year old bash knows that. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools
Greg Wooledge <[EMAIL PROTECTED]> wrote: > You don't have to perform a separate check for an "empty item list". This > is perfectly valid, and will do nothing: > > words="" > for i in $words; do echo hello, world; done > > If Solaris's shell is giving any output or errors from the commands above, > then it's crap. (Which means autoconf would have to work around it.) > > For Joerg: the fact that Solaris does NOT put its POSIX-compliant shell > in /bin/sh is a source of unending pain. Since you can't use > > #!PATH=`getconf PATH`; sh > > in a script, it's useless in real life. Real scripts have to put SOMETHING > on the shebang line, and the only thing we can use is > > #!/bin/sh > > Gods, how I wish POSIX had mandated something like "posix-shell" You still have to learn a lot on standards There have been at least 3 attempts to standardize #! in order to find a way to distribute POSIX compliant shell scripts. It was not possible to find a way to do this without breaking POSIX. The fact that Solaris still has a Bourne shell in /bin/sh is no POSIX noncompliance but rather something that helps with backwards compatgibility. Note that ksh93 is not compatible to the Bourne Shell. Platforms that change /bin/sh fro the Bourne shell to something else just do not care about their customers Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools
"Thomas Schmitt" <[EMAIL PROTECTED]> wrote: > Hi, > > Greg Wooledge: > > http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_009_004_002 > > First, the list of words following in will be expanded to generate a list > > of items. Then, the variable name will be set to each item, in turn, > > and the compound-list executed each time. If no items result from the > > expansion, the compound-list will not be executed. > > Looks like these POSIX specs have been interpreted differently > by the shell developers in the past. > > On the SuSE 6.x system: > > $ bash --version The problem with bash is that it is definitely not POSIX compliant. There are many deviations from POSIX in bash. If you like to know more, ask David Korn. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
autotools. was: problems writing a large file to DVD+R Double Layer disk
Hi, > I understand all about writing portable scripts with autoconf, Could you have a look into our autotools configuration ? The root directory can be inspected at http://libburnia.pykix.org/browser/libburn/trunk Can you spot the reason why our configure gets that empty loop list ? A pointer to some autotools specs where i could learn about the background would be best, of course. I am quite sure one can avoid that empty loop list by some variable ... but by which one ? So for now i just run sed -e 's/^for ac_header in$/test -z 1 \&\& for ac_header in dummy/' to get a more portable ./configure. The reasons why we still use autotools although we are not really in control of it are simple: The popularity of "./configure ; make" and the fact that it reduces the complex work of build configuration to fixing a few simple bugs. So for now all its little sins did not count enough to sincerely strive for a change. But there are days like yesterday where i at least dream of shell scripts which are not larger than a few hundred lines. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
autotools. was: problems writing a large file to DVD+R Double Layer disk
Hi, > > This shell silently ignores "for i in ; do something ; done". > But this does not make the code portable For portability i now apply sed to the generated ./configure. But as said, a functional port demands a hand-made system adapter anyway. I can hardly expect autotools to know about the system interfaces for SCSI command transport. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools. was: problems writing a large file to DVD+R Double Layer disk
"Thomas Schmitt" <[EMAIL PROTECTED]> wrote: > Hi, > > > > This shell silently ignores "for i in ; do something ; done". > > But this does not make the code portable > > For portability i now apply sed to the generated > ./configure. > > But as said, a functional port demands a hand-made > system adapter anyway. The problem is to use any "autoconf" newer than 2.13. After that time, portability has been given up for no reason. The schily makefilesystem uses the schily autoconf which is a largely enhanced GNU autoconf-2.13. I did not yet see any problem with my autoconf on any OS. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: autotools. was: problems writing a large file to DVD+R Double Layer disk
"Thomas Schmitt" <[EMAIL PROTECTED]> wrote: > Hi, > > > I understand all about writing portable scripts with autoconf, > > Could you have a look into our autotools configuration ? > The root directory can be inspected at > http://libburnia.pykix.org/browser/libburn/trunk > > Can you spot the reason why our configure gets that > empty loop list ? > A pointer to some autotools specs where i could learn > about the background would be best, of course. The best idea to check for shell portability is to make sure that you have the Bourne shell in /bin/sh for your tests. This will still not give you the kind of portability that allows you to compile on Next Step ;-) The Bourne Shell is free software and published under CDDL, so there is no problem to compile it even on Linux if you do not have a Solaris installation. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]