Re: Error building Bash-5.2.37 (12.3-systemd)
袁博实 ([email protected] via lfs-support Mailing List) <[email protected]> Sun, 29 Jun 2025 12:47:57 +0800
| Newsgroups | gmane.linux.lfs.support |
|---|---|
| Message-ID | <[email protected]> |
> 2025年6月29日 01:54,Bruce Dubbs ([email protected] via lfs-support Mailing List) <[email protected]> wrote: > > On 6/28/25 12:36 AM, 袁博实 ([email protected] via lfs-support Mailing List) wrote: >> 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. > > It sounds like you are mixing packages from the development book (gcc-15) and the stable book (bash-5.2.37). You need to be consistent. In the development book, the current version of bash is 5.3-rc2. For first time users we recommend using the stable book. > > You do not say what the host version of gcc is. If it is indeed gcc-15, then you do need to use the development book with bash and readline both using versions 5.3-rc2. > > -- Bruce > > -- > http://lists.linuxfromscratch.org/sympa/info/lfs-support > Unsubscribe: See the above information page Thanks Bruce, I’m not mixing the development book and the stable book. However, the host system’s gcc is gcc-15. I didn't mention that since I thought the host system’s compiler would not matter when using the cross-compiler. Thanks again. Boshi Yuan -- http://lists.linuxfromscratch.org/sympa/info/lfs-support Unsubscribe: See the above information page