https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101391
Bug ID: 101391 Summary: Unresolved reference to module getopt Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Created attachment 51123 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51123&action=edit Mechanical patch The next build error from the devel/modula-2 branch occured like this: /vol/gcc/src/git/modula-2/libgm2/libm2pim/../../gcc/m2/gm2-libs/GetOpt.mod:213:11: error: the file containing the definition module ‘getopt’ cannot be found 213 | END GetOpt. | ^ make[5]: *** [Makefile:950: GetOpt.lo] Error 1 make[5]: Leaving directory '/var/gcc/gcc-12.0.0-20210708/11.4-gm2/i386-pc-solaris2.11/libgm2/libm2pim' The module has been renamed to cgetopt since. I'm attaching a patch for gcc/m2/gm2-libs/GetOpt.mod for correct this. While the Makefile.am's reflect the new name, the corresponding Makefile.in's haven't been regenerated. On top of that, the current files have been generated with automake 1.16.1, while gcc requires automake 1.15.1 as documented in install.text. To get around this, one first needs to regenerate aclocal.m4 with aclocal 1.15.1 in order to be able rerun automake.