This guide was made using different solutions shared at the CVX forums and experimentation, to successfuly install the CVX tools into Octave running in Ubuntu 16.10 and 18.04.
$ sudo apt-get install octave libopenblas-dev liboctave-dev
$ mkdir ~/your/path/to/Octave_dir/ && cd ~/your/path/to/Octave_dir/
$ git clone -b rework https://github.com/cvxr/CVX.git/
$ cd CVX
4. The "git clone..." command will not copy the content in directories sedumi and sdpt3, since they are a link, they should be deleted
$ rmdir sedumi sdpt3
$ git clone https://github.com/sqlp/sdpt3.git
$ git clone https://github.com/sqlp/sedumi.git
Using the Octave's Command Window:
cd ~/your/path/to/Octave_dir/CVX
Change the function octave_config_info by __octave_config_info__ at cvx_version (line 50). Octave Ref
cvx_compile
NOTE: If there are problems with the compilation just add the parameter '-rebuild'
cd ~/your/path/to/Octave_dir/CVX/sdpt3
install_sdpt3 -nopath
NOTE: If there are problems with the compilation just add the parameter '-rebuild'
cd ~/your/path/to/Octave_dir/CVX/sedumi
install_sedumi -nopath
NOTE: It may be posible that this solver will be unable to compile due to the f77blas.h file, jump to ALTERNATIVE METHODS section and rebuild (add parameter '-rebuild')
install_sedumi -nopath -rebuild
cd ~/your/path/to/Octave_dir/CVX
cvx_setup
If you are having problems with the f77blas.h file try the following:
#include <f77blas.h>
#include <openblas/f77blas.h>
install_sedumi -nopath -rebuild
#include <f77blas.h>
#include "cblas.h"
#define FORT(x) BLASFUNC(x)
#define FORT(x) cblas_ ## x
typedef int blasint;
You may need to modify other files like sdmauxScalarmul.c at the same directory, pay attention to the compiler's messages.
Remove ampersand from functions like:
FORT(dscal)(&n,&alpha,x,&one);
to become
FORT(dscal)(n,alpha,x,one);
install_sedumi -nopath -rebuild
These are the solutions by the moment. Feel free to ask anything about this procedure to the forum or to me. Best wishes and good luck!
References: