if you want to install the current version of “control” package to octave. The compile process will be interrupt:
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin16.7.0/7.2.0'
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin16.7.0/7.2.0/../../..'
ld: library not found for -lgfortran
The install path of the current version of gfortran is included in the gcc package of homebrew. But the path
/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin16.7.0/7.2.0/../../.. doesn’t exists. The current version of gfortran (that is not compiled from source) is available under /
Is it possible, that the current package version of octave, that’s available in brew, will be provide the wrong default path to this library? Did i something wrong?
The command that’s executed at the install process of the control package is:
mkoctfile -p FLIBS
This provides the wrong default path to the gfortran library:
-L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin16.7.0/7.2.0 -L/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin16.7.0/7.2.0/../../.. -lgfortran -lquadmath -lm
To solve the problem export the $FLIBS variabel with the correct path before you start the installation of a package.
To exclude misunderstandings here the information to my installation.
brew info gcc
gcc: stable 7.2.0 (bottled), HEAD
GNU compiler collection
/usr/local/Cellar/gcc/7.2.0 (1,486 files, 290.0MB) *
Poured from bottle on 2017-09-27 at 14:14:53
Required: gmp ✔, libmpc ✔, mpfr ✔, isl ✔
Build just-in-time compiler
Build with native language support (localization)
Install HEAD version
brew info octave
octave: stable 4.2.1 (bottled), HEAD
High-level interpreted language for numerical computing
/usr/local/Cellar/octave/4.2.1_7 (2,182 files, 37.6MB) *
Poured from bottle on 2017-12-06 at 11:30:34
Build: automake ✔, autoconf ✔, gnu-sed ✔, pkg-config ✔
Required: arpack ✔, epstool ✔, fftw ✔, fig2dev ✔, fltk ✔, fontconfig ✔, freetype ✔, ghostscript ✔, gl2ps ✔, glpk ✔, gnuplot ✔, graphicsmagick ✔, hdf5 ✔, libsndfile ✔, libtool ✔, pcre ✔, portaudio ✔, pstoedit ✔, qhull ✔, qrupdate ✔, readline ✔, suite-sparse ✔, veclibfort ✔
Required: fortran ✔
Optional: java >= 1.6 ✔
Build with java support
Install HEAD version