On 11/28/25 9:27 PM, hao a wrote:
I encountered this error when running the script at
https://github.com/hexagonal-sun/moss-kernel/blob/master/scripts/deps/bash <https://github.com/hexagonal-sun/moss-kernel/blob/master/scripts/deps/bash>

You reported as your environment

> gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
> Linux u25 6.17.0-6-generic x86_64 GNU/Linux
>
        [...]
The parameters were as follows:

```bash
bash_repo="${bash_repo:-https://git.savannah.gnu.org/git/bash.git <https:// git.savannah.gnu.org/git/bash.git>}"
bash_tag="${bash_tag:-bash-5.3}"
stdlib="${stdlib:-musl}"

./configure --without-bash-malloc --enable-static-link --host="aarch64- linux-$stdlib" CC="aarch64-linux-$stdlib-gcc"
make
```

OK. You're cross-compiling for aarch64 on an x86_64 machine, at least for
the purpose of running configure.

The rest of these results come from your config.log.

This is how configure self-reports:

Invocation command line was

$ ./configure --without-bash-malloc --enable-static-link --host=aarch64-linux-
musl CC=aarch64-linux-musl-gcc CFLAGS=-std=gnu99

Your compiler is from 2021:

configure:4422: aarch64-linux-musl-gcc --version >&5
aarch64-linux-musl-gcc (GCC) 11.2.1 20211120
Copyright (C) 2021 Free Software Foundation, Inc.

so it's unlikely that it implements C23. And configure reinforces this by

configure:4453: checking whether the C compiler works
configure:4475: aarch64-linux-musl-gcc -std=gnu99   conftest.c  >&5
configure:4479: $? = 0
configure:4530: result: yes
        [...]
configure:4831: checking for aarch64-linux-musl-gcc option to enable C11 features
configure:4846: aarch64-linux-musl-gcc  -c -std=gnu99  conftest.c >&5
conftest.c:207:3: error: #error "Compiler does not advertise C11 conformance"
  207 | # error "Compiler does not advertise C11 conformance"
      |   ^~~~~
configure:4846: $? = 1


forcing c99. And indeed when you compile for c99, `bool' is not a keyword:

configure:7613: checking for bool, true, false
configure:7628: aarch64-linux-musl-gcc -c -std=gnu99  conftest.c >&5
conftest.c:77:13: error: #error "true == false"
   77 |            #error "true == false"
      |             ^~~~~
conftest.c:79:18: error: unknown type name 'bool'
   79 |           extern bool b;
      |                  ^~~~
conftest.c:80:11: error: unknown type name 'bool'
   80 |           bool b = true == false;
      |           ^~~~
conftest.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
    1 | /* confdefs.h */
conftest.c:80:20: error: 'true' undeclared here (not in a function)
   80 |           bool b = true == false;
      |                    ^~~~
conftest.c:80:20: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
conftest.c:80:28: error: 'false' undeclared here (not in a function)
   80 |           bool b = true == false;
      |                            ^~~~~
conftest.c:80:28: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
configure:7628: $? = 1

and including <stdbool.h> is required.

I'm not sure why you're running an old aarch64 compiler for configure, then
a different (native x86_64?) compiler for the build. Maybe figure that out
first?

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to