Search code examples
octaveoctave-gui

How can I install Optimization package in Octave?


I tried to install the optim package in Octave.

>> pkg install -forge optim
C:/PROGRA~1/GNU: line 1: [Paths]: command not found
C:/PROGRA~1/GNU: line 2: Octave/Octave-6.2.0/: No such file or directory
C:/PROGRA~1/GNU: line 3: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 4: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 5: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 6: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 7: OctaveOctave-6.2.0\binqt.conf: No such file or directory
make: *** [Makefile:68: error-helpers.o] Error 127
make: Entering directory '/tmp/oct-jYpbYN/optim-1.6.1/src'
CXXFLAGS=" -Wall -Wno-deprecated-declarations" C:/PROGRA~1/GNU Octave/Octave-6.2.0/mingw64/bin/mkoctfile-6.2.0.exe -c error-helpers.cc
make: Leaving directory '/tmp/oct-jYpbYN/optim-1.6.1/src'

error: pkg: error running 'make' for the optim package.
error: called from
    configure_make at line 110 column 9
    install at line 196 column 7
    pkg at line 568 column 9
>>

What is this problem about?

Where can I find the file binqt.conf ?


Solution

  • This is a known bug. Read more here: bug #59412: [octave forge] (ocl) Compile package errors with spaces in path

    A workaround is also suggested by Jinchuan in that bug report discussion:

    Since the alpha release of 6.0.90, I have encountered the following problems when I am trying to install a forge package on both win 7 and 10 64 bits systems... This problem can be solved by changing the default install location (e.g. C:\Program Files\GNU Octave\Octave-6.0.92) to a location without any blank space (I tried C:\Octave-6.0.92 and there is no problem while installing a forge package).