Code Monkey home page Code Monkey logo

Comments (6)

Coloquinte avatar Coloquinte commented on July 23, 2024 2

Indeed it's a problem with seeing the new shared library. You need to run ldconfig after installing, so the list of shared libraries is updated. Cmake doesn't do it for us

Alternatively you could just build with static linking: cmake -DBUILD_SHARED_LIBS=OFF. Building the highs binary with static linking by default would avoid this kind of issues.

root@7faabfc1d615:/HiGHS# highs
highs: error while loading shared libraries: libhighs.so.1: cannot open shared object file: No such file or directory
root@7faabfc1d615:/HiGHS# ldconfig
root@7faabfc1d615:/HiGHS# highs
Please specify filename in .mps|.lp|.ems format.

from highs.

metab0t avatar metab0t commented on July 23, 2024 1

You can also change the RPATH for the highs executable like https://github.com/metab0t/highsbox/blob/edd84ac1767b9df82fba2cb635ea34ef87d95ab9/setup.py#L93

Ensure libhighs.so is in the <your_highs_executable_path>/../lib folder.

Run the following commands on Linux:

patchelf --set-rpath '$ORIGIN/../lib' <your_highs_executable_path>

On Mac, run:

install_name_tool -add_rpath '@loader_path/../lib' <your_highs_executable_path>

It is useful if you want to create a portable bundle of HiGHS without installing it in system directories.

from highs.

galabovaa avatar galabovaa commented on July 23, 2024 1

@silky this fix is included in the latest release v1.7.1. Closing this issue, please re-open it, or a new one, if you encounter any further issues.

from highs.

galabovaa avatar galabovaa commented on July 23, 2024

I have made an attempt to address this issue in branch rpath-bin:

https://github.com/ERGO-Code/HiGHS/pull/1745/files

Would you please check whether this removes both

the need to modify paths on linux @silky
the need for your patch, @metab0t

from highs.

silky avatar silky commented on July 23, 2024

@galabovaa naively following my initial instructions above, I now get

CMake Error at CMakeLists.txt:191 (cmake_policy):
  Policy "CMP0138" is not known to this version of CMake.

on that branch :(

root@65347b9d05c1:/HiGHS# cmake --version
cmake version 3.22.1

from highs.

galabovaa avatar galabovaa commented on July 23, 2024

Thank you! I will edit cmake accordingly

from highs.

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.