LFS build problems

Hi everyone,

so I retried my LFS attempt and now, I’m up until Chapter 6.4, Compiling bash. I’ve followed the instructions in the book, but I keep getting the same error.

The output (it’s quite long)

�lfs:/mnt/lfs/sources/bash-5.2.37$ make DESTDIR=$LFS install
make[1]: Entering directory ‘/mnt/lfs/sources/bash-5.2.37/builtins’
rm -f mkbuiltins.o
gcc -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I.. -I../include -I../lib -I. -Wno-parentheses -Wno-format-security -g -DCROSS_COMPILING mkbuiltins.c
mkbuiltins.c: In function ‘main’:
mkbuiltins.c:232:1: warning: old-style function definition [-Wold-style-definition]
232 | main (argc, argv)
| ^~~~
mkbuiltins.c:267:29: error: too many arguments to function ‘xmalloc’; expected 0, have 1
267 | error_directory = xmalloc (2 + strlen (argv[arg_index]));
| ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:307:34: error: too many arguments to function ‘xmalloc’; expected 0, have 1
307 | temp_struct_filename = xmalloc (15);
| ^~~~~~~ ~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:312:13: error: too many arguments to function ‘file_error’; expected 0, have 1
312 | file_error (temp_struct_filename);
| ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:206:6: note: declared here
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c:320:13: error: too many arguments to function ‘file_error’; expected 0, have 1
320 | file_error (extern_filename);
| ^~~~~~~~~~ ~~~~~~~~~~~~~~~
mkbuiltins.c:206:6: note: declared here
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c:324:7: error: too many arguments to function ‘write_file_headers’; expected 0, have 2
324 | write_file_headers (structfile, externfile);
| ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
mkbuiltins.c:209:6: note: declared here
209 | void write_file_headers ();
| ^~~~~~~~~~~~~~~~~~
mkbuiltins.c:341:7: error: too many arguments to function ‘extract_info’; expected 0, have 3
341 | extract_info (arg, structfile, externfile);
| ^~~~~~~~~~~~ ~~~
mkbuiltins.c:204:6: note: declared here
204 | void extract_info ();
| ^~~~~~~~~~~~
mkbuiltins.c:348:7: error: too many arguments to function ‘write_file_footers’; expected 0, have 2
348 | write_file_footers (structfile, externfile);
| ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
mkbuiltins.c:210:6: note: declared here
210 | void write_file_footers ();
| ^~~~~~~~~~~~~~~~~~
mkbuiltins.c:352:11: error: too many arguments to function ‘write_longdocs’; expected 0, have 2
352 | write_longdocs (structfile, saved_builtins);
| ^~~~~~~~~~~~~~ ~~~~~~~~~~
mkbuiltins.c:214:6: note: declared here
214 | void write_longdocs ();
| ^~~~~~~~~~~~~~
mkbuiltins.c: In function ‘array_create’:
mkbuiltins.c:387:1: warning: old-style function definition [-Wold-style-definition]
387 | array_create (width)
| ^~~~~~~~~~~~
mkbuiltins.c:392:20: error: too many arguments to function ‘xmalloc’; expected 0, have 1
392 | array = (ARRAY *)xmalloc (sizeof (ARRAY));
| ^~~~~~~ ~~~~~~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c: In function ‘copy_string_array’:
mkbuiltins.c:407:1: warning: old-style function definition [-Wold-style-definition]
407 | copy_string_array (array)
| ^~~~~~~~~~~~~~~~~
mkbuiltins.c:422:26: error: too many arguments to function ‘xmalloc’; expected 0, have 1
422 | copy->array = (char **)xmalloc ((1 + array->sindex) * sizeof (char *));
| ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:68:31: error: too many arguments to function ‘xmalloc’; expected 0, have 1
68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
| ^~~~~~~ ~~~~~~~~~~~~~~
mkbuiltins.c:425:22: note: in expansion of macro ‘savestring’
425 | copy->array[i] = savestring (array->array[i]);
| ^~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c: In function ‘array_add’:
mkbuiltins.c:434:1: warning: old-style function definition [-Wold-style-definition]
434 | array_add (element, array)
| ^~~~~~~~~
mkbuiltins.c:439:29: error: too many arguments to function ‘xrealloc’; expected 0, have 2
439 | array->array = (char **)xrealloc
| ^~~~~~~~
440 | (array->array, (array->size += array->growth_rate) * array->width);
| ~~~~~~~~~~~~
mkbuiltins.c:62:27: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~~
mkbuiltins.c: In function ‘array_free’:
mkbuiltins.c:448:1: warning: old-style function definition [-Wold-style-definition]
448 | array_free (array)
| ^~~~~~~~~~
mkbuiltins.c: In function ‘find_directive’:
mkbuiltins.c:497:1: warning: old-style function definition [-Wold-style-definition]
497 | find_directive (directive)
| ^~~~~~~~~~~~~~
mkbuiltins.c: In function ‘extract_info’:
mkbuiltins.c:527:1: warning: old-style function definition [-Wold-style-definition]
527 | extract_info (filename, structfile, externfile)
| ^~~~~~~~~~~~
mkbuiltins.c:530:1: error: number of arguments doesn’t match prototype
530 | {
| ^
mkbuiltins.c:204:6: error: prototype declaration
204 | void extract_info ();
| ^~~~~~~~~~~~
mkbuiltins.c:539:5: error: too many arguments to function ‘file_error’; expected 0, have 1
539 | file_error (filename);
| ^~~~~~~~~~ ~~~~~~~~
mkbuiltins.c:206:6: note: declared here
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c:544:5: error: too many arguments to function ‘file_error’; expected 0, have 1
544 | file_error (filename);
| ^~~~~~~~~~ ~~~~~~~~
mkbuiltins.c:206:6: note: declared here
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c:547:12: error: too many arguments to function ‘xmalloc’; expected 0, have 1
547 | buffer = xmalloc (1 + file_size);
| ^~~~~~~ ~~~~~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:550:5: error: too many arguments to function ‘file_error’; expected 0, have 1
550 | file_error (filename);
| ^~~~~~~~~~ ~~~~~~~~
mkbuiltins.c:206:6: note: declared here
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c:566:22: error: too many arguments to function ‘xmalloc’; expected 0, have 1
566 | defs = (DEF_FILE *)xmalloc (sizeof (DEF_FILE));
| ^~~~~~~ ~~~~~~~~~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:603:23: error: too many arguments to function ‘xmalloc’; expected 0, have 1
603 | directive = xmalloc (j);
| ^~~~~~~ ~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:612:15: error: too many arguments to function ‘line_error’; expected 0, have 3
612 | line_error (defs, “Unknown directive `%s’”, directive);
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c:630:13: error: too many arguments to function ‘add_documentation’; expected 0, have 2
630 | add_documentation (defs, line);
| ^~~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:220:6: note: declared here
220 | void add_documentation ();
| ^~~~~~~~~~~~~~~~~
mkbuiltins.c:660:3: error: too many arguments to function ‘write_builtins’; expected 0, have 3
660 | write_builtins (defs, structfile, externfile);
| ^~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:215:6: note: declared here
215 | void write_builtins ();
| ^~~~~~~~~~~~~~
mkbuiltins.c:663:3: error: too many arguments to function ‘free_defs’; expected 0, have 1
663 | free_defs (defs);
| ^~~~~~~~~ ~~~~
mkbuiltins.c:219:6: note: declared here
219 | void free_defs ();
| ^~~~~~~~~
mkbuiltins.c: In function ‘free_builtin’:
mkbuiltins.c:669:1: warning: old-style function definition [-Wold-style-definition]
669 | free_builtin (builtin)
| ^~~~~~~~~~~~
mkbuiltins.c: In function ‘free_defs’:
mkbuiltins.c:692:1: warning: old-style function definition [-Wold-style-definition]
692 | free_defs (defs)
| ^~~~~~~~~
mkbuiltins.c:694:1: error: number of arguments doesn’t match prototype
694 | {
| ^
mkbuiltins.c:219:6: error: prototype declaration
219 | void free_defs ();
| ^~~~~~~~~
mkbuiltins.c: In function ‘strip_whitespace’:
mkbuiltins.c:725:1: warning: old-style function definition [-Wold-style-definition]
725 | strip_whitespace (string)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c:731:3: error: too many arguments to function ‘remove_trailing_whitespace’; expected 0, have 1
731 | remove_trailing_whitespace (string);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
mkbuiltins.c:223:6: note: declared here
223 | void remove_trailing_whitespace ();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘remove_trailing_whitespace’:
mkbuiltins.c:737:1: warning: old-style function definition [-Wold-style-definition]
737 | remove_trailing_whitespace (string)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:739:1: error: number of arguments doesn’t match prototype
739 | {
| ^
mkbuiltins.c:223:6: error: prototype declaration
223 | void remove_trailing_whitespace ();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘get_arg’:
mkbuiltins.c:755:1: warning: old-style function definition [-Wold-style-definition]
755 | get_arg (for_whom, defs, string)
| ^~~~~~~
mkbuiltins.c:764:5: error: too many arguments to function ‘line_error’; expected 0, have 3
764 | line_error (defs, “%s requires an argument”, for_whom);
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c:68:31: error: too many arguments to function ‘xmalloc’; expected 0, have 1
68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
| ^~~~~~~ ~~~~~~~~~~~~~~
mkbuiltins.c:766:11: note: in expansion of macro ‘savestring’
766 | return (savestring (new));
| ^~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c: In function ‘must_be_building’:
mkbuiltins.c:771:1: warning: old-style function definition [-Wold-style-definition]
771 | must_be_building (directive, defs)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c:774:1: error: number of arguments doesn’t match prototype
774 | {
| ^
mkbuiltins.c:222:6: error: prototype declaration
222 | void must_be_building ();
| ^~~~~~~~~~~~~~~~
mkbuiltins.c:776:5: error: too many arguments to function ‘line_error’; expected 0, have 3
776 | line_error (defs, “%s must be inside of a $BUILTIN block”, directive);
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘current_builtin’:
mkbuiltins.c:781:1: warning: old-style function definition [-Wold-style-definition]
781 | current_builtin (directive, defs)
| ^~~~~~~~~~~~~~~
mkbuiltins.c:785:3: error: too many arguments to function ‘must_be_building’; expected 0, have 2
785 | must_be_building (directive, defs);
| ^~~~~~~~~~~~~~~~ ~~~~~~~~~
mkbuiltins.c:771:1: note: declared here
771 | must_be_building (directive, defs)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘add_documentation’:
mkbuiltins.c:795:1: warning: old-style function definition [-Wold-style-definition]
795 | add_documentation (defs, line)
| ^~~~~~~~~~~~~~~~~
mkbuiltins.c:798:1: error: number of arguments doesn’t match prototype
798 | {
| ^
mkbuiltins.c:220:6: error: prototype declaration
220 | void add_documentation ();
| ^~~~~~~~~~~~~~~~~
mkbuiltins.c:803:3: error: too many arguments to function ‘remove_trailing_whitespace’; expected 0, have 1
803 | remove_trailing_whitespace (line);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:737:1: note: declared here
737 | remove_trailing_whitespace (string)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘builtin_handler’:
mkbuiltins.c:816:1: warning: old-style function definition [-Wold-style-definition]
816 | builtin_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~
mkbuiltins.c:827:7: error: too many arguments to function ‘line_error’; expected 0, have 3
827 | line_error (defs, “%s found before $END”, self);
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c:840:25: error: too many arguments to function ‘xmalloc’; expected 0, have 1
840 | new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC));
| ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:62:14: note: declared here
62 | static char *xmalloc (), *xrealloc ();
| ^~~~~~~
mkbuiltins.c:849:7: error: too many arguments to function ‘is_special_builtin’; expected 0, have 1
849 | if (is_special_builtin (name))
| ^~~~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:194:12: note: declared here
194 | static int is_special_builtin ();
| ^~~~~~~~~~~~~~~~~~
mkbuiltins.c:851:7: error: too many arguments to function ‘is_assignment_builtin’; expected 0, have 1
851 | if (is_assignment_builtin (name))
| ^~~~~~~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:195:12: note: declared here
195 | static int is_assignment_builtin ();
| ^~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:853:7: error: too many arguments to function ‘is_localvar_builtin’; expected 0, have 1
853 | if (is_localvar_builtin (name))
| ^~~~~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:196:12: note: declared here
196 | static int is_localvar_builtin ();
| ^~~~~~~~~~~~~~~~~~~
mkbuiltins.c:855:7: error: too many arguments to function ‘is_posix_builtin’; expected 0, have 1
855 | if (is_posix_builtin (name))
| ^~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:197:12: note: declared here
197 | static int is_posix_builtin ();
| ^~~~~~~~~~~~~~~~
mkbuiltins.c:857:7: error: too many arguments to function ‘is_arrayvar_builtin’; expected 0, have 1
857 | if (is_arrayvar_builtin (name))
| ^~~~~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:198:12: note: declared here
198 | static int is_arrayvar_builtin ();
| ^~~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘function_handler’:
mkbuiltins.c:868:1: warning: old-style function definition [-Wold-style-definition]
868 | function_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c:879:7: error: too many arguments to function ‘line_error’; expected 0, have 2
879 | line_error (defs, “syntax error: no current builtin for $FUNCTION directive”);
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c:883:5: error: too many arguments to function ‘line_error’; expected 0, have 4
883 | line_error (defs, “%s already has a function (%s)”,
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘docname_handler’:
mkbuiltins.c:893:1: warning: old-style function definition [-Wold-style-definition]
893 | docname_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~
mkbuiltins.c:903:5: error: too many arguments to function ‘line_error’; expected 0, have 4
903 | line_error (defs, “%s already had a docname (%s)”,
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘short_doc_handler’:
mkbuiltins.c:913:1: warning: old-style function definition [-Wold-style-definition]
913 | short_doc_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~~~
mkbuiltins.c:923:5: error: too many arguments to function ‘line_error’; expected 0, have 4
923 | line_error (defs, “%s already has short documentation (%s)”,
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘comment_handler’:
mkbuiltins.c:933:1: warning: old-style function definition [-Wold-style-definition]
933 | comment_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘depends_on_handler’:
mkbuiltins.c:943:1: warning: old-style function definition [-Wold-style-definition]
943 | depends_on_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘produces_handler’:
mkbuiltins.c:964:1: warning: old-style function definition [-Wold-style-definition]
964 | produces_handler (self, defs, arg)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c:977:5: error: too many arguments to function ‘line_error’; expected 0, have 4
977 | line_error (defs, “%s already has a %s definition”, defs->filename, self);
| ^~~~~~~~~~ ~~~~
mkbuiltins.c:207:6: note: declared here
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c:988:9: error: too many arguments to function ‘file_error’; expected 0, have 1
988 | file_error (defs->production);
| ^~~~~~~~~~ ~~~~~~~~~~~~~~~~
mkbuiltins.c:206:6: note: declared here
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘end_handler’:
mkbuiltins.c:998:1: warning: old-style function definition [-Wold-style-definition]
998 | end_handler (self, defs, arg)
| ^~~~~~~~~~~
mkbuiltins.c:1003:3: error: too many arguments to function ‘must_be_building’; expected 0, have 2
1003 | must_be_building (self, defs);
| ^~~~~~~~~~~~~~~~ ~~~~
mkbuiltins.c:771:1: note: declared here
771 | must_be_building (directive, defs)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘line_error’:
mkbuiltins.c:1016:1: warning: old-style function definition [-Wold-style-definition]
1016 | line_error (defs, format, arg1, arg2)
| ^~~~~~~~~~
mkbuiltins.c:1019:1: error: number of arguments doesn’t match prototype
1019 | {
| ^
mkbuiltins.c:207:6: error: prototype declaration
207 | void line_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘file_error’:
mkbuiltins.c:1030:1: warning: old-style function definition [-Wold-style-definition]
1030 | file_error (filename)
| ^~~~~~~~~~
mkbuiltins.c:1032:1: error: number of arguments doesn’t match prototype
1032 | {
| ^
mkbuiltins.c:206:6: error: prototype declaration
206 | void file_error ();
| ^~~~~~~~~~
mkbuiltins.c: In function ‘xmalloc’:
mkbuiltins.c:1046:1: warning: old-style function definition [-Wold-style-definition]
1046 | xmalloc (bytes)
| ^~~~~~~
mkbuiltins.c: In function ‘xrealloc’:
mkbuiltins.c:1057:1: warning: old-style function definition [-Wold-style-definition]
1057 | xrealloc (pointer, bytes)
| ^~~~~~~~
mkbuiltins.c: In function ‘copy_builtin’:
mkbuiltins.c:1090:1: warning: old-style function definition [-Wold-style-definition]
1090 | copy_builtin (builtin)
| ^~~~~~~~~~~~
mkbuiltins.c:1095:25: error: too many arguments to function ‘xmalloc’; expected 0, have 1
1095 | new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC));
| ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c:1046:1: note: declared here
1046 | xmalloc (bytes)
| ^~~~~~~
mkbuiltins.c:68:31: error: too many arguments to function ‘xmalloc’; expected 0, have 1
68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
| ^~~~~~~ ~~~~~~~~~~~~~~
mkbuiltins.c:1097:15: note: in expansion of macro ‘savestring’
1097 | new->name = savestring (builtin->name);
| ^~~~~~~~~~
mkbuiltins.c:1046:1: note: declared here
1046 | xmalloc (bytes)
| ^~~~~~~
mkbuiltins.c:68:31: error: too many arguments to function ‘xmalloc’; expected 0, have 1
68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
| ^~~~~~~ ~~~~~~~~~~~~~~
mkbuiltins.c:1098:19: note: in expansion of macro ‘savestring’
1098 | new->shortdoc = savestring (builtin->shortdoc);
| ^~~~~~~~~~
mkbuiltins.c:1046:1: note: declared here
1046 | xmalloc (bytes)
| ^~~~~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘is_localvar_builtin’:
mkbuiltins.c:1661:1: warning: old-style function definition [-Wold-style-definition]
1661 | is_localvar_builtin (name)
| ^~~~~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘is_posix_builtin’:
mkbuiltins.c:1668:1: warning: old-style function definition [-Wold-style-definition]
1668 | is_posix_builtin (name)
| ^~~~~~~~~~~~~~~~
mkbuiltins.c: In function ‘is_arrayvar_builtin’:
mkbuiltins.c:1675:1: warning: old-style function definition [-Wold-style-definition]
1675 | is_arrayvar_builtin (name)
| ^~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:223: mkbuiltins.o] Error 1
make[1]: Leaving directory ‘/mnt/lfs/sources/bash-5.2.37/builtins’
make: *** [Makefile:762: builtins/builtext.h] Error 1

I do not know what’s causing this. Any help would be appreciated.

Thanks,

George

1 Like

Always look at the first error message.

It seems to me that you are using the wrong C version option in gcc

ie. is it C89 or C99 or C11 …..?

The gcc option to set these is eg) -std=C90

It would seem the arguments for xmalloc() have changed as C has shifted standards.

xmalloc() should be the same as malloc() , but it is not in the standard library so where is its definition?

It is a guess, I may be wrong.

4 Likes

@George1

What are you using to build LFS with?

2 Likes

I assume this must be a placeholder; the real prototype takes a size_t argument.

Not related to your issue:

You include the parent directory twice.

:open_mouth:

int main(int argc, const char **argv)
2 Likes

Arch Linux, book 12.3-stable-systemd.

1 Like

Why not try the Gentoo live ISO and SysVinit?

1 Like

A group of us are going to try to have monthly meetings online and work on building various programs similar to BLFS. You’re welcome to join in. Maybe we can help debug the issue.

3 Likes

Oh, you can use live ISO’s to build? I’m gonna try with openSUSE.

1 Like

openSUSE will not have the tools you need!!! Gentoo and Slackware are the best, but getting a live Slackware ISO is not easy. Are you building, bare metal or VirtualBox? What are your expectations for LFS?

2 Likes

I’m building on a separate partition (sda3). I (at least) want to finish LFS base so I can move on to BLFS and similar.

1 Like

What exactly do you mean by not easy?:open_mouth:

2 Likes

@George1

Yes, very familiar with this method, I still prefer booting a live iso, either from a usb or with VirtualBox and the ISO.

Working on BLFS!!!

1 Like

@abu

Probably my internet service, but took me over 2hrs to download the ISO!!! While it did work with LFS, it is nowhere the ISO that Gentoo has!!! From that link!!!

1 Like

I checked https://slackware.nl/ and found the reason for the long download:

I provide several mirrors on this server, which is connected to the Internet via a 250 Mbps connection (thanks to donations from several people who allow me to keep paying the rent).

My own US mirror with 1 Gbps bandwidth:
http://us.slackware.nl/ and https://us.slackware.nl/
rsync://us.slackware.nl/mirrors/

2 Likes

I have often wondered about these rsync downloads.
Why use that rather than ftp ?

2 Likes

Update: Now on chapter 8.20! Finally finished binutils make and now proceeding to check.

5 Likes

Because you can resume?
Also - “rsync” is how mirrors mostly work… i.e. the mirror hosting the resource / ISO / repository, updates from an upstream source, using rsync…

3 Likes