coin-or / qpOASES

Open-source C++ implementation of the recently proposed online active set strategy
GNU Lesser General Public License v2.1
360 stars 121 forks source link

building c interface fails for macOS 10.14 #98

Open svigerske opened 4 years ago

svigerske commented 4 years ago

Issue created by migration from Trac.

Original creator: GHenshaw

Original creation time: 2019-12-10 21:40:56

Assignee: ferreau

Version: 3.2.1

$ make all Creating qpOASES_wrapper.o clang: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument] In file included from qpOASES_wrapper.cpp:36: In file included from /Users/glenhenshaw/Code/qpOASES-3.2.1/include/qpOASES.hpp:47: /Users/glenhenshaw/Code/qpOASES-3.2.1/src/Matrices.cpp:853:38: warning: for loop has empty body [-Wempty-body] for (i = jc[j]; i < jc[j+1]; i++); ^ /Users/glenhenshaw/Code/qpOASES-3.2.1/src/Matrices.cpp:853:38: note: put the semicolon on a separate line to silence this warning 1 warning generated. Creating /Users/glenhenshaw/Code/qpOASES-3.2.1/bin/libqpOASES_wrapper.a ar: creating archive /Users/glenhenshaw/Code/qpOASES-3.2.1/bin/libqpOASES_wrapper.a Creating /Users/glenhenshaw/Code/qpOASES-3.2.1/bin/libqpOASES_wrapper.dylib gcc -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -stdlib=libc++ -L/usr/local/lib -lgcc_s.10.5 -ldylib1.o -o /Users/glenhenshaw/Code/qpOASES-3.2.1/bin/libqpOASES_wrapper.dylib qpOASES_wrapper.o -lm Undefined symbols for architecture x86_64: "std::terminate()", referenced from: _clang_call_terminate in qpOASES_wrapper.o "vtable for cxxabiv1::class_type_info", referenced from: typeinfo for qpOASES::SubjectTo in qpOASES_wrapper.o typeinfo for qpOASES::Matrix in qpOASES_wrapper.o typeinfo for qpOASES::QProblemB in qpOASES_wrapper.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for cxxabiv1::si_class_type_info", referenced from: typeinfo for qpOASES::Bounds in qpOASES_wrapper.o typeinfo for qpOASES::Constraints in qpOASES_wrapper.o typeinfo for qpOASES::QProblem in qpOASES_wrapper.o typeinfo for qpOASES::SQProblem in qpOASES_wrapper.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for cxxabiv1::vmi_class_type_info", referenced from: typeinfo for qpOASES::DenseMatrix in qpOASES_wrapper.o typeinfo for qpOASES::SymmetricMatrix in qpOASES_wrapper.o typeinfo for qpOASES::SymDenseMat in qpOASES_wrapper.o typeinfo for qpOASES::SparseMatrix in qpOASES_wrapper.o typeinfo for qpOASES::SymSparseMat in qpOASES_wrapper.o typeinfo for qpOASES::SparseMatrixRow in qpOASES_wrapper.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "operator delete", referenced from: qpOASES::writeIntoMatFile(sFILE, int const, int, int, char const) in qpOASES_wrapper.o qpOASES::Indexlist::init(int) in qpOASES_wrapper.o qpOASES::Indexlist::~Indexlist() in qpOASES_wrapper.o qpOASES::Indexlist::clear() in qpOASES_wrapper.o qpOASES::Indexlist::~Indexlist() in qpOASES_wrapper.o qpOASES::Indexlist::operator=(qpOASES::Indexlist const&) in qpOASES_wrapper.o qpOASES::SubjectTo::init(int) in qpOASES_wrapper.o ... "operator delete(void)", referenced from: qpOASES::Bounds::~Bounds() in qpOASES_wrapper.o qpOASES::Constraints::~Constraints() in qpOASES_wrapper.o qpOASES::DenseMatrix::~DenseMatrix() in qpOASES_wrapper.o virtual thunk to qpOASES::DenseMatrix::~DenseMatrix() in qpOASES_wrapper.o qpOASES::SparseMatrix::~SparseMatrix() in qpOASES_wrapper.o virtual thunk to qpOASES::SparseMatrix::~SparseMatrix() in qpOASES_wrapper.o qpOASES::SparseMatrixRow::~SparseMatrixRow() in qpOASES_wrapper.o ... "operator new[](unsigned long)", referenced from: qpOASES::writeIntoMatFile(sFILE, int const, int, int, char const*) in qpOASES_wrapper.o qpOASES::Indexlist::init(int) in qpOASES_wrapper.o qpOASES::Indexlist::Indexlist(qpOASES::Indexlist const&) in qpOASES_wrapper.o qpOASES::Indexlist::copy(qpOASES::Indexlist const&) in qpOASES_wrapper.o qpOASES::Indexlist::Indexlist(qpOASES::Indexlist const&) in qpOASES_wrapper.o qpOASES::Indexlist::operator=(qpOASES::Indexlist const&) in qpOASES_wrapper.o qpOASES::SubjectTo::init(int) in qpOASES_wrapper.o ... "operator new(unsigned long)", referenced from: qpOASES::DenseMatrix::duplicate() const in qpOASES_wrapper.o virtual thunk to qpOASES::DenseMatrix::duplicate() const in qpOASES_wrapper.o qpOASES::SymDenseMat::duplicateSym() const in qpOASES_wrapper.o non-virtual thunk to qpOASES::SymDenseMat::duplicateSym() const in qpOASES_wrapper.o qpOASES::SparseMatrix::duplicate() const in qpOASES_wrapper.o qpOASES::SparseMatrixRow::duplicate() const in qpOASES_wrapper.o qpOASES::SymSparseMat::duplicateSym() const in qpOASESwrapper.o ... "cxa_begin_catch", referenced from: _clang_call_terminate in qpOASESwrapper.o "cxa_guard_acquire", referenced from: qpOASES::myPrintf(char const) in qpOASES_wrapper.o qpOASES::getGlobalMessageHandler() in qpOASES_wrapper.o qpOASES::readFromFile(double, int, int, char const) in qpOASES_wrapper.o qpOASES::readFromFile(int, int, char const) in qpOASES_wrapper.o qpOASES::writeIntoFile(double const, int, int, char const, qpOASES::BooleanType) in qpOASES_wrapper.o qpOASES::writeIntoFile(int const, int, char const, qpOASES::BooleanType) in qpOASES_wrapper.o qpOASES::getNorm(double const, int, int) in qpOASES_wrapper.o ... "_cxa_guard_release", referenced from: qpOASES::myPrintf(char const) in qpOASES_wrapper.o qpOASES::getGlobalMessageHandler() in qpOASES_wrapper.o qpOASES::readFromFile(double, int, int, char const) in qpOASES_wrapper.o qpOASES::readFromFile(int, int, char const) in qpOASES_wrapper.o qpOASES::writeIntoFile(double const, int, int, char const, qpOASES::BooleanType) in qpOASES_wrapper.o qpOASES::writeIntoFile(int const, int, char const, qpOASES::BooleanType) in qpOASES_wrapper.o qpOASES::getNorm(double const, int, int) in qpOASESwrapper.o ... "gxx_personality_v0", referenced from: qpOASES::Bounds::Bounds(int) in qpOASES_wrapper.o qpOASES::Bounds::Bounds(qpOASES::Bounds const&) in qpOASES_wrapper.o qpOASES::Bounds::~Bounds() in qpOASES_wrapper.o qpOASES::Bounds::shift(int) in qpOASES_wrapper.o qpOASES::Bounds::rotate(int) in qpOASES_wrapper.o qpOASES::Constraints::Constraints(int) in qpOASES_wrapper.o qpOASES::Constraints::Constraints(qpOASES::Constraints const&) in qpOASES_wrapper.o ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/Users/glenhenshaw/Code/qpOASES-3.2.1/bin/libqpOASES_wrapper.dylib] Error 1 ``

svigerske commented 4 years ago

Comment by GHenshaw created at 2019-12-10 22:10:08

Note that adding "-lc++" to the ${CPPFLAGS} in the make_osk.mk file lets the examples compile.

However, running them fails with:

$ ./c_example1
dyld: __dyld section not supported in /Users/glenhenshaw/Code/qpOASES-3.2.1/bin/libqpOASES_wrapper.dylib
Abort trap: 6