Comments (13)
I will submit a pr that you can look at in the next few days.
from ifopt.
@shoshievass I have a similar need, so I'll have a crack at this tomorrow.
from ifopt.
No worries. I actually thought that I had updated the PR with other work I had done, but I guess I was mistaken. For your reference, https://github.com/jwdinius/ifopt/tree/pure_cmake.
I followed the outline provided by kindr in most places, including setting up package exporting. Now, ifopt_ipopt(snopt) can use find_package()
to find ifopt_core
during the local superbuild or via an external cmake project. Please have a look if you are interested in exporting these projects, which might be handy when trying to install ifopt from within another project (like how kindr is built within https://bitbucket.org/adrlab/ct).
I was able to verify that the packages were able to found from an external cmake project built with unit tests. Hopefully something in my repo will be of use to you. Cheers!
from ifopt.
Since catkin is not installed in you system, you will have to remove the "find_package(catkin REQUIRED)" line and all others involving "catkin". Then you will need to ensure that when building "ifopt_ipopt", this project finds "ifopt_core", possibly through cmake's "add_subdirectory()" command and others. This linking of projects is where catkin is most handy.
from ifopt.
@jwdinius Awesome! Please let me know how it goes!
from ifopt.
I have submitted a PR for this: #15. Please review and provide feedback when you get the chance.
from ifopt.
Great, thanks @jwdinius !
I'll have a look at it in the next few days.
from ifopt.
I'm changing the pr to work-in-progress so you all can have a look at it and make comments. I would like to clean up the implementation a little more before it's merged.
from ifopt.
Hi @jwdinius, @shoshievass
Building with pure cmake works now (see #17), please let me know if you experience any problems.
Thanks for your help on this @jwdinius, sorry I couldn't merge your PR, I decided to do some beneficial structural code improvements as well while adding the cmake features.
from ifopt.
Hi,
I am trying to build using CMake. I have made changes according to instructions in the CmakeLists.txt. But I am getting the following error.
~/MyProject$ ls
bin build CMakeLists.txt example.cpp libipopt2.so
$cmake --build build -- -j3
[ 50%] Linking CXX executable ../bin/example
//usr/local/lib/libipopt.so.1: undefined reference to dpotrf_' //usr/local/lib/libipopt.so.1: undefined reference to
dgemm_'
//usr/local/lib/libipopt.so.1: undefined reference to dnrm2_' //usr/local/lib/libipopt.so.1: undefined reference to
dscal_'
//usr/local/lib/libipopt.so.1: undefined reference to dpotrs_' //usr/local/lib/libipopt.so.1: undefined reference to
dtrsm_'
//usr/local/lib/libipopt.so.1: undefined reference to dlopen' //usr/local/lib/libipopt.so.1: undefined reference to
daxpy_'
//usr/local/lib/libipopt.so.1: undefined reference to dgetrf_' //usr/local/lib/libipopt.so.1: undefined reference to
dcopy_'
//usr/local/lib/libipopt.so.1: undefined reference to idamax_' //usr/local/lib/libipopt.so.1: undefined reference to
dlclose'
//usr/local/lib/libipopt.so.1: undefined reference to dlerror' //usr/local/lib/libipopt.so.1: undefined reference to
dlsym'
//usr/local/lib/libipopt.so.1: undefined reference to dsyrk_' //usr/local/lib/libipopt.so.1: undefined reference to
dasum_'
//usr/local/lib/libipopt.so.1: undefined reference to dsyev_' //usr/local/lib/libipopt.so.1: undefined reference to
dmumps_c'
//usr/local/lib/libipopt.so.1: undefined reference to dgetrs_' //usr/local/lib/libipopt.so.1: undefined reference to
ddot_'
collect2: error: ld returned 1 exit status
CMakeFiles/example.dir/build.make:96: recipe for target '../bin/example' failed
make[2]: *** [../bin/example] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/example.dir/all' failed
make[1]: *** [CMakeFiles/example.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
from ifopt.
@sapan-ostic It looks like ipopt can't find blas. Are you sure that your libipopt.so works as expected? Did you follow the build stages at https://www.coin-or.org/Ipopt/documentation/node10.html? Are you working on linux? You could just apt install ipopt and it will handle the dependencies for you. If you run into other problems, you could look at my fork https://github.com/jwdinius/ifopt. I also wrote a blog post about the conversion process https://jwdinius.github.io/blog/2018/cmake/. Hopefully one of these references will help. Good luck!
from ifopt.
I am having the same issue as @sapan-ostic.
I try to compile the ex_test_ipopt.cc using cmake.
find_package(IPOPT 3.11.10 REQUIRED)
find_package(ifopt 2.0.1 REQUIRED)
set(LIB_IPOPT ifopt_ipopt)
add_executable(${LIB_IPOPT}-example ex_test_ipopt.cc)
target_link_libraries(${LIB_IPOPT}-example
PUBLIC
ifopt::ifopt_core
ifopt::ifopt_ipopt
)
And it gives me:
[ 20%] Linking CXX executable ifopt_ipopt-example
//usr/local/lib/libipopt.so.1: undefined reference to `dpotrf_'
//usr/local/lib/libipopt.so.1: undefined reference to `dgemm_'
//usr/local/lib/libipopt.so.1: undefined reference to `dnrm2_'
//usr/local/lib/libipopt.so.1: undefined reference to `dscal_'
//usr/local/lib/libipopt.so.1: undefined reference to `dpotrs_'
//usr/local/lib/libipopt.so.1: undefined reference to `dtrsm_'
//usr/local/lib/libipopt.so.1: undefined reference to `dlopen'
//usr/local/lib/libipopt.so.1: undefined reference to `daxpy_'
//usr/local/lib/libipopt.so.1: undefined reference to `dgetrf_'
//usr/local/lib/libipopt.so.1: undefined reference to `dcopy_'
//usr/local/lib/libipopt.so.1: undefined reference to `idamax_'
//usr/local/lib/libipopt.so.1: undefined reference to `dlclose'
//usr/local/lib/libipopt.so.1: undefined reference to `dlerror'
//usr/local/lib/libipopt.so.1: undefined reference to `dlsym'
//usr/local/lib/libipopt.so.1: undefined reference to `dsyrk_'
//usr/local/lib/libipopt.so.1: undefined reference to `dasum_'
//usr/local/lib/libipopt.so.1: undefined reference to `dsyev_'
//usr/local/lib/libipopt.so.1: undefined reference to `dmumps_c'
//usr/local/lib/libipopt.so.1: undefined reference to `dgetrs_'
//usr/local/lib/libipopt.so.1: undefined reference to `ddot_'
//usr/local/lib/libipopt.so.1: undefined reference to `dsymv_'
//usr/local/lib/libipopt.so.1: undefined reference to `dgemv_'
collect2: error: ld returned 1 exit status
CMakeFiles/ifopt_ipopt-example.dir/build.make:96: recipe for target 'ifopt_ipopt-example' failed
make[2]: *** [ifopt_ipopt-example] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ifopt_ipopt-example.dir/all' failed
make[1]: *** [CMakeFiles/ifopt_ipopt-example.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
from ifopt.
I solved this by reinstall the ipopt with BLAS. Aka, remove the coinor-libipopt-dev
, and compile ipopt from source after get the Thirdparty solver BLAS.
from ifopt.
Related Issues (20)
- Redundant calls to FillJacobianBlock HOT 11
- Unit tests are broken HOT 1
- ROS 2 Foxy Release? HOT 10
- Question about warm starting HOT 3
- warm start is not supported?
- Request release of latest on ROS Noetic? HOT 3
- The EvaluateCostFunctionGradient numerical difference produces incorrect gradient when using squared cost. HOT 3
- Project status
- ifopt-config.cmake error on Windows HOT 1
- defining equaility constraints
- errors with Snopt 7.7 HOT 2
- Get Iterations History HOT 1
- Internal representation of optimization variables HOT 8
- GetBounds() violation when both boundaries are negative HOT 3
- [Q] Weak solver performance HOT 8
- Using AD Libraries HOT 1
- Is IFOPT thread-safe?
- bad-free error when building with memory sanitizer flag
- Disabling solution summary. HOT 1
- I have add a GetHession function to this library. Does anyone know how I should submit to the library owner HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ifopt.