#51097: gcc5 -- xgcc internal compiler error: Illegal instruction: 4 -----------------------+------------------- Reporter: gnwiii@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: gcc5 | -----------------------+------------------- Comment (by gnwiii@…): This is not a gcc bug but a mismatch between the macports binary gmp library and older CPU's. Installing "gmp +core2" should avoid the problem. I think gcc5 is built with "-march=core2", but gmp provides a "+core2" variant that was not used to build the macports "officila" binaries. Several existing GCC bug reports were helpful in understanding the issue: [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6326 GCC Bug #6326] appears to be the same underlying bug and was traced to libgmp compiled for a CPU that was newer than the one being used to run gcc. Another helpful report with a minimal example in C is [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68040 gcc bug 68040] where it is suggested: {{{ "This is probably an ICE that occurs earlier than reported with `--enabled-checking=release`. Configure with `--enable-checking=yes`." }}} I created a "gcc5ec" Portfile. The build failed at the same place, but gave a much more useful error message which led me to GCC Bug 6326. This is serious issue for macports users because I often hear "macports gfortran doesn't work so I installed gfortran from <some unrelable source>" which then causes nasty problems for ports that need a particular gcc. I suggest making "gmp +core2" the default, and adding a gcc* variant "+enable-checking" to be used for ICE bug reporting. -- Ticket URL: <https://trac.macports.org/ticket/51097#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X