-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile external/solver #6
Comments
This particular error is caused by using a wrong version of the GCC compiler. I believe this has to do with the ABI interface changing with later versions of C++. The Gurobi website lists Assuming you run Ubuntu, you can Setting I also hasten to add, that I'm using Gurobi 6.0.3 which you can acquire here (requires login). Not sure if that makes a difference, but the version number seems to match the one given in the build instructions under step 4. Perhaps the repository maintainer, @eldar, can comment on which GCC version to use exactly? [0] http://www.gurobi.com/products/supported-platforms |
Thank you, Gerjo. I had the exact same problem. Your solution worked for me. |
@Gerjo Thank you Gerjo for your nice advice! Really works for me using default gcc and g++ 5.4.0 in Ubuntu16.04. I installed g++ 4.8.0 and it really helps a lot! |
After successfully installing Gurobi 6.0.5 I try to make the solver. During linking I get the following:
CMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o: In function
void andres::ilp::Gurobi<double>::addConstraint<unsigned long*, double const*>(unsigned long*, unsigned long*, double const*, double, double) [clone .constprop.252]': solver-callback.cxx:(.text+0x2fc): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'solver-callback.cxx:(.text+0x363): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' CMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o: In function
andres::ilp::Gurobi::Callback::callback()':solver-callback.cxx:(.text._ZN6andres3ilp6GurobiIdE8Callback8callbackEv[_ZN6andres3ilp6GurobiIdE8Callback8callbackEv]+0xbf): undefined reference to
GRBException::getMessage[abi:cxx11]() const' CMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o: In function
void andres::ilp::Gurobi::addConstraint<__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > > >(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator > >, __gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator > >, gnu_cxx::normal_iterator<double*, std::vector<double, std::allocator > >, double, double) [clone .constprop.251]':solver-callback.cxx:(.text.ZN6andres3ilp6GurobiIdE13addConstraintIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEENS5_IPdS7_IdSaIdEEEEEEvT_SF_T0_dd.constprop.251[ZN4pose13PoseEstimatorIN6andres3ilp6GurobiIdEE24FeasibleSolutionCallbackE25addAllCouplingConstraintsEv]+0xb2): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' CMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o: In function
void andres::ilp::Gurobi::addConstraint<unsigned long*, double const*>(unsigned long, unsigned long, double const, double, double) [clone .constprop.253]':solver-callback.cxx:(.text.ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd.constprop.253[ZN4pose13PoseEstimatorIN6andres3ilp6GurobiIdEE24FeasibleSolutionCallbackE36addAllImpossiblePartClassConstraintsEv]+0xb3): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' CMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o: In function
void andres::ilp::Gurobi::addConstraint<unsigned long, double const>(unsigned long, unsigned long, double const, double, double)':solver-callback.cxx:(.text._ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd[_ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd]+0x13c): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' solver-callback.cxx:(.text._ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd[_ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd]+0x19f): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'solver-callback.cxx:(.text._ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd[_ZN6andres3ilp6GurobiIdE13addConstraintIPmPKdEEvT_S7_T0_dd]+0x1f3): undefined reference to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' CMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o:solver-callback.cxx:(.text._ZN6andres3ilp6GurobiIdE13addConstraintIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEENS5_IPKmS9_EEEEvT_SE_T0_dd[_ZN6andres3ilp6GurobiIdE13addConstraintIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEENS5_IPKmS9_EEEEvT_SE_T0_dd]+0x169): more undefined references to
GRBModel::addConstr(GRBLinExpr const&, char, GRBLinExpr const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)' followCMakeFiles/solver-callback.dir/src/pose/research/solver-callback.cxx.o: In function
main': solver-callback.cxx:(.text.startup+0x5f9): undefined reference to
GRBException::getMessageabi:cxx11 const'collect2: error: ld returned 1 exit status
CMakeFiles/solver-callback.dir/build.make:102: recipe for target 'solver-callback' failed
make[3]: *** [solver-callback] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/solver-callback.dir/all' failed
make[2]: *** [CMakeFiles/solver-callback.dir/all] Error 2
CMakeFiles/Makefile2:153: recipe for target 'CMakeFiles/solver-callback.dir/rule' failed
make[1]: *** [CMakeFiles/solver-callback.dir/rule] Error 2
Makefile:155: recipe for target 'solver-callback' failed
make: *** [solver-callback] Error 2
Gurobi environment set to:
GUROBI_HOME=/opt/gurobi605/linux64
LD_LIBRARY_PATH=/opt/gurobi605/linux64/lib
Output from CMake:
coert@beta039608 /mnt/33EE47FC4F4F9C75/Install/deepcut_multiperson/external/solver $ cmake . -DGUROBI_ROOT_DIR=/opt/gurobi605/linux64 -DGUROBI_VERSION=60
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- OpenMP found
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.8.16")
-- Found GUROBI: /opt/gurobi605/linux64/lib/libgurobi60.so
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/33EE47FC4F4F9C75/Install/deepcut_multiperson/external/solver
What am I missing here?
The text was updated successfully, but these errors were encountered: