Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode

2020-07-17 Thread Oğuz
See:

$ set +k -o posix
$ echo foo=~:~
foo=~:/home/oguz

If I'm not misreading the standard `foo=~:~' should be printed
verbatim, all shells I have except bash does so.

This is reproducible on 5.1 alpha too.

Oğuz



Re: (IMPORTANT/URGENT) Regarding Missing Files in bash source code?

2020-07-17 Thread Andreas Schwab
On Jul 17 2020, Chet Ramey wrote:

> So Greg's advice is appropriate: find out why bison is looking for that
> file,

It is one of its installed files used during runtime.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



Re: (IMPORTANT/URGENT) Regarding Missing Files in bash source code?

2020-07-17 Thread Chet Ramey
On 7/17/20 11:58 AM, Humanities Clinic wrote:
> Dear Mr/Ms Chet Ramey
> 
> Thank you for your response.
> 
> Just to confirm if I got your reply right, are you saying that y.tab.c is
> part of bison, and not the bash source code?

No. y.tab.c is the output of bison run on a parser description file. As
Greg explained, I distribute that file with bash to reduce the number of
external dependencies, and you should be able to run bison against
parse.y to recreate it.

But that's not the problem. The error message is from bison, and the file
it cannot find is part of the bison distribution:


> > bison: /usr/local/Cellar/bison/3.3.2/share/bison/m4sugar/m4sugar.m4:
> cannot
> > open: No such file or directory

So Greg's advice is appropriate: find out why bison is looking for that
file, since that appears to be the reason bison is returning a non-zero
exit status.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: (IMPORTANT/URGENT) Regarding Missing Files in bash source code?

2020-07-17 Thread Humanities Clinic
Dear Mr/Ms Chet Ramey

Thank you for your response.

Just to confirm if I got your reply right, are you saying that y.tab.c is
part of bison, and not the bash source code?

Regards,
Chai

On Fri, Jul 17, 2020 at 10:22 PM Chet Ramey  wrote:

> On 7/17/20 10:10 AM, Humanities Clinic wrote:
> > Ok noted.
> >
> > By the way, I do have another related problem. Can you help me with it?
> >
> > When I run make (I run it with the -i option), I see the following
> > output for the first invoked command:
> >
> > bison -y -d ./parse.y
> >
> > ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
> >
> > bison: /usr/local/Cellar/bison/3.3.2/share/bison/m4sugar/m4sugar.m4:
> cannot
> > open: No such file or directory
> >
> > make: [y.tab.c] Error 1 (ignored)
>
> This file is part of the bison distribution. I have no idea what it is or
> why bison needs it to run, but you need to look at bison for the solution.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
>


Re: (IMPORTANT/URGENT) Regarding Missing Files in bash source code?

2020-07-17 Thread Chet Ramey
On 7/17/20 10:10 AM, Humanities Clinic wrote:
> Ok noted.
> 
> By the way, I do have another related problem. Can you help me with it?
> 
> When I run make (I run it with the -i option), I see the following
> output for the first invoked command:
> 
> bison -y -d ./parse.y
> 
> ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
> 
> bison: /usr/local/Cellar/bison/3.3.2/share/bison/m4sugar/m4sugar.m4: cannot
> open: No such file or directory
> 
> make: [y.tab.c] Error 1 (ignored)

This file is part of the bison distribution. I have no idea what it is or
why bison needs it to run, but you need to look at bison for the solution.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: (IMPORTANT/URGENT) Regarding Missing Files in bash source code?

2020-07-17 Thread Greg Wooledge
On Fri, Jul 17, 2020 at 10:10:21PM +0800, Humanities Clinic wrote:
> When I run make (I run it with the -i option), I see the following
> output for the first invoked command:
> 
> bison -y -d ./parse.y
> 
> ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
> 
> bison: /usr/local/Cellar/bison/3.3.2/share/bison/m4sugar/m4sugar.m4: cannot
> open: No such file or directory

This sounds like bison is not correctly installed on your system.
If it were *my* system, I would reinstall bison from its source
code.  Either that, or figure out why that particular file isn't
being found.  Reinstalling is probably easier.

> make: [y.tab.c] Error 1 (ignored)
> May I know what does the last line mean? I understand from
> https://www.gnu.org/software/make/manual/html_node/Error-Messages.html that
> it means that invoking y.tab.c returned an error code of 1. The thing is,
> there's no command that involves the file y.tab.c? I don't really
> understand how y.tab.c came into the picture.

y.tab.c is the name of the file that make is trying to create.

When building bash from a released tarball, you do not need bison.
Chet already ran bison on the parser source files to produce bison's
output, and included that in the release tarball, in order to reduce
the number of build dependencies.

But, if you are *not* using a release tarball, or if you modified
one of the parser source files, then bison has to be run during the
build.  (This may sometimes happen when patching, for example.)



Re: (IMPORTANT/URGENT) Regarding Missing Files in bash source code?

2020-07-17 Thread Humanities Clinic
Ok noted.

By the way, I do have another related problem. Can you help me with it?

When I run make (I run it with the -i option), I see the following
output for the first invoked command:

bison -y -d ./parse.y

./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]

bison: /usr/local/Cellar/bison/3.3.2/share/bison/m4sugar/m4sugar.m4: cannot
open: No such file or directory

make: [y.tab.c] Error 1 (ignored)
May I know what does the last line mean? I understand from
https://www.gnu.org/software/make/manual/html_node/Error-Messages.html that
it means that invoking y.tab.c returned an error code of 1. The thing is,
there's no command that involves the file y.tab.c? I don't really
understand how y.tab.c came into the picture.

Regards,
Chai

On Wed, Jun 24, 2020 at 8:04 PM Greg Wooledge  wrote:

> On Wed, Jun 24, 2020 at 01:09:48PM +0800, Humanities Clinic wrote:
> > version.c:27:10: fatal error: 'version.h' file not found
>
> > jobs.c:72:10: fatal error: 'builtins/builtext.h' file not found
>
> > I double-checked the original folder in
> > http://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz. It's true these files
> are
> > missing.
> >
> > May I know why is this so, and how this can be rectified?
>
> These files are generated during the build process.
>
> Did you run "./configure" (or some equivalent) before running "make"?
> Were there any errors during the configure stage?  Were there any
> earlier errors during the make stage?
>
> The version.h file in a bash-3.2 build tree should look something like
> this:
>
>
> /* Version control for the shell.  This file gets changed when you say
>`make version.h' to the Makefile.  It is created by mkversion. */
>
> /* The distribution version number of this shell. */
> #define DISTVERSION "3.2"
>
> /* The last built version of this shell. */
> #define BUILDVERSION 1
>
> /* The release status of this shell. */
> #define RELSTATUS "release"
>
> /* A version string for use by sccs and the what command. */
> #define SCCSVERSION "@(#)Bash version 3.2.0(1) release GNU"
>
>
>
> During the make stage of the build, you should have seen something
> like this:
>
>
> /bin/sh ./support/mkversion.sh -b -S . -s release -d 3.2 -o newversion.h \
> && mv newversion.h version.h
>
>
> If that step didn't occur, or if there was an error during it, then
> that would explain why your version.h file wasn't generated.
>