Skip to content

Userland host native setup broken with KeyError: 'gem5_arch' #321

Description

@cirosantilli

On fb39ab4 Ubuntu 25.10, running:

cd userlane
./build c/hello

as per https://cirosantilli.com/linux-kernel-module-cheat/#userland-setup-getting-started-natively blows up:

Traceback (most recent call last):
  File "/home/ciro/bak/git/linux-kernel-module-cheat/userland/./build", line 29, in <module>
    Main().cli()
    ~~~~~~~~~~^^
  File "/home/ciro/bak/git/linux-kernel-module-cheat/cli_function.py", line 267, in cli
    exit_status = self.cli_noexit(*args, **kwargs)
  File "/home/ciro/bak/git/linux-kernel-module-cheat/cli_function.py", line 258, in cli_noexit
    return self._do_main(vars(args))
           ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/home/ciro/bak/git/linux-kernel-module-cheat/cli_function.py", line 152, in _do_main
    return self.main(**self._get_args(kwargs))
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ciro/bak/git/linux-kernel-module-cheat/common.py", line 1556, in main
    self._init_env(self.env)
    ~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/ciro/bak/git/linux-kernel-module-cheat/common.py", line 926, in _init_env
    env['gem5_executable_dir'] = join(env['gem5_build_build_dir'], env['gem5_arch'])
                                                                   ~~~^^^^^^^^^^^^^
KeyError: 'gem5_arch'

Possible root cause might be:

import platform
consts['host_arch'] = platform.processor()

being empty on Ubuntu 25.10. uname -p is unknown. Related:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions