GLPK building, but not linked

55 views
Skip to first unread message

Stephanie

unread,
Feb 25, 2014, 3:07:38 PM2/25/14
to cvx...@googlegroups.com
Hi,

I am trying to install cvxopt with the glpk module on a relatively old Linux server on which I don't have sudo powers. I am using gcc 4.1 and the Enthought Canopy python environment on a bash shell. So far, I have


1) set up a directory "libraries" in my home directory containing "bin", "lib", "include" and "share" folders, to imitate /usr and /usr/local
2) installed glpk dynamic libraries into ~/libraries/lib
3) installed atlas (with lapack) dynamic libraries into ~/libraries/lib and header files into ~/libraries/include
4) edited my setup.py file (attached), to account for installing atlas and glpk in my home directory, and built and installed cvxopt
5) checked that the example files distributed with cvxopt run (they do)

However, the code in the attached test.py does not run because glpk is not found. But, the command "find ~ -name *glpk.so" gives:
~/libraries/lib/libglpk.so
~/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cvxopt/glpk.so
~/cvxopt-1.1.6/build/lib.linux-x86_64-2.7/cvxopt/glpk.so
~/.local/lib/python2.7/site-packages/cvxopt/glpk.so

implying that the glpk module was indeed built and installed.

Do you know what might be wrong?

Thanks,
Stephanie
test.py
setup.py

Martin

unread,
Feb 27, 2014, 5:55:50 PM2/27/14
to cvx...@googlegroups.com
The problem is that the linker does not find the glpk library at runtime. You can compile with -rpath, or alternatively, you can set LD_LIBRARY_PATH before starting python. The issue is described here: http://www.cc.dtu.dk/?page_id=304

Martin
Reply all
Reply to author
Forward
0 new messages