xuy/pyipopt

Compile error: cannot find -lcoinmumps -- requires coin, not just ipopt?

JohannesBuchner opened this issue · 2 comments

I get the error "cannot find -lcoinmumps, -lcoinmetis" on building. setup.py build.
Do I need another package other than ipopt from coin-or?

user@host ~/Downloads/Ipopt-3.11.3/pyipopt $ C_INCLUDE_PATH=$HOME/bin/ipopt/include/coin/ LIBRARY_PATH=$HOME/bin/ipopt/lib/ LD_LIBRARY_PATH=$HOME/bin/ipopt/lib/ python setup.py build running build running build_py running build_ext building 'pyipoptcore' extension x86_64-pc-linux-gnu-gcc -pthread -fPIC -I/home/user/.local/lib64/python2.7/site-packages/numpy/core/include -I/usr/local/include/coin/ -I/usr/include/python2.7 -c src/callback.c -o build/temp.linux-x86_64-2.7/src/callback.o In file included from /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:0, from /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15, from src/hook.h:7, from src/callback.c:36: /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] x86_64-pc-linux-gnu-gcc -pthread -fPIC -I/home/user/.local/lib64/python2.7/site-packages/numpy/core/include -I/usr/local/include/coin/ -I/usr/include/python2.7 -c src/pyipoptcoremodule.c -o build/temp.linux-x86_64-2.7/src/pyipoptcoremodule.o In file included from /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:0, from /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15, from src/hook.h:7, from src/pyipoptcoremodule.c:9: /home/user/.local/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. build/temp.linux-x86_64-2.7/src/callback.o build/temp.linux-x86_64-2.7/src/pyipoptcoremodule.o -L/usr/local/lib -L/usr/lib64 -lipopt -lblas -lcoinmumps -lcoinmetis -llapack -ldl -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/pyipopt/pyipoptcore.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lcoinmumps /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lcoinmetis collect2: ld returned 1 exit status error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

xuy commented

These libraries are required by IPOPT, but not explicitly specified. See the instruction of installing ipopt for more details:

http://www.coin-or.org/Ipopt/documentation/node13.html

Basically you need to actually install ipopt third-party libraries into places where ld can find.