Code Monkey home page Code Monkey logo

Comments (9)

saSerrano avatar saSerrano commented on July 3, 2024

Hi @Michaelxiaofeng, with the following commands my CMakeLists.txt is able to find the LpSolve library (tested in Ubuntu 18.04):

wget http://bashdb.sf.net/lpsolve-5.5.0.10i.tar.bz2
tar -xpf lpsolve-5.5.0.10i.tar.bz2
cd ./lpsolve-5.5.0.10i
./configure --prefix=/usr && make && make check && sudo make install

Maybe what you need is to add the --prefix=/usr when you execute the configure file. Additionally, you may download a more recent version of LpSolve (I copy-pasted the one I am using).

I hope this helps :)

from ai-toolbox.

Michaelxiaofeng avatar Michaelxiaofeng commented on July 3, 2024

./configure --prefix=/usr && make && make check && sudo make install

Thank you so much! I downloaded the newest version.
I tried , but got the error:./configure: permission denied
by the way , do we need to make ipsolve? I thought we just need to unzip the package and let cmake find the lib files.

from ai-toolbox.

Svalorzen avatar Svalorzen commented on July 3, 2024

Hey, sorry for the late reply. Thankfully, this should be a pretty easy fix.

LpSolve comes with a program to solve linear programming problems. The lpsolve package you installed is that. However, it is not what this library uses. Instead, you need to install the liblpsolve55-dev package. The lib and dev parts of the name are the hints that it is a development package, i.e. it contains the stuff required to use and link lpsolve features from code.

Do let us know if this fixes the problem.

from ai-toolbox.

saSerrano avatar saSerrano commented on July 3, 2024

As @Svalorzen so well explained it, yes you need to make lpsolve to use it in another project (e.g. AI-Toolbox).

Regarding the permission-denied error, try to execute the following command instead:
sudo ./configure --prefix=/usr && make && make check && sudo make install

I hope this fixes the problem.

from ai-toolbox.

SinghGaganpreet avatar SinghGaganpreet commented on July 3, 2024

I am also having the same problem. And the given command
sudo ./configure --prefix=/usr && make && make check && sudo make install
is also giving permission error.

I can see lp_solve "liblpsolve55.so" file in the /usr/lib/lp_solve" folder of my Ubuntu. But It's AI_Toolbox is not able to compile.

Thanks for the help.

from ai-toolbox.

Svalorzen avatar Svalorzen commented on July 3, 2024

This repo doesn't have a configure script, so that command is actually incorrect.

How did you try to setup the library and call CMake? What error do you get exactly?

from ai-toolbox.

SinghGaganpreet avatar SinghGaganpreet commented on July 3, 2024

I tried installing thought "sudo apt install lp_solve", but I already had the newest lp_solve library. I checked and it was present in "/usr/lib/lp_solve"

But when I run the code, I get below-mentioned error:

--Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.67")  
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.2.92") 
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find LpSolve (missing: LPSOLVE_LIBRARIES LPSOLVE_INCLUDE_PATH
  LPSOLVE_LINKS)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindLpSolve.cmake:94 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:134 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/singh221/lib_required_for_vita/AI-Toolbox/build/CMakeFiles/CMakeOutput.log".

I even see set LPSOLVE_LIBRARIES using export LPSOLVE_LIBRARIES=/usr/lib/ but no luck.

from ai-toolbox.

Svalorzen avatar Svalorzen commented on July 3, 2024

You need to install liblpsolve55-dev. The lp_solve package is an executable, not for development.

from ai-toolbox.

SinghGaganpreet avatar SinghGaganpreet commented on July 3, 2024

Thanks, it is compiling but getting error while doing "make"

A new error thread was created for that (#59)

from ai-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.