[Ipopt] mex: link of ' "ipopt.mexmaci64"' failed.

Asher Metzger ashermetzger at hotmail.com
Mon Jul 13 08:55:20 EDT 2015


Hi Tony,Thanks for answering. I don't know the answer to your question.here is the full output to the make command:
asher-metzgers-macbook-pro:src ashermetzger$ makemake mexoptscase `uname` in \  Darwin*) \    if ! test -e mexopts.sh; then \      sed -e 's/-arch $ARCHS//g' \        /Applications/Matlab_R2013a_Student.app/bin/mexopts.sh > mexopts.sh; \      SDKROOT=`grep -m1 'SDKROOT=' mexopts.sh | sed -e 's/SDKROOT=//g'`; \      if ! test -d $SDKROOT; then \        sed -e 's/-arch $ARCHS//g' \          -e 's/-isysroot $SDKROOT//g' \          -e 's/-Wl,-syslibroot,$SDKROOT//g' \          /Applications/Matlab_R2013a_Student.app/bin/mexopts.sh > mexopts.sh; \      fi; \    fi \    ;; \  MINGW*) \    if ! test -e mexopts.bat; then \      echo Warning: no mexopts.bat found. You will probably need to run Gnumex to generate this file. Call \"make gnumex\" then try again.; \    else \      libdirwin=$(cd /Users/ashermetzger/CoinIpopt/build/lib; cmd /c 'for %i in (.) do @echo %~fi' | sed 's|\\|/|g'); \      mingwlibdirwin=$(cd /mingw/lib; cmd /c 'for %i in (.) do @echo %~fi' | sed 's|\\|/|g'); \      GM_ADD_LIBS=$(echo "-llibmx -llibmex -llibmat `PKG_CONFIG_PATH=/Users/ashermetzger/CoinIpopt/build/lib64/pkgconfig:/Users/ashermetzger/CoinIpopt/build/lib/pkgconfig:/Users/ashermetzger/CoinIpopt/build/share/pkgconfig: pkg-config --libs ipopt | sed -e 's///g'` " | sed -e "s| -L/Users/ashermetzger/CoinIpopt/build/lib | -L$libdirwin |g" -e "s| -L/mingw/lib | -L$mingwlibdirwin |g"); \      \      cp mexopts.bat mexopts.bat.orig; \      sed -e 's|COMPILER=gcc|COMPILER=clang++|' -e 's|GM_MEXLANG=c$|GM_MEXLANG=cxx|' \        -e "s|GM_ADD_LIBS=-llibmx -llibmex -llibmat$|GM_ADD_LIBS=$GM_ADD_LIBS|" \        mexopts.bat.orig > mexopts.bat; \    fi \    ;; \  CYGWIN*) \    if ! test -e mexopts.bat; then \      echo Warning: no mexopts.bat found. You will probably need to run Gnumex to generate this file. Call \"make gnumex\" then try again.; \    else \      libdirwin=`cygpath -m /Users/ashermetzger/CoinIpopt/build/lib`; \      cyglibdirwin=`cygpath -m /usr/lib`; \      GM_ADD_LIBS=$(echo "-llibmx -llibmex -llibmat `PKG_CONFIG_PATH=/Users/ashermetzger/CoinIpopt/build/lib64/pkgconfig:/Users/ashermetzger/CoinIpopt/build/lib/pkgconfig:/Users/ashermetzger/CoinIpopt/build/share/pkgconfig: pkg-config --libs ipopt | sed -e 's///g'` " | sed -e "s| -L/Users/ashermetzger/CoinIpopt/build/lib | -L$libdirwin |g" -e "s| -L/usr/lib/| -L$cyglibdirwin/|g"); \      \      cp mexopts.bat mexopts.bat.orig; \      sed -e 's|COMPILER=gcc|COMPILER=clang++|' -e 's|GM_MEXLANG=c$|GM_MEXLANG=cxx|' \        -e "s|GM_ADD_LIBS=-llibmx -llibmex -llibmat$|GM_ADD_LIBS=$GM_ADD_LIBS|" \        mexopts.bat.orig > mexopts.bat; \    fi \    ;; \esac/Applications/Matlab_R2013a_Student.app/bin/mex -v -cxx -O CC="clang++" CXX="clang++" LD="clang++" COPTIMFLAGS="-O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE " CXXOPTIMFLAGS="-O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE " LDOPTIMFLAGS="-O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE    "  `PKG_CONFIG_PATH=/Users/ashermetzger/CoinIpopt/build/lib64/pkgconfig:/Users/ashermetzger/CoinIpopt/build/lib/pkgconfig:/Users/ashermetzger/CoinIpopt/build/share/pkgconfig: pkg-config --libs ipopt | sed -e 's///g'` -output ipopt.mexmaci64 matlabexception.o matlabfunctionhandle.o matlabjournal.o iterate.o ipoptoptions.o options.o sparsematrix.o callbackfunctions.o matlabinfo.o matlabprogram.o ipopt.osed: first RE may not be empty**************************************************************************  Warning: Neither -compatibleArrayDims nor -largeArrayDims is selected.            Using -compatibleArrayDims. In the future, MATLAB will require           the use of -largeArrayDims and remove the -compatibleArrayDims           option. For more information, see:           http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html**************************************************************************-> mexopts.sh sourced from directory (DIR = .)   FILE = /Users/ashermetzger/CoinIpopt/build/Ipopt/contrib/MatlabInterface/src/mexopts.sh----------------------------------------------------------------->    MATLAB                = /Applications/Matlab_R2013a_Student.app->    CC                    = clang++->    CC flags:         CFLAGS             = -fno-common -mmacosx-version-min=10.7  -fexceptions         CDEBUGFLAGS        = -g         COPTIMFLAGS        = -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE          CLIBS              = -L/Applications/Matlab_R2013a_Student.app/bin/maci64 -lmx -lmex -lmat -lstdc++         arguments          =  -DMX_COMPAT_32->    CXX                   = clang++->    CXX flags:         CXXFLAGS           = -fno-common -fexceptions -mmacosx-version-min=10.7         CXXDEBUGFLAGS      = -g         CXXOPTIMFLAGS      = -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE          CXXLIBS            = -L/Applications/Matlab_R2013a_Student.app/bin/maci64 -lmx -lmex -lmat -lstdc++         arguments          =  -DMX_COMPAT_32->    FC                    = gfortran->    FC flags:         FFLAGS             = -fexceptions -m64 -fbackslash         FDEBUGFLAGS        = -g         FOPTIMFLAGS        = -O         FLIBS              = -L/Applications/Matlab_R2013a_Student.app/bin/maci64 -lmx -lmex -lmat -L/usr/local/Cellar/gcc/5.1.0/lib/gcc/5/gcc/x86_64-apple-darwin13.4.0/5.1.0/../../.. -lgfortran -L/usr/local/Cellar/gcc/5.1.0/lib/gcc/5/gcc/x86_64-apple-darwin13.4.0/5.1.0 -lgfortranbegin         arguments          =  -DMX_COMPAT_32->    LD                    = clang++->    Link flags:         LDFLAGS            =  -mmacosx-version-min=10.7 -bundle -Wl,-exported_symbols_list,/Applications/Matlab_R2013a_Student.app/extern/lib/maci64/mexFunction.map -framework vecLib         LDDEBUGFLAGS       = -g         LDOPTIMFLAGS       = -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE             LDEXTENSION        = .mexmaci64         arguments          = ->    LDCXX                 = ->    Link flags:         LDCXXFLAGS         =          LDCXXDEBUGFLAGS    =          LDCXXOPTIMFLAGS    =          LDCXXEXTENSION     =          arguments          = -----------------------------------------------------------------> clang++ -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD -DMATLAB_MEXFILE      -mmacosx-version-min=10.7 -bundle -Wl,-exported_symbols_list,/Applications/Matlab_R2013a_Student.app/extern/lib/maci64/mexFunction.map -framework vecLib -o  "ipopt.mexmaci64"   "matlabexception.o"  "matlabfunctionhandle.o"  "matlabjournal.o"  "iterate.o"  "ipoptoptions.o"  "options.o"  "sparsematrix.o"  "callbackfunctions.o"  "matlabinfo.o"  "matlabprogram.o"  "ipopt.o"  -L/Applications/Matlab_R2013a_Student.app/bin/maci64 -lmx -lmex -lmat -lstdc++Undefined symbols for architecture x86_64:  "Ipopt::TNLPAdapter::ResortX(Ipopt::Vector const&, double*)", referenced from:      CallbackFunctions::iterCallback(int, double, double, double, double, double, double, double, double, int, Ipopt::IpoptData const*, Ipopt::IpoptCalculatedQuantities*, int) const in callbackfunctions.o  "Ipopt::IpoptApplication::Initialize()", referenced from:      _mexFunction in ipopt.o  "Ipopt::IpoptApplication::Statistics()", referenced from:      _mexFunction in ipopt.o  "Ipopt::IpoptApplication::OptimizeTNLP(Ipopt::SmartPtr<Ipopt::TNLP> const&)", referenced from:      _mexFunction in ipopt.o  "Ipopt::IpoptApplication::IpoptApplication(bool, bool)", referenced from:      _mexFunction in ipopt.o  "Ipopt::IpoptApplication::~IpoptApplication()", referenced from:      _mexFunction in ipopt.o  "Ipopt::Journal::SetPrintLevel(Ipopt::EJournalCategory, Ipopt::EJournalLevel)", referenced from:      vtable for Ipopt::MatlabJournal in matlabjournal.o  "Ipopt::Journal::SetAllPrintLevels(Ipopt::EJournalLevel)", referenced from:      vtable for Ipopt::MatlabJournal in matlabjournal.o  "Ipopt::Journal::Name()", referenced from:      vtable for Ipopt::MatlabJournal in matlabjournal.o  "Ipopt::Journal::Journal(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ipopt::EJournalLevel)", referenced from:      Ipopt::MatlabJournal::MatlabJournal(Ipopt::EJournalLevel) in matlabjournal.o      Ipopt::MatlabJournal::MatlabJournal(Ipopt::EJournalLevel) in matlabjournal.o  "Ipopt::Journal::~Journal()", referenced from:      Ipopt::MatlabJournal::~MatlabJournal() in matlabjournal.o      Ipopt::MatlabJournal::~MatlabJournal() in matlabjournal.o  "Ipopt::Snprintf(char*, long, char const*, ...)", referenced from:      MatlabException::MatlabException(char const*) in matlabexception.o      MatlabException::MatlabException(char const*) in matlabexception.o      MatlabException::MatlabException(MatlabException const&) in matlabexception.o      MatlabException::MatlabException(MatlabException const&) in matlabexception.o      MatlabException::operator=(MatlabException const&) in matlabexception.o      IpoptOptions::setOption(char const*, mxArray_tag const*) in ipoptoptions.o      IpoptOptions::setStringOption(char const*, mxArray_tag const*) in ipoptoptions.o      ...  "Ipopt::Journal::IsAccepted(Ipopt::EJournalCategory, Ipopt::EJournalLevel) const", referenced from:      vtable for Ipopt::MatlabJournal in matlabjournal.o  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:      IpoptOptions::useQuasiNewton() const in ipoptoptions.o      IpoptOptions::useDerivChecker() const in ipoptoptions.o      IpoptOptions::userScaling() const in ipoptoptions.o  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from:      Ipopt::MatlabJournal::MatlabJournal(Ipopt::EJournalLevel) in matlabjournal.o      Ipopt::MatlabJournal::MatlabJournal(Ipopt::EJournalLevel) in matlabjournal.o      IpoptOptions::setOption(char const*, mxArray_tag const*) in ipoptoptions.o      IpoptOptions::useQuasiNewton() const in ipoptoptions.o      IpoptOptions::useDerivChecker() const in ipoptoptions.o      IpoptOptions::userScaling() const in ipoptoptions.o      IpoptOptions::printLevel() const in ipoptoptions.o      ...  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:      Ipopt::MatlabJournal::MatlabJournal(Ipopt::EJournalLevel) in matlabjournal.o      Ipopt::MatlabJournal::MatlabJournal(Ipopt::EJournalLevel) in matlabjournal.o      IpoptOptions::setOption(char const*, mxArray_tag const*) in ipoptoptions.o      IpoptOptions::useQuasiNewton() const in ipoptoptions.o      IpoptOptions::useDerivChecker() const in ipoptoptions.o      IpoptOptions::userScaling() const in ipoptoptions.o      IpoptOptions::printLevel() const in ipoptoptions.o      ...  "typeinfo for Ipopt::TNLPAdapter", referenced from:      CallbackFunctions::iterCallback(int, double, double, double, double, double, double, double, double, int, Ipopt::IpoptData const*, Ipopt::IpoptCalculatedQuantities*, int) const in callbackfunctions.o  "typeinfo for Ipopt::OrigIpoptNLP", referenced from:      CallbackFunctions::iterCallback(int, double, double, double, double, double, double, double, double, int, Ipopt::IpoptData const*, Ipopt::IpoptCalculatedQuantities*, int) const in callbackfunctions.o  "typeinfo for Ipopt::Journal", referenced from:      typeinfo for Ipopt::MatlabJournal in matlabjournal.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)    mex: link of ' "ipopt.mexmaci64"' failed.make: *** [ipopt.mexmaci64] Error 1Thanks again,Asher
> From: kelman at berkeley.edu
> To: ashermetzger at hotmail.com; ipopt at list.coin-or.org
> Subject: Re: [Ipopt] mex: link of ' "ipopt.mexmaci64"' failed.
> Date: Sun, 12 Jul 2015 12:45:22 -0700
> 
> Do the posted binary mex files not work for you? Please post the entire 
> error message, not just the very end. Which symbols are missing is the 
> important part.
> 

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20150713/a7d46f66/attachment-0001.html>


More information about the Ipopt mailing list