Opened 5 years ago

Last modified 4 years ago

#27 new installation issue

Matlab interface does not compile under OSX

Reported by: ferreau Owned by: ckirches
Priority: normal Milestone: Release 3.3
Component: Matlab interface Version: 3.0.0
Keywords: Cc:

Description

When I run the make script in interfaces/matlab directory, I get the following error:

In file included from qpOASES.cpp:36:
In file included from ../../include/qpOASES.hpp:50:
../../src/Matrices.cpp:1164:4: warning: add explicit braces to avoid
      dangling else [-Wdangling-else]
                        else return RET_NO_DIAGONAL_AVAILABLE;
                        ^
../../src/Matrices.cpp:1826:4: warning: add explicit braces to avoid
      dangling else [-Wdangling-else]
                        else return RET_NO_DIAGONAL_AVAILABLE;
                        ^
In file included from qpOASES.cpp:36:
In file included from ../../include/qpOASES.hpp:53:
../../src/Flipper.cpp:120:13: warning: comparison of unsigned expression
      < 0 is always false [-Wtautological-compare]
        if ( ( _nV < 0 ) || ( _nC < 0 ) )
               ~~~ ^ ~
../../src/Flipper.cpp:120:28: warning: comparison of unsigned expression
      < 0 is always false [-Wtautological-compare]
        if ( ( _nV < 0 ) || ( _nC < 0 ) )
                              ~~~ ^ ~
In file included from qpOASES.cpp:42:
In file included from ./qpOASES_matlab_utils.hpp:49:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:264:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:226:20: error: 
      typedef redefinition with different types ('char16_t' vs
      'unsigned short')
typedef __char16_t char16_t;
                   ^
<command line>:2:18: note: expanded from here
#define char16_t uint16_T
                 ^
/Applications/MATLAB_R2013a.app/extern/include/tmwtypes.h:257:19: note: 
      previous definition is here
 typedef UINT16_T uint16_T;
                  ^
In file included from qpOASES.cpp:42:
In file included from ./qpOASES_matlab_utils.hpp:49:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:624:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:320:29: error: 
      redefinition of 'std::__1::__libcpp_is_integral<uint16_T>'
  ...<>          struct __libcpp_is_integral<unsigned short>     : pub...
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:316:29: note: 
      previous definition is here
template <>          struct __libcpp_is_integral<char16_t...
                            ^
4 warnings and 2 errors generated.

    mex: compile of ' "qpOASES.cpp"' failed.

Error using mex (line 206)
Unable to complete successfully.

Error in make (line 115)
            eval( cmd );

My Matlab version is R2013a. I am using the following compiler:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Change History (2)

comment:1 Changed 4 years ago by ferreau

  • Milestone changed from Release 3.1 to Release 3.2

Ticket retargeted after milestone closed

comment:2 Changed 4 years ago by ferreau

  • Milestone changed from Release 3.2 to Release 3.3

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.