Octave issue with package installation

(Irwish) #1


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 /usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin14.5.0/7.2.0../../.. .

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
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gcc.rb
==> Dependencies
Required: gmp ✔, libmpc ✔, mpfr ✔, isl ✔
==> Options
        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
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/octave.rb
==> Dependencies
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 ✔
==> Requirements
Required: fortran ✔
Optional: java >= 1.6 ✔
==> Options
        Build with java support
        Install HEAD version

(Steve Ng2013) #2


Does anybody read these posts? I notice many are left hanging with no answers.

  1. I have come across a similar problem with octave when I tried a pkg install -forge linear-algebra -

pkg install -forge linear-algebra
conftest.cc:1:10: fatal error: ‘octave/config.h’ file not found
#include <octave/config.h>
1 error generated.
configure: error: Could not run /usr/local/Cellar/octave/4.4.0/bin/mkoctfile-4.4.0
checking for gcc… clang
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether clang accepts -g… yes
checking for clang option to accept ISO C89… none needed
checking for mkoctfile… /usr/local/Cellar/octave/4.4.0/bin/mkoctfile-4.4.0

pkg: error running the configure script for linear-algebra.
error: called from
configure_make at line 78 column 9
install at line 184 column 7
pkg at line 437 column 9

  1. The GUI does not work as has been reported in another post and I don’t think anyone has looked into correcting this.

Hopefully, some kind soul out there will have the time to look into these issues.

Thanks folks.

(Mike McQuaid) #3

Yes, multiple people read all of them but that doesn’t mean we know the solutions to your problem, I’m afraid.