When installing sys-cluster/torque, the installed libraries keep within them a
compile-time absolute path to one of the installed binaries. This doesn't
appear to be an issue when just using Torque, but when trying to compile
software that depends on Torque (ie. the Maui cluster scheduler), they fail to
run.
How to reproduce:
1. emerge torque
2. download and compile maui
3. killall pbs_sched && maui, watch for error messages
One my system, this results in the following error message being displayed:
sh:
/scratch/gentoo-portage-tmp/portage/torque-1.2.0_p1/image//usr/sbin/pbs_iff: No
such file or directory
(Note that PORTAGE_TMPDIR=/scratch/gentoo-portage-tmp on my system.)
Basically, it looks like when running ebuild ....torque-1.2.0_p1.ebuild
install, the make prefix=${D}/usr install that gets called causes a rebuild of
all the Torque libraries with the new prefix (which is different from that
passed in src_compile). The process works like this:
1. ebuild calls "make prefix=${D}/usr mandir=${D}/usr/share/man
PBS_SERVER_HOME=${D}/usr/spool/PBS install || die" in src_install.
2. Torque's makefile sets ${prefix}, which then in turn sets ${sbindir}.
3. Makefile sets IFF_PATH=$(sbindir)/pbs_iff.
4. This path in turn gets placed into the CFLAGS define in
src/lib/Libpbs/Makefile and compiles the library with that (absolute) path.
I'm working on a solution for this, but smarter minds than mine may have a
quicker solution.
fixed in cvs now, there were a few other places that needed DESTDIR in
pbs_mkdirs.in as well that you missed, but I've got them all now.