Re: f951: internal compiler error: Illegal instruction: 4 when installing packages
Andrew Janke <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.general |
|---|---|
| Message-ID | <[email protected]> |
On 4/13/21 6:16 PM, mzerobin via Help-octave wrote: > Hi to the community, > I am having problems running the following command: >> pkg install -forge io > statistics control struct optim“ which should install the statistics package > as far as I know. > > My device is a MacBook Pro running Catalina macOS 10.15.7 and I have GNU > Octave, version 6.2.0 installed via Homebrew. > > />> pkg install -forge io statistics control struct optim > > warning: LFLAGS is deprecated and will be removed in a future version of > Octave, use LDFLAGS instead > f951: internal compiler error: Illegal instruction: 4 > libbacktrace could not find executable to open [...snip...] > > I googled many hours already and I am struggling to find any solution. As > far as I have found out the problem lies in the compiler error of f951 which > is related to gfortran or gcc to the best of my knowledge. Can anyone help > me out? > > I am very willing to provide any further details if needed! So, when this "Illegal instruction: 4" happens, it usually means that you are running a binary that was built for a later generation of CPU that includes an instruction set that your particular CPU model does not support. This happens sometimes with Homebrew "bottles" or other binary distributions when the build flags aren't set quite right – the folks building these binary redistributables essentially need to "cross-compile" them for older generations of CPU than they are actually building on. Usually it works; sometimes a bad build sneaks through. This looks like it is f95 itself that is throwing that Illegal instruction error. What is the exact model of MacBook Pro you're running? (So we can figure out exactly what CPU model you have.) Instead of the vanilla Homebrew Octave, would you be willing to try out my Octave.app build? https://octave-app.org/ We build all our own binaries, and have controlled for "Illegal instruction: 4" in the past. If nothing else, it'd give you another data point. If you have a couple hours to spare, you could also try rebuilding your Homebrewed GCC from source, to ensure that it is compiled for your exact CPU model. (GCC is what provides the F95 Fortran compiler in most cases.) `brew reinstall --build-from-source gcc` should do it. Cheers, Andrew Janke