Open-source Languages & Tools for z/OS

 View Only
  • 1.  Problems with BASH 4.3

    Posted 01-06-2020 10:07

    Hello, everybody.

    first of all I would like to thank you for porting these wonderful open source tools.

    i have some problems with bash4.3. at the moment i start bash4.2 in my ~/.profile file with the following command

    if [ $?prompt ]; then
      if [ -z "$BASH" ]; then
        if [ -x /u/tools/bash4.2/bin/bash ]; then
            exec /u/tools/bash4.2/bin/bash --login
        fi
      fi
    fi
    

    This is going very well. (Except that I am fixed on codepage 1047)

    If I change the above code to bash4.3 there are massive problems. A lot of nonsense is output on the console. It looks to me like the file /etc/profile is interpreted as an ASCII file. But it is EBCDIC and untagged.

    If I leave out the “–login” parameter, /etc/profile is not sourced and I have my shell.
    Unfortunately with the following error message:

    bash: warning: setlocale: LC_ALL: cannot change locale (En_US.IBM-1047)

    Another problem is that, unlike in 4.2, the German umlauts do not work.

    Best regards, Mike



  • 2.  RE: Problems with BASH 4.3

    Posted 01-06-2020 10:33

    Hi Mike,
    Thanks for your interest to porting tools.
    Bash-4.3 has enhanced ASCII support and it requires to set up additional environment variables.
    I would recommend to try this code:

    export _BPXK_AUTOCVT=ON
    export _CEE_RUNOPTS='FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'
    exec /u/tools/bash4.3/bin/bash --login


  • 3.  RE: Problems with BASH 4.3

    Posted 01-06-2020 10:42

    Hi Tatyana,

    thanks for your fast reply.
    I already did this exports in my ~/.profile.

    # ======================================================================
    #                      BASH CONFIGURATION
    # ======================================================================
    export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
    export _BPXK_AUTOCVT=ON
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt
    

    As I said, did I start the Bash without a --login, so without sourcing the global /etc/ profile,
    the bash “almost” runs fine. Then only the error message regarding the code page
    and the problem with the umlauts remains.

    MIKEG1:/u/mikeg1:>export _BPXK_AUTOCVT=ON
    MIKEG1:/u/mikeg1:>export _CEE_RUNOPTS='FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'
    MIKEG1:/u/mikeg1:>exec /u/tools/bash4.3/bin/bash --login
    bash: warning: setlocale: LC_ALL: cannot change locale (En_US.IBM-1047)
    bash: $'@▒\231\226\227\205\231▒▒@\226\206@▒▒▒@@@@@@@@@@@@@@@@@@@@@@@@@@@\025{@@@@@@@▒▒▒▒': command not found
    bash: $'@@@▒▒▒▒~a\202\211\225za▒▒\231a\223\227\227a▒▒▒▒▒▒\025{@@@@@@@@@@@@@\205▒\227\226\231▒@▒▒▒▒\025{\025{@▒\225\226▒\210\205\231@\224\205▒\210\226\204@▒\226@\203\226\225\203\201▒\205\225\201▒\205@\201\225\204@\201\223▒\226@\201\223\223\226▒@\206\226\231@\205\201▒\211\205\231\025{@\224\201\225\201\207\205\224\205\225▒@\211▒@\202▒@▒▒\211\225\207@▒\210\205@\227\231\205▒\211\226▒▒@▒\205▒▒\211\225\207@\226\206@▒\210\201▒@\205\225▒\211\231\226\225\224\205\225▒\025{@▒\201\231\211\201\202\223\205K\025{\025{@ŧ\201\224\227\223\205@': command not found
    bash: $'\211\225▒\205\231\201\203▒\211▒\205\025{@▒\210\205\223\223▒k@\206\226\231@\205▒\201\224\227\223\205@▒\210\226▒\205@▒▒\201\231▒\205\204@▒\211▒\210@▒\210\205@▒▒▒▒▒▒▒▒@\201\225\204@▒▒▒▒▒▒\025{@▒▒\211\223\211▒\211\205▒K\025{@▒\210\205@\205▒\205\203@▒\211\223\223@\231\205▒▒\201\231▒@▒\210\205@\203▒\231\231\205\225▒@▒\210\205\223\223k@\201▒@\201@\223\226\207\211\225@▒\210\205\223\223@▒\211▒\210@▒\210\205\025{@▒\201\224\205@\201\231\207▒\224▒@\225\201\224\205K\025{@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\025▒▒▒~[M▒▒▒▒\201\231@▒▒▒▒▒▒▒]\025\211\206@▒@': command not found
    

    Regards Mike



  • 4.  RE: Problems with BASH 4.3

    Posted 01-07-2020 13:10

    Mike,
    As I said before, bash-4.3 has enhanced ASCII support, so behave regarding untagged files differs from bash-4.2.

    It looks to me like the file /etc/profile is interpreted as an ASCII file. But it is EBCDIC and untagged.

    Yes, bash-4.3 considers that untagged files have ASCII data.

    bash: warning: setlocale: LC_ALL: cannot change locale (En_US.IBM-1047)

    Could you try “export LANG=En_US.IBM-1047”? This command doesn’t cause an error, but we can’t guarantee that it is compatible with bash-4.3.

    Gibberish in output might be related to your environment settings. I can’t reproduce it on my machine. You can minimize your config files and add commands one by one to see what causes the problem. If you have this issues even with the shortest config, please, let us know.

    Another problem is that, unlike in 4.2, the German umlauts do not work.

    Unfortunately, we don’t use umlauts in our work. Could you describe an use case(s) so we would be able to reproduce the problem?

    Best regards,
    Tatyana