I've installed the Haskell Compiler and glpk-hs using the instructions here. Further, I've used cabal install glpk-hs to install required files in an attempt to compile a Haskell Program.
However, the cabal installation of glpk is not working. The following message keeps popping up:
Resolving dependencies...
Configuring glpk-hs-0.5...
Failed to install glpk-hs-0.5
Build log :
cabal: Entering directory '/var/folders/cr/9f1ltj7d4b31hmkfn03hjl_r0000gn/T/cabal-tmp-12521/glpk-hs-0.5'
Configuring glpk-hs-0.5...
cabal.real: Missing dependency on a foreign library:
- Missing C library: glpk
This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal:
Leaving directory '/var/folders/cr/9f1ltj7d4b31hmkfn03hjl_r0000gn/T/cabal-tmp-12521/glpk-hs-0.5'
cabal: Error: some packages failed to install: glpk-hs-0.5 failed during the configure step. The exception was:
ExitFailure 1
As above, I have tried both installing glpk in a nonstandard location and the standard location, but in all cases, has been unable to find the glpk.
The glpsol solver, which uses GLPK is installed though, as it shows the version of which it is currently running: GLPSOL: GLPK LP/MIP Solver, v4.62
pkg-config. Doespkg-configknow about glpk? What doespkg-config --modversion glpksay? You might consider searching for an appropriate*.pcfile on your hard drive -- e.g. look through the output oflocate '*.pc'for something that looks glpk-related -- and make sure the directory that file is in is on yourPKG_CONFIG_PATH. - Daniel Wagnerpkg-config --modversion glpk, and it said that the command was not found. I also attempted thelocate '*.pc', and looked for something related to glpsol or glpk, and there was nothing. Do you think it's a problem withpkg-config? - Fandom_Loverextra-libraries, notpkgconfig-depends. So my previous comments about pkg-config are probably a red herring. (Sorry.) - Daniel Wagnerldfind your glpk library? (Can you build a C program that uses glpk?) - Daniel Wagnerldfinding the glpk, as I'm not too familiar with C. Though going by the glpsol (command line solver), command line recognizes the GLPK package. - Fandom_Lover