conjure-cp / conjure

Conjure: The Automated Constraint Modelling Tool
Other
96 stars 22 forks source link

Fixed or-tools install script #643

Closed SeppiaBrilla closed 7 months ago

SeppiaBrilla commented 7 months ago

Hi, I have noticed that, in some Linux systems, the script to install or-tools wasn't working properly: the compilation was successful but at, execution time, the Or-tools solver would throw an exception because it could not locate a shared library it needed. The library was present but it was located in the binary directory and not in the shared library directory. To fix this issue, I have added an if statement that checks if the shared binary folder is present and if it is, the libraries will be copied there. I have also added a message to inform the user on how to act in case the solver doesn't work.

ozgurakgun commented 7 months ago

I think this is the right diagnosis, but I am not sure if the solution is ok.

AFAIK: DYLD_LIBRARY_PATH is a colon separated list of directories that contain libraries. So not necessarily a single value.

We have BIN_DIR controlling where the binaries should end up in, with ~/.local/bin as it's default value.

Maybe we need a LIB_DIR env var as well controlling where the shared libs should end up in? Does anybody know what the done thing is here I wonder? Maybe @ott2?

PS: DYLD_LIBRARY_PATH on macos LD_LIBRARY_PATH on linux.