when the compiled package is merged from sandbox, not all references to sandbox directories seem to be removed. Reproducible: Always Steps to Reproduce: 1. emerge smlnj 2. grep portage /usr/bin/sml Actual Results: BIN_DIR="/var/tmp/portage/dev-lang/smlnj-110.67-r2/work/bin" Expected Results: BIN_DIR="/usr/bin" trying to install a package depending on smlnj failed: ./configure: SMLCM is /usr/bin/sml ./configure: line 120: /var/tmp/portage/dev-lang/smlnj-110.67-r2/work/bin/.arch-n-opsys: No such file or directory 'grep portage /usr/bin/sml' yields BIN_DIR="/var/tmp/portage/dev-lang/smlnj-110.67-r2/work/bin" I simply sudoedited /usr/bin/sml to change that to BIN_DIR="/usr/bin" and now it works for me. ;)
I solved the issue of that wrong path by inserting SMLNJ_HOME=/usr into /usr/bin/sml. Consequently BIN_DIR gets set to ${SMLNJ_HOME}/bin. It seems to me the bug is in SMLCM...
I don't know is there is actually an issue here or how to reproduce it. This BIN_DIR="/var/tmp/portage/dev-lang/smlnj-110.67-r2/work/bin" is never used anymore AFAIK.