https://github.com/IDAES/idaes-ext/pull/266 adds set -e, which causes builds to fail if HSL is not present. This PR fixes these failures, and adds an option to explicitly turn off building with HSL (even if it is available as a local zip file or elsewhere).
Changes
If the second positional argument to compile_solvers.sh is --without-hsl, we will pass --without-hsl to Ipopt compile steps (regardless of whether or not HSL is available). We also skip building k_aug and dot_sens, as these fail without HSL
If a local coinhsl.zip file is not found, and --without-hsl is not used, we explicitly notify the user that we are attempting to build with an already-installed HSL library (previously, we did this implicitly)
In docker/build-extensions/build.sh, interpret the fifth positional argument as an argument (or arguments) to send to compile_solvers.sh. This allows us to use --without-hsl when using the (Linux) docker build script
Admittedly, communicating arguments among various scripts is getting cumbersome. E.g. if you want to use --without-hsl in the docker build script, you need to pass arguments for the repo URL and branch, even if you just want to use default options. Maybe environment variables would be a better choice here, although I tend to prefer explicit command line arguments.
Summary
https://github.com/IDAES/idaes-ext/pull/266 adds
set -e
, which causes builds to fail if HSL is not present. This PR fixes these failures, and adds an option to explicitly turn off building with HSL (even if it is available as a local zip file or elsewhere).Changes
compile_solvers.sh
is--without-hsl
, we will pass--without-hsl
to Ipopt compile steps (regardless of whether or not HSL is available). We also skip buildingk_aug
anddot_sens
, as these fail without HSL--without-hsl
is not used, we explicitly notify the user that we are attempting to build with an already-installed HSL library (previously, we did this implicitly)docker/build-extensions/build.sh
, interpret the fifth positional argument as an argument (or arguments) to send tocompile_solvers.sh
. This allows us to use--without-hsl
when using the (Linux) docker build scriptAdmittedly, communicating arguments among various scripts is getting cumbersome. E.g. if you want to use
--without-hsl
in the docker build script, you need to pass arguments for the repo URL and branch, even if you just want to use default options. Maybe environment variables would be a better choice here, although I tend to prefer explicit command line arguments.