conjure-cp / conjure

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

PATH issues when building from source #557

Closed ott2 closed 1 year ago

ott2 commented 1 year ago

The current build infrastructure at several points makes the assumption that stack will be in the path once it is installed during the build. This assumption is not generally true. In a sandboxed build like that by brew install -s the PATH is minimal and this causes the build to fail at several places. The earliest failure is the call to etc/build/install-stack.sh where in the second-last line of the script which stack returns an empty string, and the script then returns an error on the last line stack --version which terminates the build.

One solution is to replace in the Makefile each

@command

with

@env "PATH=${BIN_DIR}:${PATH}" command

I've tested this and it seems to work for brew install -s with a minimalist formula. This change would also remove the need to tell the user about setting PATH in the documentation.

Todo: