Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

WSL2 compiler segmentation fault on C++20 modules building if source file is on WSL2 mountpoint #31

Description

@MissingNo42

The toolchain (arm-none-eabi-gcc/g++) is unable to build a minimal C++20 module:

Code (dep.cppm):

export module dep;

export int rx() {return 41+1;}
int ry() {return 41+1;}

Build:
Build through CMake but the minimal command (/opt/wonderful/toolchain/gcc-arm-none-eabi/bin/arm-none-eabi-g++ -std=c++20 -fmodules-ts -Wall -c /.../dep.cppm) still cause the issue.

Error:

/.../dep.cppm:5:23: internal compiler error: Segmentation fault
    5 | int ry() {return 41+1;}
      |                       ^
0x1da594e diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t)
	???:0
0x1db6672 internal_error(char const*, ...)
	???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <http://github.com/WonderfulToolchain/wonderful-packages/issues> for instructions.
ninja: build stopped: subcommand failed.

Environment:
GCC/G++ version 15.1.0 on Ubuntu 22.04 (WSL - Windows 11)

Context:
Development on NDS using BlocksDS

Note that this works fine using another arm-none-eabi-gcc/g++ like the "default" one or the one provided with Devkitpro (DevkitARM), version 15.1.0 too, so this is likely an issue with the wonderful toolchain.

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

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions