Giter Club home page Giter Club logo

bash2py's Introduction

bash2py

Bash-to-python transpiler
Latest version: 3.6 (with 4.0 anticipated)

Welcome to the new home of the Bash2Py project. The project's original home is https://www.swag.uwaterloo.ca/bash2py/index.html

Bash2py is a tool designed to automate the translation of code from Bash to Python.

We have attempted to ensure that the source code for Bash 4.3.30 remains intact within this distribution. All changes to this source code (by intent) are to be compiled if and only if the BASH2PY macro is defined. This allows ready discovery of how the original source code has been changed.

The main files changed are:

  1. Added: fix_string.c
    This attempts to mimic the bash command line transforms performed on the input prior to execution.

  2. Added: translate.c
    This attempts to translate high level bash commands. It is derived from print_cmd.c

  3. Added: translate_expr.c
    This parses arithmetic expressions. While the original code in expr.c did this to compute an arithmetic result, the modified code does this to reformat bash arithmetic expressions into (it is hoped) appropriate equivalent Python expressions.

  4. Changed & added: burp.c, dynamo.c
    These files contain internals of the buffering, logging and code generation APIs for the transpiler.

The document Bash2pyManual.html is a heavily modified version of the Bash reference manual that summarizes the progress of this project. It indicates which Bash constructs are likely to be translated correctly and which have not been addressed. Items highlighted in green are likely to be transpiled correctly, those in orange may translate correctly some of the time, and those in red are not expected to be translated correctly. Text in purple provides additional commentary.

Considerable work remains to be done on this tool. We distribute it as-is, with no warranty or guarantee as to its functionality whatsoever.

Contact:

Please reach out to the project maintainers via this online repository. The historical project coordinator, Ian Davis at [email protected], is no longer maintaining the project.

WARNING: It is highly recommended that you backup any file/directory you wish to translate before running bash2py on that file/directory. This is prototype software, and we do not guarantee the outcome.

Instructions for installation:

  • Working in Windows? We recommend the Cygwin Unix emulation layer and the bash-devel and cygwin-devel packages to provide all required header files. The standard GNU toolchain (gcc, make, autoconf) will enable you to build the project.

  • Working on Android? The standard GNU toolchain is adequate to build the project except for at least one symbol (mblen) that is missing from the libc system library. You can download this code from https://github.com/termux/libandroid-support and build and link it yourself to create the executable.

  • Download the latest version of this software

  • cd into the bash2py project

  • To setup, run this command:

./install

Usage

Run bash2py in any of the following ways:

  1. Using the front end interface to invoke bash2pyengine
./bash2py [-h] -f <SCRIPT>
./bash2py [-h] -d <DIRECTORY>
./bash2py [-h] <SCRIPT|DIRECTORY>
  1. Invoking this engine directly
./bash/bash2pyengine [--html] <SCRIPT>

If the -h/--html option is specified, a comparative before and after translation html file is generated rather than a python file. This is useful for observing the details of the translation process.

<SCRIPT> is replaced by the name of the script you want to translate, and <DIRECTORY> is the name of the directory you want to recursively translate.

Bash2py will put the translated Python file in the same directory as the corresponding Bash file, with the same name, but with a .py extension. HTML files will be assigned a .html extension.

Note: Bash2py is not perfect. You will have to review and edit the translated file by hand, to fix any errors that bash2py made in translation.

bash2py's People

Contributors

clarity20 avatar rubenkelevra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bash2py's Issues

Core dumps on any bash script

Compiling on Ubuntu 22.04, with the va_args fix others have mentioned, I get a core dumped on the most trivial of bash scripts. A script that is nothing but echo foo results in this:

 130 ❯ ./bash2py -f test.sh
Enter print_simple_command (simple_command->word='echo')
   .Enter isAssignment (startP='echo', local=FALSE)
   `Leave isAssignment () - 'echo' is NOT an assignment.

   .Enter fixBracedString (startP='"foo"', want=_VAR)
   `Leave fixBracedString () - Brace expr not detected, pass through to emitSpecial()
Leave print_simple_command () - 'echo' command processed.

Segmentation fault (core dumped)

Improve struct initialization throughout the code base

Initialization bugs were found in translate.c and fix_string.c for structs of type burpT; these have been fixed. I see another bug in fix_string.c for the g_translate object. Canvas the code base for similar initialization bugs to zap segfaults before they can happen.

Set up a basic wiki.

Add observations about project architecture.
Key ideas and pitfalls.
Don't duplicate source_code.txt but have them cross-reference each other.
Global buffers.
Global translator state machine g_translate.
FIX_... enums.
Quality of output & state of testing rig.
What's ripe for improvement.

Add stack tracing

As a first step toward good logging, document function calls and returns including the values pushed to & popped from the stack.

Auto-generate the helper classes and methods currently hard-coded in `translate.c`

The last 20% of this file consists largely of hard-coded python mini-routines that exhibit many of the patterns and pitfalls of copy-paste coding. This code can be significantly improved using techniques of automatic code generation.

Since the chunks of hard-coded python are tightly interleaved with the "governing" C code, if we want to get serious about this we should do some experimental prototyping without engaging the bash2py code per se. Just parameterize the python we see and keep going until we can generate all the code we wish to generate. Once we're confident we've got a good code generation system in place, we can integrate it into bash2py.

Segmentation fault (core dumped)

I have downloaded different version so far, all give the same error.
I feel I a missing some of the pre-requests to run this tool.
I followed those steps:

  1. I download the .zip file
  2. I unzip it.
  3. I move inside the bash-4.3.30 and run this command "chmod +x configure"
  4. I go back one step to the directory where the installation file is located, and I run "./install"
  5. Then it shows that the bash2pyengine is moved to ~bin
  6. then I put one file with .sh extension in the same bin file where the bash2pyengine is located, and I run "./bash2pyengine -f main.sh". The command "./bash2py -f main.sh" is not working because the bash2py is not a command.
  7. it always shows the same error, which is "Segmentation fault (core dumped)"
  8. The main.sh.py file is created, but it is always empty.

Any suggestion what I am doing wrong?????

Start a basic "contributing" document

Describe what "counts" as a contribution and how to contribute given the project's goals, state of maturity, etc.

  • Anything that "improves" the project: New features (refer to the colorful HTML), software quality improvements, transpilation fixes, transpilation cleanup, testing rig enhancements, documentation, . . .
  • Contributions should be high-quality
  • Testing is not very formal (as of now). For code changes, provide some use cases, state which existing test files you've run, describe your improvements, offer feedback about the current state of transpilation (as illustrated by your test results) or software quality

Building on OpenSUSE tumbleweed fails

Running ./install it ends with:

gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-unknown-linux-gnu"' -DCONF_VENDOR='"unknown"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib    -g -O2  -c burp.c
burp.c: In function ‘_build_log_entry’:
burp.c:326:24: error: invalid initializer
  326 |         va_list args = *pArgs;
      |                        ^
make: *** [Makefile:98: burp.o] Error 1

Some more info:

$ gcc --version
gcc (SUSE Linux) 13.2.1 20230912

This could be solved as

    va_list args;
    va_copy(args, *pArgs);

Not sure however.

Regex matching operator =~ needs proper treatment

For input such as

    [[ "$1" =~ r(.) ]]
    echo The matched character is "${BASH_REMATCH[1]}"

we need output equivalent to

    import sys,re
    match_object = re.search(r'r(.)', sys.argv[1])
    print("The matched character is " + match_object.group(1))

Additionally, regex matches used as test clauses in if and elif conditions need to be broken out in a similar (but different) fashion.

Convert array slicing operators correctly

Analogous to #19.

Examples:

Assume
x=(aa bb cc dd ee ff gg) -> x=['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'].

Then
${x[@]:3:2} -> ['dd', 'ee']
${x[@]:3} -> ['dd', 'ee', 'ff', 'gg']
${x[@]::5} -> ['aa', 'bb', 'cc', 'dd', 'ee']
${x[@]:1:-2} : not supported in bash-5.2.15

Segmentation fault

switchml () { typeset swfound=1;
if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then
typeset swname='main';
if [ -e /usr/lib/x86_64-linux-gnu/modulecmd.tcl ]; then
typeset swfound=0;
unset MODULES_USE_COMPAT_VERSION;
fi;
else
typeset swname='compatibility';
if [ -e /usr/lib/x86_64-linux-gnu/modulecmd-compat ]; then
typeset swfound=0;
MODULES_USE_COMPAT_VERSION=1;
export MODULES_USE_COMPAT_VERSION;
fi;
fi;
if [ $swfound -eq 0 ]; then
echo "Switching to Modules $swname version";
source /usr/share/modules/init/bash;
else
echo "Cannot switch to Modules $swname version, command not found";
return 1;
fi
}
module () { _module_raw "$@" 2>&1
Segmentation fault (core dumped)

It gave this when I ran with --verbose option, however, I am not sure what the problem is. It is also mentioned earlier somewhere else;
https://unix.stackexchange.com/questions/627842/problem-when-converting-bash-to-python-using-bash2py

build fails with -Werror=format-security

gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-pc-linux-gnu"' -DCONF_VENDOR='"pc"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib    -g -O2  -c burp.c
burp.c: In function ‘log_enter’:
burp.c:429:39: error: format not a string literal and no format arguments [-Werror=format-security]
  429 |                 fprintf(g_log_stream, log_entry);
      |                                       ^~~~~~~~~
burp.c: In function ‘log_info’:
burp.c:456:31: error: format not a string literal and no format arguments [-Werror=format-security]
  456 |         fprintf(g_log_stream, log_entry);
      |                               ^~~~~~~~~
burp.c: In function ‘log_return_msg’:
burp.c:496:39: error: format not a string literal and no format arguments [-Werror=format-security]
  496 |                 fprintf(g_log_stream, log_entry);
      |                                       ^~~~~~~~~
cc1: some warnings being treated as errors

fix:

-  fprintf(g_log_stream, log_entry)
+  fprintf(g_log_stream, "%s", log_entry)

Improvements to logging

With the creation of bool_to_text() and type_to_text(), we should roll out these routines wherever they can be used to good effect in log messages.

Let's also address the presentation of string values in the logs: the standard %s specifier for strings can be enhanced with, say, a %q specifier that treats the underlying value like a string but quotes it. (q for quote, see what I did there?) Seems a nice way to make the messages read more nicely without complicating the code.

Package and publish to PyPI

Would you consider packaging this Python package and publishing it to a package manager like PyPI.org? That would make installation as easy as pip install bash2py.

Compile to WASM and host a website with a textarea

My interest in this project came from https://curlconverter.com/ which translates curl commands (parsed using tree-sitter-bash and a re-implementation of curl's argument parsing logic in JavaScript) into Python (and other languages).

If you turned bash2py into a similar looking website then it would be easier to use, since people can just click a URL and paste Bash code instead of having to read a bunch of README file and run a bunch of shell commands.

Code duplication and simplification

Two basic, related items:

  1. There is lots of code duplication in translate.c, e.g. some format strings are repeated many times just with different arguments.

  2. A burp_insert() can be added alongside the existing burp_extend(). Pass it the string to be inserted and remove the hard-coding of string lengths.

Bug in bash2py.py

at line 17 the indentation is incorrectly made of 8 spaces instead of 1 tab

        if (lth == 1):

Make `bash_tests` test scripts more testable

Evidently, Chet Ramey & co. used run-all to do a lot of their bash testing. Since we are testing bash2py[engine] this won't quite work for us.

Preliminary work includes wrapping run-all in another script that sets the environments so we can at least run the run-* modules without changing the original code or inconveniencing ourselves.

But the process of validating results is also broken. We're taking the diffs of bash-script std{out,err} against the std{out,err} of bash2py (which is generally function stack traces), when in fact we need to diff the output of the bash scripts against that of the generated python scripts (or the diffs of the generated python code against "model" python code). To fix this, let's rework the command-line options for bash2py so as to allow on-the-spot execution of the generated python and to let the user choose the logging stream at runtime. (This is currently hardcoded to stdout).

Restructure and document the test cases directory

Lay some groundwork for more effective testing with an eye toward automation in the future.

Rename the existing test directories bash_tests and SWAG_tests. Create a v4_tests to hold new test cases. Document/explain these changes with a README in ../tests.

Add regex.sh (test script for issue #8) to v4_tests and start another README with some words of explanation.

segmentation fault processing certain redirection operators

Bash2Py has a bug when handling certain types of redirection operators (e.g., >&2):

$ grep '>' ../tests/tests1/trap4.sub
    trap 'echo "in trap EXIT">&2' EXIT
    echo 'sleep 2'>&2
    echo 'wait $!'>&2
...

echo $'run ../tests/tests1/trap4.sub\nbt' | gdb bash2pyengine
...
Program received signal SIGSEGV, Segmentation fault.
0x0000555555594ba1 in make_redirection (source=..., instruction=r_duplicating_output, dest_and_filename=..., 
    flags=0) at make_cmd.c:920
920       temp->position =  dest_and_filename.filename->position;
(gdb) #0  0x0000555555594ba1 in make_redirection (source=..., instruction=r_duplicating_output, 
    dest_and_filename=..., flags=0) at make_cmd.c:920
#1  0x0000555555584bf0 in yyparse () at ./parse.y:663
#2  0x000055555558374e in parse_command () at eval.c:265

where ./parse.y:663 is from the following production:

	|	GREATER_AND NUMBER
			{
			  source.dest = 1;
			  redir.dest = VALUE($2);
			  $$ = make_redirection (source, r_duplicating_output, redir, 0);
			}

A fix for this is to make sure the WORD_DESC structure is completely initialized before invoking make_redirection. For example,

#if DUMMY_WORD_DESC
WORD_DESC dummy_word_desc = { "dummy", 0, {0, 0, 0} };
#endif

...

#if DUMMY_WORD_DESC
			  redir.filename = &dummy_word_desc;
#endif
			  $$ = make_redirection (source, r_duplicating_output, redir, 0);

There are a dozen cases like this to be patched.

With this fix along with one disabling xmalloc (#5), the system now only aborts over 4 of the 500+ test files from the test suite. (About 100 of the tests abort due to this initialization bug.)

Set up linting in the build

The project has some historical code smells. We want to identify them, remedy the most critical ones, and avoid introducing new ones.

xmalloc leads to segmentation faults

The use of xmalloc is leading to segmentation faults, a known issue for more recent version of University of Waterloo's source (e.g., 3.0 and after).

Version 2.3 of Bash2Py works fine, as noted here. Following this lead, I tracked down the issue to the use of xmalloc, which were added in later versions.

A workaround for this is to map the xmalloc calls into regular malloc.

$ cat disable_xmalloc.h
#if !defined (_DISABLE_XMALLOC_H_)
#  define _DISABLE_XMALLOC_H_

#  ifdef BASH2PY

#    if 1	/* disable xmalloc since bug in burp.c usage */

#      include "stdc.h"
#      include "bashansi.h"

#      define xmalloc malloc
#      define xrealloc realloc
#      define xfree free

#  endif /* disable */

# endif /* BASH2PY */

#endif	/* _DISABLE_XMALLOC_H_ */


$ grep -c disable_xmalloc.h *.[cyh] | grep -v :0 | tr -d :1
burp.c
copy_cmd.c
eval.c
make_cmd.c
print_cmd.c
translate.c
translate_expr.c

I tested this over the 400+ scripts in the bash test, and 300+ now can be translated without segmentation faults. (Previously, running the code over just about any input would abort.)

Other modules have Bash2Py customizations, so disabling xmalloc in these should resolve the remaining sources of the segmentation faults. I tried disabling it globally, but ran into compilation issues.

Compilation issue and segfault

Even if I modify the Makefile this code is regenerated:

bash2pyengine: .made
	mv bash bash2pyengine
	cp bash2pyengine ~/bin/bash2pyengine

Better to add mkdir -p ~/bin to be sure the folder is present else this failed.

Else like other issues:

 ~/bin/bash2pyengine 
Erreur de segmentation

Improve variable type tracking and fixing

The transpiler often quotes variable names as if they were string literals. Also, type-fixing could be smarter. See for example the manual tweaks required on the last line of printf1.py in order to make it runnable.

Can't build on ARM64 Mac

On my M1 Macbook Air (M1 is Apple silicon, it's the ARM64 (also called AArch64) architecture) running macOS 14.2.1 with clang 15 I get this error:

/tmp$ cd /tmp/
/tmp$ git clone [email protected]:clarity20/bash2py.git
[...]
/tmp$ cd bash2py
/tmp/bash2py$ git checkout aac86d9
[...]
/tmp/bash2py$ ./install 
checking build system type... arm-apple-darwin23.2.0
checking host system type... arm-apple-darwin23.2.0

Beginning configuration for bash-4.3-release for arm-apple-darwin23.2.0

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for strerror in -lcposix... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /opt/homebrew/bin/ggrep
checking for egrep... /opt/homebrew/bin/ggrep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether gcc needs -traditional... no
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking for ar... ar
checking for ranlib... ranlib
checking for bison... bison -y
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for preprocessor stringizing operator... yes
checking for long double with more range or precision than double... no
checking for function prototypes... yes
checking whether char is unsigned... no
checking for working volatile... yes
checking for C/C++ restrict keyword... __restrict
checking whether NLS is requested... yes
checking for msgfmt... /opt/homebrew/bin/msgfmt
checking for gmsgfmt... /opt/homebrew/bin/msgfmt
checking for xgettext... /opt/homebrew/bin/xgettext
checking for msgmerge... /opt/homebrew/bin/msgmerge
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for sys/time.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether we are using the GNU C Library 2.1 or newer... no
checking whether integer division by zero raises SIGFPE... no
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unsigned long long... yes
checking for inttypes.h... yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for ld used by GCC... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking argz.h usability... no
checking argz.h presence... no
checking for argz.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for feof_unlocked... yes
checking for fgets_unlocked... no
checking for getc_unlocked... yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... no
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for localeconv... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strtoul... yes
checking for tsearch... yes
checking for __argz_count... no
checking for __argz_stringify... no
checking for __argz_next... no
checking for __fsetlocking... no
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for bison... bison
checking version of bison... 2.3, ok
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... no
checking whether to use NLS... yes
checking where the gettext function comes from... included intl directory
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether time.h and sys/time.h may both be included... yes
checking for inttypes.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking varargs.h usability... no
checking varargs.h presence... no
checking for varargs.h... no
checking for limits.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for locale.h... (cached) yes
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking termio.h usability... no
checking termio.h presence... no
checking for termio.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking for stddef.h... (cached) yes
checking for stdint.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for strings.h... (cached) yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking ulimit.h usability... yes
checking ulimit.h presence... yes
checking for ulimit.h... yes
checking sys/pte.h usability... no
checking sys/pte.h presence... no
checking for sys/pte.h... no
checking sys/stream.h usability... no
checking sys/stream.h presence... no
checking for sys/stream.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/param.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/time.h... (cached) yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for sys/ptem.h... no
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking whether getpgrp requires zero arguments... yes
checking for vprintf... yes
checking for _doprnt... no
checking for working strcoll... yes
checking return type of signal handlers... void
checking for __setostype... no
checking for wait3... yes
checking for mkfifo... yes
checking for dup2... yes
checking for eaccess... no
checking for fcntl... yes
checking for getdtablesize... yes
checking for getgroups... yes
checking for gethostname... yes
checking for getpagesize... (cached) yes
checking for getpeername... yes
checking for getrlimit... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for kill... yes
checking for killpg... yes
checking for lstat... yes
checking for readlink... yes
checking for sbrk... yes
checking for select... yes
checking for setdtablesize... no
checking for setitimer... yes
checking for tcgetpgrp... yes
checking for uname... yes
checking for ulimit... yes
checking for waitpid... yes
checking for rename... yes
checking for bcopy... yes
checking for bzero... yes
checking for confstr... yes
checking for faccessat... yes
checking for fnmatch... yes
checking for getaddrinfo... yes
checking for gethostbyname... yes
checking for getservbyname... yes
checking for getservent... yes
checking for inet_aton... yes
checking for imaxdiv... yes
checking for memmove... yes
checking for pathconf... yes
checking for putenv... (cached) yes
checking for raise... yes
checking for regcomp... yes
checking for regexec... yes
checking for setenv... (cached) yes
checking for setlinebuf... yes
checking for setlocale... (cached) yes
checking for setvbuf... yes
checking for siginterrupt... yes
checking for strchr... yes
checking for sysconf... yes
checking for syslog... yes
checking for tcgetattr... yes
checking for times... yes
checking for ttyname... yes
checking for tzset... yes
checking for unsetenv... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for isascii... yes
checking for isblank... yes
checking for isgraph... yes
checking for isprint... yes
checking for isspace... yes
checking for isxdigit... yes
checking for getpwent... yes
checking for getpwnam... yes
checking for getpwuid... yes
checking for getcwd... (cached) yes
checking for memset... yes
checking for strcasecmp... (cached) yes
checking for strcasestr... yes
checking for strerror... yes
checking for strftime... yes
checking for strnlen... yes
checking for strpbrk... yes
checking for strstr... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoul... (cached) yes
checking for strtoll... yes
checking for strtoull... yes
checking for strtoimax... yes
checking for strtoumax... yes
checking for dprintf... yes
checking for strchrnul... no
checking for strdup... (cached) yes
checking whether AUDIT_USER_TTY is declared... no
checking whether confstr is declared... yes
checking whether printf is declared... yes
checking whether sbrk is declared... yes
checking whether setregid is declared... yes
checking whether strcpy is declared... yes
checking whether strsignal is declared... yes
checking whether strtold is declared... yes
checking for broken strtold... yes
checking for declaration of strtoimax... yes
checking for declaration of strtol... yes
checking for declaration of strtoll... yes
checking for declaration of strtoul... yes
checking for declaration of strtoull... yes
checking for declaration of strtoumax... yes
checking for alarm... yes
checking for fpurge... yes
checking for __fpurge... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for working mktime... no
checking for argz.h... (cached) no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for malloc.h... (cached) no
checking stdio_ext.h usability... no
checking stdio_ext.h presence... no
checking for stdio_ext.h... no
checking for getpagesize... (cached) yes
checking for working mmap... (cached) yes
checking for __argz_count... (cached) no
checking for __argz_next... (cached) no
checking for __argz_stringify... (cached) no
checking for dcgettext... no
checking for mempcpy... (cached) no
checking for munmap... (cached) yes
checking for stpcpy... (cached) yes
checking for strcspn... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for mbrlen... yes
checking for mbscasecmp... no
checking for mbscmp... no
checking for mbsnrtowcs... yes
checking for mbsrtowcs... yes
checking for mbschr... no
checking for wcrtomb... yes
checking for wcscoll... yes
checking for wcsdup... yes
checking for wcwidth... yes
checking for wctype... yes
checking for wcswidth... yes
checking whether mbrtowc and mbstate_t are properly declared... yes
checking for iswlower... yes
checking for iswupper... yes
checking for towlower... yes
checking for towupper... yes
checking for iswctype... yes
checking for nl_langinfo and CODESET... yes
checking for wchar_t in wchar.h... yes
checking for wctype_t in wctype.h... yes
checking for wint_t in wctype.h... yes
checking for wcwidth broken with unicode combining characters... 
checking for locale_charset... yes
checking for dlopen in -ldl... yes
checking for dlopen... yes
checking for dlclose... yes
checking for dlsym... yes
checking whether sys_siglist is declared... yes
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for off_t... (cached) yes
checking for mode_t... yes
checking for uid_t in sys/types.h... (cached) yes
checking for pid_t... yes
checking for size_t... (cached) yes
checking for ssize_t... yes
checking for time_t... yes
checking for long long... long long
checking for unsigned long long... unsigned long long
checking return type of signal handlers... (cached) void
checking for sig_atomic_t in signal.h... yes
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of char *... 8
checking size of double... 8
checking size of long long... 8
checking for u_int... yes
checking for u_long... yes
checking for bits16_t... no
checking for u_bits16_t... no
checking for bits32_t... no
checking for u_bits32_t... no
checking for bits64_t... no
checking for ptrdiff_t... yes
checking whether stat file-mode macros are broken... no
checking whether #! works in shell scripts... yes
checking whether the ctype macros accept non-ascii characters... no
checking if dup2 fails to clear the close-on-exec flag... no
checking whether pgrps need synchronization... yes
checking for type of signal functions... posix
checking for sys_errlist and sys_nerr... yes
checking for sys_siglist in system C library... no
checking for _sys_siglist in signal.h or unistd.h... no
checking for _sys_siglist in system C library... no
checking whether signal handlers are of type void... yes
checking for clock_t... yes
checking for sigset_t... yes
checking for sig_atomic_t... yes
checking for quad_t... yes
checking for intmax_t... yes
checking for uintmax_t... yes
checking for socklen_t... yes
checking for size and type of struct rlimit fields... rlim_t
checking size of intmax_t... 8
checking for struct termios.c_line... no
checking for struct termio.c_line... no
checking for struct dirent.d_ino... yes
checking for struct dirent.d_fileno... yes
checking for struct dirent.d_namlen... yes
checking for struct winsize in sys/ioctl.h and termios.h... sys/ioctl.h
checking for struct timeval in sys/time.h and time.h... yes
checking for struct stat.st_blocks... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct timezone in sys/time.h and time.h... yes
checking for offset of exit status in return status from wait... 8
checking for struct timespec in <time.h>... yes
checking for struct stat.st_atim.tv_nsec... no
checking for struct stat.st_atimespec.tv_nsec... yes
checking for the existence of strsignal... no
checking if opendir() opens non-directories... no
checking whether ulimit can substitute for getdtablesize... no
checking whether fpurge is declared... yes
checking to see if getenv can be redefined... no
checking if getcwd() will dynamically allocate memory with 0 size... no
checking for presence of POSIX-style sigsetjmp/siglongjmp... missing
checking whether or not strcoll and strcmp differ... no
checking for standard-conformant snprintf... no
checking for standard-conformant vsnprintf... yes
checking for standard-conformant putenv declaration... yes
checking for standard-conformant unsetenv declaration... yes
checking for printf floating point output in hex notation... no
checking if signal handlers must be reinstalled when invoked... yes
checking for presence of necessary job control definitions... missing
checking for presence of named pipes... missing
checking whether termios.h defines TIOCGWINSZ... yes
checking for TIOCSTAT in sys/ioctl.h... yes
checking for FIONREAD in sys/ioctl.h... yes
checking whether WCONTINUED flag to waitpid is unavailable or available but broken... yes
checking for speed_t in sys/types.h... no
checking whether getpw functions are declared in pwd.h... yes
checking for unusable real-time signals due to large values... no
checking for tgetent... no
checking for tgetent in -ltermcap... yes
checking which library has the termcap functions... using libtermcap
checking whether /dev/fd is available... standard
checking whether /dev/stdin stdout stderr are available... present
checking for default mail directory... /var/mail
checking shared object configuration for loadable builtins... supported
configure: creating ./config.status
config.status: creating Makefile
config.status: creating builtins/Makefile
config.status: creating lib/readline/Makefile
config.status: creating lib/glob/Makefile
config.status: creating lib/intl/Makefile
config.status: creating lib/malloc/Makefile
config.status: creating lib/sh/Makefile
config.status: creating lib/termcap/Makefile
config.status: creating lib/tilde/Makefile
config.status: creating doc/Makefile
config.status: creating support/Makefile
config.status: creating po/Makefile.in
config.status: creating examples/loadables/Makefile
config.status: creating examples/loadables/perl/Makefile
config.status: creating config.h
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing default commands
bison -y -d ./parse.y
conflicts: 1 shift/reduce
touch parser-built
rm -f mksyntax
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"arm"' -DCONF_OSTYPE='"darwin23.2.0"' -DCONF_MACHTYPE='"arm-apple-darwin23.2.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl -I/tmp/bash2py/bash-4.3.30/lib/intl  -I/opt/homebrew/opt/node@20/include -g -O2  -L/opt/homebrew/opt/node@20/lib    -g -O2  -g -O2  -o mksyntax ./mksyntax.c 
./mksyntax.c:108:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
cdesc (i)
^
./mksyntax.c:152:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
getcstr (f)
^
./mksyntax.c:164:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
addcstr (str, flag)
^
./mksyntax.c:186:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
addcchar (c, flag)
^
./mksyntax.c:255:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
dump_lflags (fp, ind)
^
./mksyntax.c:281:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
wcomment (fp, i)
^
./mksyntax.c:293:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
dump_lsyntax (fp)
^
./mksyntax.c:314:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
main(argc, argv)
^
8 warnings generated.
rm -f syntax.c
./mksyntax -o syntax.c
/bin/sh ./support/mkversion.sh -b -S . -s release -d 4.3 -o newversion.h \
		&& mv newversion.h version.h
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"arm"' -DCONF_OSTYPE='"darwin23.2.0"' -DCONF_MACHTYPE='"arm-apple-darwin23.2.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl -I/tmp/bash2py/bash-4.3.30/lib/intl  -I/opt/homebrew/opt/node@20/include -g -O2  -DBUILDTOOL -c -o buildversion.o ./version.c
./version.c:83:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
show_shell_version (extended)
^
1 warning generated.
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"arm"' -DCONF_OSTYPE='"darwin23.2.0"' -DCONF_MACHTYPE='"arm-apple-darwin23.2.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl -I/tmp/bash2py/bash-4.3.30/lib/intl  -I/opt/homebrew/opt/node@20/include -g -O2  -L/opt/homebrew/opt/node@20/lib    -g -O2  -g -O2  -o bashversion ./support/bashversion.c buildversion.o 
./support/bashversion.c:70:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
  if (progname = strrchr (argv[0], '/'))
      ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
./support/bashversion.c:70:16: note: place parentheses around the assignment to silence this warning
  if (progname = strrchr (argv[0], '/'))
               ^
      (                                )
./support/bashversion.c:70:16: note: use '==' to turn this assignment into an equality comparison
  if (progname = strrchr (argv[0], '/'))
               ^
               ==
./support/bashversion.c:63:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
main (argc, argv)
^
2 warnings generated.

	  ***********************************************************
	  *                                                         *
	  * bash2py version 3.5 Dec 28 2023 19:05:59
Hacked from GNU bash 4.3.30(1)-release (arm-apple-darwin23.2.0)
	  *                                                         *
	  ***********************************************************

making lib/intl/libintl.a in ./lib/intl
cp ./libgnuintl.h.in libgnuintl.h
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  bindtextdom.c
In file included from bindtextdom.c:34:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
bindtextdom.c:103:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
set_binding_values (domainname, dirnamep, codesetp)
^
bindtextdom.c:353:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
BINDTEXTDOMAIN (domainname, dirname)
^
bindtextdom.c:87:25: note: expanded from macro 'BINDTEXTDOMAIN'
# define BINDTEXTDOMAIN libintl_bindtextdomain
                        ^
bindtextdom.c:364:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
BIND_TEXTDOMAIN_CODESET (domainname, codeset)
^
bindtextdom.c:88:34: note: expanded from macro 'BIND_TEXTDOMAIN_CODESET'
# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
                                 ^
4 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  dcgettext.c
In file included from dcgettext.c:25:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
dcgettext.c:49:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
DCGETTEXT (domainname, msgid, category)
^
dcgettext.c:42:20: note: expanded from macro 'DCGETTEXT'
# define DCGETTEXT libintl_dcgettext
                   ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  dgettext.c
In file included from dgettext.c:27:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
dgettext.c:51:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
DGETTEXT (domainname, msgid)
^
dgettext.c:44:19: note: expanded from macro 'DGETTEXT'
# define DGETTEXT libintl_dgettext
                  ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  gettext.c
In file included from gettext.c:32:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
gettext.c:57:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
GETTEXT (msgid)
^
gettext.c:49:18: note: expanded from macro 'GETTEXT'
# define GETTEXT libintl_gettext
                 ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  finddomain.c
In file included from finddomain.c:35:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
finddomain.c:52:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_find_domain (dirname, locale, domainname, domainbinding)
^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  loadmsgcat.c
In file included from loadmsgcat.c:90:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
In file included from loadmsgcat.c:91:
./hash-string.h:41:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
hash_string (str_param)
^
loadmsgcat.c:509:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
get_sysdep_segment_value (name)
^
loadmsgcat.c:767:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_init_domain_conv (domain_file, domain, domainbinding)
^
loadmsgcat.c:886:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_free_domain_conv (domain)
^
loadmsgcat.c:907:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_load_domain (domain_file, domainbinding)
^
6 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  localealias.c
In file included from localealias.c:65:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
localealias.c:153:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_expand_alias (name)
^
localealias.c:220:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
read_alias_file (fname, fname_len)
^
localealias.c:395:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
alias_compare (map1, map2)
^
4 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  textdomain.c
In file included from textdomain.c:33:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
textdomain.c:82:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
TEXTDOMAIN (domainname)
^
textdomain.c:72:21: note: expanded from macro 'TEXTDOMAIN'
# define TEXTDOMAIN libintl_textdomain
                    ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  l10nflist.c
l10nflist.c:93:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
argz_count__ (argz, len)
^
l10nflist.c:121:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
argz_stringify__ (argz, len, sep)
^
l10nflist.c:149:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
argz_next__ (argz, argz_len, entry)
^
l10nflist.c:176:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
pop (x)
^
l10nflist.c:190:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
^
l10nflist.c:399:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_normalize_codeset (codeset, name_len)
^
6 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  explodename.c
explodename.c:44:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_find_language (name)
^
explodename.c:56:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_explode_name (name, language, modifier, territory, codeset,
^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  dcigettext.c
In file included from dcigettext.c:92:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
In file included from dcigettext.c:99:
./hash-string.h:41:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
hash_string (str_param)
^
dcigettext.c:157:7: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
char *getcwd ();
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:449:7: note: conflicting prototype is here
char    *getcwd(char *, size_t);
         ^
In file included from dcigettext.c:431:
./eval-plural.h:33:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
plural_eval (pexp, n)
^
dcigettext.c:437:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
^
dcigettext.c:388:21: note: expanded from macro 'DCIGETTEXT'
# define DCIGETTEXT libintl_dcigettext
                    ^
dcigettext.c:737:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
^
dcigettext.c:1048:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
plural_lookup (domain, n, translation, translation_len)
^
dcigettext.c:1089:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
category_to_name (category)
^
dcigettext.c:1150:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
guess_category_value (category, categoryname)
^
dcigettext.c:1205:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
mempcpy (dest, src, n)
^
10 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  dcngettext.c
In file included from dcngettext.c:25:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
dcngettext.c:49:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
DCNGETTEXT (domainname, msgid1, msgid2, n, category)
^
dcngettext.c:42:21: note: expanded from macro 'DCNGETTEXT'
# define DCNGETTEXT libintl_dcngettext
                    ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  dngettext.c
In file included from dngettext.c:27:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
dngettext.c:51:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
DNGETTEXT (domainname, msgid1, msgid2, n)
^
dngettext.c:44:20: note: expanded from macro 'DNGETTEXT'
# define DNGETTEXT libintl_dngettext
                   ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  ngettext.c
In file included from ngettext.c:32:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
ngettext.c:59:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
NGETTEXT (msgid1, msgid2, n)
^
ngettext.c:51:19: note: expanded from macro 'NGETTEXT'
# define NGETTEXT libintl_ngettext
                  ^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  plural.c
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:77:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
new_exp (nargs, op, args)
^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:109:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
new_exp_0 (op)
^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:116:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
new_exp_1 (op, right)
^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:127:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
new_exp_2 (op, left, right)
^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:140:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
new_exp_3 (op, bexp, tbranch, fbranch)
^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:235:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
FREE_EXPRESSION (exp)
^
./plural-exp.h:103:26: note: expanded from macro 'FREE_EXPRESSION'
# define FREE_EXPRESSION libintl_gettext_free_exp
                         ^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:262:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
yylex (lval, pexp)
^
plural.c:51:17: note: expanded from macro 'yylex'
#define yylex   __gettextlex
                ^
/usr/src/local/bash/bash-20080814/lib/intl/plural.y:407:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
yyerror (str)
^
plural.c:52:17: note: expanded from macro 'yyerror'
#define yyerror __gettexterror
                ^
8 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  plural-exp.c
plural-exp.c:101:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
^
./plural-exp.h:106:36: note: expanded from macro 'EXTRACT_PLURAL_EXPRESSION'
# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
                                   ^
1 warning generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  localcharset.c
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  relocatable.c
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  localename.c
localename.c:386:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_locale_name (category, categoryname)
^
1 warning generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  log.c
log.c:33:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
print_escaped (stream, str)
^
log.c:57:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
_nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural)
^
2 warnings generated.
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  osdep.c
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/tmp/bash2py/bash-4.3.30 -I../.. -I/opt/homebrew/opt/node@20/include -g -O2  intl-compat.c
In file included from intl-compat.c:25:
./gettextP.h:73:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
SWAP (i)
^
intl-compat.c:62:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gettext (msgid)
^
intl-compat.c:71:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
dgettext (domainname, msgid)
^
intl-compat.c:81:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
dcgettext (domainname, msgid, category)
^
intl-compat.c:92:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
ngettext (msgid1, msgid2, n)
^
intl-compat.c:103:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
dngettext (domainname, msgid1, msgid2, n)
^
intl-compat.c:115:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
dcngettext (domainname, msgid1, msgid2, n, category)
^
intl-compat.c:128:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
textdomain (domainname)
^
intl-compat.c:137:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
bindtextdomain (domainname, dirname)
^
intl-compat.c:147:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
bind_textdomain_codeset (domainname, codeset)
^
10 warnings generated.
rm -f libintl.a
ar cr libintl.a bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o explodename.o dcigettext.o dcngettext.o dngettext.o ngettext.o plural.o plural-exp.o localcharset.o relocatable.o localename.o log.o osdep.o intl-compat.o
ranlib libintl.a
cmp libgnuintl.h libintl.h || cp libgnuintl.h libintl.h
cmp: libintl.h: No such file or directory
/bin/sh ./config.charset 'arm-apple-darwin23.2.0' > t-charset.alias
mv t-charset.alias charset.alias
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' ./ref-add.sin > t-ref-add.sed
mv t-ref-add.sed ref-add.sed
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' ./ref-del.sin > t-ref-del.sed
mv t-ref-del.sed ref-del.sed
rm -f shell.o
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"arm"' -DCONF_OSTYPE='"darwin23.2.0"' -DCONF_MACHTYPE='"arm-apple-darwin23.2.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl -I/tmp/bash2py/bash-4.3.30/lib/intl  -I/opt/homebrew/opt/node@20/include -g -O2  -c shell.c
shell.c:758:7: error: call to undeclared function 'get_tty_state'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      get_tty_state ();
      ^
shell.c:769:3: error: call to undeclared function 'initialize_translator'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  initialize_translator(shell_scriptP);
  ^
shell.c:769:3: note: did you mean 'initialize_traps'?
./trap.h:64:13: note: 'initialize_traps' declared here
extern void initialize_traps __P((void));
            ^
shell.c:773:3: error: call to undeclared function 'close_translator'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  close_translator();
  ^
shell.c:363:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
main (argc, argv, env)
^
shell.c:779:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
parse_long_options (argv, arg_start, arg_end)
^
shell.c:834:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
parse_shell_options (argv, arg_start, arg_end)
^
shell.c:859:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
      while (arg_character = arg_string[i++])
             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
shell.c:859:28: note: place parentheses around the assignment to silence this warning
      while (arg_character = arg_string[i++])
                           ^
             (                              )
shell.c:859:28: note: use '==' to turn this assignment into an equality comparison
      while (arg_character = arg_string[i++])
                           ^
                           ==
shell.c:925:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
exit_shell (s)
^
shell.c:970:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
sh_exit (s)
^
shell.c:985:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
subshell_exit (s)
^
shell.c:1027:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
execute_env_file (env_file)
^
shell.c:1179:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
shell_is_restricted (name)
^
shell.c:1200:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
maybe_make_restricted (name)
^
shell.c:1332:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
run_one_command (command)
^
shell.c:1363:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
bind_args (argv, arg_start, arg_end, start_index)
^
shell.c:1378:14: warning: passing arguments to 'list_reverse' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      args = REVERSE_LIST (args, WORD_LIST *);
             ^
./general.h:129:46: note: expanded from macro 'REVERSE_LIST'
  ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \
                                             ^
shell.c:1425:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
open_shell_script (script_name)
^
shell.c:1596:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
unset_bash_input (check_zero)
^
shell.c:1622:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
set_shell_name (argv0)
^
shell.c:1768:3: error: call to undeclared function 'initialize_job_control'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  initialize_job_control (jobs_m_flag);
  ^
shell.c:1842:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
show_shell_usage (fp, extra)
^
shell.c:1881:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
      fprintf (fp, _("Use the `bashbug' command to report bugs.\n"));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./bashintl.h:36:18: note: expanded from macro '_'
#define _(msgid)        gettext(msgid)
                        ^~~~~~~~~~~~~~
./lib/intl/libintl.h:128:18: note: expanded from macro 'gettext'
# define gettext libintl_gettext
                 ^
shell.c:1881:20: note: treat the string as an argument to avoid this
      fprintf (fp, _("Use the `bashbug' command to report bugs.\n"));
                   ^
                   "%s", 
./bashintl.h:36:18: note: expanded from macro '_'
#define _(msgid)        gettext(msgid)
                        ^
./lib/intl/libintl.h:128:18: note: expanded from macro 'gettext'
# define gettext libintl_gettext
                 ^
shell.c:1886:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
add_shopt_to_alist (opt, on_or_off)
^
19 warnings and 4 errors generated.
make: *** [shell.o] Error 1
ls: cannot access 'bash2pyengine': No such file or directory
/tmp/bash2py$ 
$ gcc --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I tried compiling regular Bash 4.3 like this:

cd /tmp
git clone https://git.savannah.gnu.org/git/bash.git
cd bash
git checkout ca6a2ba # Bash-4.3 patch 30
./configure && make

and got similar errors:

gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"arm"' -DCONF_OSTYPE='"darwin23.2.0"' -DCONF_MACHTYPE='"arm-apple-darwin23.2.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl -I/tmp/bash/lib/intl -I/opt/homebrew/opt/node@20/include -g -O2 -c shell.c
shell.c:745:7: error: call to undeclared function 'get_tty_state'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      get_tty_state ();
      ^
shell.c:356:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
main (argc, argv, env)
^
shell.c:760:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
parse_long_options (argv, arg_start, arg_end)
^
shell.c:815:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
parse_shell_options (argv, arg_start, arg_end)
^
shell.c:840:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
      while (arg_character = arg_string[i++])
             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
shell.c:840:28: note: place parentheses around the assignment to silence this warning
      while (arg_character = arg_string[i++])
                           ^
             (                              )
shell.c:840:28: note: use '==' to turn this assignment into an equality comparison
      while (arg_character = arg_string[i++])
                           ^
                           ==
shell.c:906:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
exit_shell (s)
^
shell.c:951:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
sh_exit (s)
^
shell.c:966:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
subshell_exit (s)
^
shell.c:1008:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
execute_env_file (env_file)
^
shell.c:1160:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
shell_is_restricted (name)
^
shell.c:1181:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
maybe_make_restricted (name)
^
shell.c:1313:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
run_one_command (command)
^
shell.c:1344:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
bind_args (argv, arg_start, arg_end, start_index)
^
shell.c:1355:14: warning: passing arguments to 'list_reverse' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
      args = REVERSE_LIST (args, WORD_LIST *);
             ^
./general.h:129:46: note: expanded from macro 'REVERSE_LIST'
  ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \
                                             ^
shell.c:1402:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
open_shell_script (script_name)
^
shell.c:1573:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
unset_bash_input (check_zero)
^
shell.c:1599:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
set_shell_name (argv0)
^
shell.c:1745:3: error: call to undeclared function 'initialize_job_control'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  initialize_job_control (jobs_m_flag);
  ^
shell.c:1819:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
show_shell_usage (fp, extra)
^
shell.c:1858:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
      fprintf (fp, _("Use the `bashbug' command to report bugs.\n"));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./bashintl.h:36:18: note: expanded from macro '_'
#define _(msgid)        gettext(msgid)
                        ^~~~~~~~~~~~~~
./lib/intl/libintl.h:128:18: note: expanded from macro 'gettext'
# define gettext libintl_gettext
                 ^
shell.c:1858:20: note: treat the string as an argument to avoid this
      fprintf (fp, _("Use the `bashbug' command to report bugs.\n"));
                   ^
                   "%s", 
./bashintl.h:36:18: note: expanded from macro '_'
#define _(msgid)        gettext(msgid)
                        ^
./lib/intl/libintl.h:128:18: note: expanded from macro 'gettext'
# define gettext libintl_gettext
                 ^
shell.c:1863:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
add_shopt_to_alist (opt, on_or_off)
^
19 warnings and 2 errors generated.
make: *** [shell.o] Error 1

I can compile the latest Bash (commit 4b0f8ba2) though. Bash commit 8868edaf (Bash 5.1) is the first commit I can compile on my machine. Looking at the Homebrew formula for older Bash versions

https://github.com/Homebrew/homebrew-core/blob/9a9d87761e8ae0202440278c5835dd6805fa698c/Formula/bash.rb

it seems like there were some patches that might help here, but they 404 now (and also ARM64-based Macs didn't exist back then). They were probably these patches:

https://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-030

The ideal way to fix this would be to rebase bash2py onto the most recent Bash version (Bash 5.2).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.