Skip to content

noux-pkg/bash build fails #5694

@a-dmg

Description

@a-dmg

Dear Genodians,

When building bash via make or the depot/create tool, I obtain the following build error:

(truncated) ...
      [bash]  /home/alice/Repos/genode/contrib/bash-cce0bc42db4cb4dcf9638dda3651775a9cd3d59b/src/noux-pkg/bash/builtins/mkbuiltins.c: In function ‘main’:
      [bash]  /home/alice/Repos/genode/contrib/bash-cce0bc42db4cb4dcf9638dda3651775a9cd3d59b/src/noux-pkg/bash/builtins/mkbuiltins.c:214:1: warning: old-style function definition [-Wold-style-definition]
      [bash]    214 | main (argc, argv)
      [bash]        | ^~~~
      [bash]  /home/alice/Repos/genode/contrib/bash-cce0bc42db4cb4dcf9638dda3651775a9cd3d59b/src/noux-pkg/bash/builtins/mkbuiltins.c:247:29: error: too many arguments to function ‘xmalloc’; expected 0, have 1
      [bash]    247 |           error_directory = xmalloc (2 + strlen (argv[arg_index]));
      [bash]        |                             ^~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [bash]  /home/alice/Repos/genode/contrib/bash-cce0bc42db4cb4dcf9638dda3651775a9cd3d59b/src/noux-pkg/bash/builtins/mkbuiltins.c:62:14: note: declared here
      [bash]     62 | static char *xmalloc (), *xrealloc ();
      [bash]        |              ^~~~~~~
      [bash]  /home/alice/Repos/genode/contrib/bash-cce0bc42db4cb4dcf9638dda3651775a9cd3d59b/src/noux-pkg/bash/builtins/mkbuiltins.c:284:34: error: too many arguments to function ‘xmalloc’; expected 0, have 1
      [bash]    284 |           temp_struct_filename = xmalloc (15);
      [bash]        |                                  ^~~~~~~  ~~
      [bash]  /home/alice/Repos/genode/contrib/bash-cce0bc42db4cb4dcf9638dda3651775a9cd3d59b/src/noux-pkg/bash/builtins/mkbuiltins.c:62:14: 
and so on...

Here is the full build log: noux-pkg_bash_build.log.

Following that Github's issue found here, this problem can be solved by appending CFLAGS_FOR_BUILD="-std=gnu17" to CONFIGURE_ARGS. Please find a commit, fixing the issue, mentioned below.

Obviously, the problem does not appear on our CI/CD, it seems that my host compiler has an influence, pardon my ignorance when it comes to noux, does the host's compiler is involved for building noux-pkg/bash ? Or does some include path(s) are set to host's library during the configure phase leading to such errors?

For reference, here are compiler versions I use:

# genode git:(25.05) /usr/local/genode/tool/current/bin/genode-arm-gcc --version
genode-arm-gcc (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# genode git:(25.05) gcc --version
gcc (GCC) 15.2.1 20250813
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions