Error building Bash-5.2.37 (12.3-systemd)
袁博实 ([email protected] via lfs-support Mailing List) <[email protected]> Sat, 28 Jun 2025 13:36:10 +0800
| Newsgroups | gmane.linux.lfs.support |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I encountered build errors when building bash, I (seem to) have fixed
them, so I would like to provide some feedbacks.
Book version: 12.3-systemd
Host OS $(uname -r): 6.15.3-arch1-1
The output from the Host System Requirements script: All OK
The section: 6.4. Bash-5.2.37
I followed every step of the book, but when building bash (running
make), I encountered the following error:
mkbuiltins.c:267:29: error: too many arguments to function 'xmalloc';
expected 0, have 1
267 |error_directory = xmalloc (2 + strlen (argv[arg_index]));
| ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The error messages are too long so I only included the first error.
After search on the Internet
(https://mail.gnu.org/archive/html/bug-bash/2025-03/msg00063.html), I
found that this is due to the C23 standards in newer versions of GCC.
So I "export CFLAGS=-std=gnu17" then the problem is solved. I haven't
finished the book so I'm not sure whether there would be further issues.
This problem does not seem to be due to cross-compilation, since the
bulding of Bash-5.2.37 also fails with my host compiler (gcc 15.1.1).
Bash-5.3-rc2 can be built with my host compiler, but I have not yet
tested in cross-compilation configuration.
Thank you!
Best regards,
Boshi Yuan
--
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page