Opened 13 months ago

Last modified 13 months ago

#84 new installation issue

Error on mex-compiling qpoases for Matlab; Fix provided

Reported by: lkazaz Owned by: ferreau
Priority: normal Milestone: Release 3.3
Component: Matlab interface Version: 3.2.1
Keywords: lapack, missing, library, linker Cc:

Description

Problem:
running make.m
gives a linker error as follows:

Error using mex
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
`qpOASES::QProblemB::computeCholesky()':
qpOASES.cpp:(.text+0xc289): undefined reference to `dpotrf_'
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
`qpOASES::QProblem::computeProjectedCholesky()':
qpOASES.cpp:(.text+0x16cf6): undefined reference to `dpotrf_'
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
`qpOASES::SQProblemSchur::updateSchurQR(long)':
qpOASES.cpp:(.text+0x3034e): undefined reference to `dtrcon_'
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
`qpOASES::SQProblemSchur::backsolveSchurQR(long, double const*, long,
double*)':
qpOASES.cpp:(.text+0x304db): undefined reference to `dtrtrs_'
collect2: error: ld returned 1 exit status 

Solution: Add libmwlapack.so to the libs. The fix is changing make.m line 72 to

CPPFLAGS = [ CPPFLAGS, '-DLINUX -lmwblas -lmwlapack',' ' ];

See https://projects.coin-or.org/qpOASES/browser/trunk/interfaces/matlab/make.m?annotate=blame#L72 for the make.m file.

Change History (1)

comment:1 Changed 13 months ago by lkazaz

Note, this likely solves Ticket #63 as well.

Note: See TracTickets for help on using tickets.