https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116291

            Bug ID: 116291
           Summary: ICE on non-existent module-mapper directory
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58872
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58872&action=edit
vulkan.cppm.ii.xz

I hit this when I accidentally ran a command in the wrong directory.

```
$ g++ /tmp/vulkan.cppm.ii -std=gnu++20 -fmodules-ts -O2 -o
/tmp/i-do-not-exist-sorry/a -MD -fdeps-format=p1689r5 -MT
/tmp/i-do-not-exist-sorry/CMakeFiles/Vulkan-Module.dir/include/vulkan/vulkan.cppm.o
-fmodule-mapper=/tmp/i-do-not-exist-sorry/vulkan.cppm.o.modmap
/var/tmp/portage/dev-util/vulkan-headers-1.3.290.0/work/Vulkan-Headers-vulkan-sdk-1.3.290.0/include/vulkan/vulkan.cppm:
error: failed opening mapper ‘/tmp/i-do-not-exist-sorry/vulkan.cppm.o.modmap’
/var/tmp/portage/dev-util/vulkan-headers-1.3.290.0/work/Vulkan-Headers-vulkan-sdk-1.3.290.0/include/vulkan/vulkan.cppm:20:9:
error: unknown Compiled Module Interface: no such module
   20 | export module vulkan_hpp;
      |         ^
/var/tmp/portage/dev-util/vulkan-headers-1.3.290.0/work/Vulkan-Headers-vulkan-sdk-1.3.290.0/include/vulkan/vulkan.cppm:20:9:
warning: not writing module ‘vulkan_hpp’ due to errors

in pp_string, at pretty-print.cc:2276
 4888 | }  // namespace VULKAN_HPP_NAMESPACE
      | ^
0x5649f109238c internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:491
0x5649f1092527 fancy_abort(char const*, int, char const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1772
0x5649ef73bdc3 pp_string(pretty_printer*, char const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/pretty-print.cc:2276
0x5649ef73bd98 pp_string(pretty_printer*, char const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/pretty-print.cc:1676
0x5649f11f77ca pretty_printer::format(text_info*, urlifier const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/pretty-print.cc:1664
0x5649f11f68f0 pp_format(pretty_printer*, text_info*, urlifier const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/pretty-print.h:592
0x5649f11f68f0 diagnostic_context::report_diagnostic(diagnostic_info*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1519
0x5649f11f637a diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1],
diagnostic_t)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1665
0x5649ef741817 fatal_error(unsigned int, char const*, ...)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:476
0x5649ef79e99e c_common_finish()
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/c-family/c-opts.cc:1385
0x5649f1b0aad8 finalize
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:2072
0x5649f1b0aad8 do_compile
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:2179
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/15/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/15
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 15.0.9999 p,
commit 767d91209f8983d23caae12e2337eca6c2b5dbdb' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --without-isl
--enable-default-pie --enable-host-pie --disable-host-bind-now
--enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3
bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240808 (experimental)
4d44f3fc387815eb232d7757352857993a1d21d9 (Gentoo 15.0.9999 p, commit
767d91209f8983d23caae12e2337eca6c2b5dbdb)
```

Reply via email to