rust-or / good_lp

Linear Programming for Rust, with a user-friendly API. This crate allows modeling LP problems, and lets you solve them with various solvers.
https://crates.io/crates/good_lp
MIT License
238 stars 34 forks source link

HiGHS does depend on additional libs #29

Closed CCHiggins closed 1 year ago

CCHiggins commented 1 year ago

Readme mentions that HiGHS solver does not depend on additional libs at runtime, which is not wholly true. The highs-sys crate mentions that the library depends on libstdc++ and libgomp at runtime. While most Linux distros include these libraries by default, mac needs to install libomp and lightweight container oriented Linux distros like alpine do not include the gcc tooling by default.

lovasoa commented 1 year ago

You are right ! It would be nice if we could statically link them in https://github.com/rust-or/highs-sys/blob/master/build.rs

CCHiggins commented 1 year ago

I think its possible but gcc is GPLv3 which as an infectious copyleft license, so anything statically linked against GPL libraries must also be released as GPL. It may be possible to static link against clang/LLVM versions which are apache? Edit: looking at the build file more mac is already using LLVM/Clang versions.