1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Rep Power

    Cannot open -lglpk: No such file or directory


    While building the glpk module , i got the following error:

    C:\Python27\cvxopt-1.1.5\src>python setup.py build --compiler=mingw32
    running build
    running build_py
    running build_ext
    building 'glpk' extension
    C:\G77\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I/usr/include -IC:\Python27\cvxop
    t-1.1.5\src\include -IC:\Python27\cvxopt-1.1.5\src\PC -c C/glpk.c -o build\temp.
    In file included from C:\Python27\cvxopt-1.1.5\src\include\pyport.h:312,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:58,
    from C\cvxopt.h:22,
    from C/glpk.c:22:
    C:\Python27\cvxopt-1.1.5\src\include\math.h:256: warning: conflicting types for
    built-in function 'scalb'
    writing build\temp.win32-2.7\Release\c\glpk.def
    C:\MinGW\bin\dllwrap.exe -mno-cygwin -mdll -static --output-lib build\temp.win32
    -2.7\Release\c\libglpk.a --def build\temp.win32-2.7\Release\c\glpk.def -s build\
    temp.win32-2.7\Release\c\glpk.o -L/usr/lib -LC:\Python27\cvxopt-1.1.5\src\libs -
    LC:\Python27\cvxopt-1.1.5\src\PCbuild -lglpk -lpython27 -lmsvcr90 -o build\lib.w
    ld: cannot open -lglpk: No such file or directory
    dllwrap: gcc exited with status 1
    error: command 'dllwrap' failed with exit status 1

    It seems that it is looking for the glpk directory, i have the glpk file but don't know where the system is looking for?

    Any suggestion?

    Thank you.
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    Is the equivalent of libglpk.a (maybe named glpk.lib on a DOS system) on your system?

    You could put a copy of it into the build directory
    or include the option
    into this command. The option must precede the -lglpk option.

    (following is messed up. I hope you figure out which command from your post I mean)
    C:\MinGW\bin\dllwrap.exe -mno-cygwin -mdll -static --output-lib build\temp.win32
    -2.7\Release\c\libglpk.a --def build\temp.win32-2.7\Release\c\glpk.def -s build temp.win32-.7\Release\c\glpk.o -L/usr/lib -LC:\Python27\cvxopt-1.1.5\src\libs -LC:\Python27\cvxopt-1.1.5\src\PCbuild -lglpk -lpython27 -lmsvcr90 -o build\lib.w
    Last edited by b49P23TIvg; October 19th, 2012 at 08:41 AM.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo