[mpich-discuss] Fwd: mpich2-1.4.1rc1 and DESTDIR behavior (in MacPorts)
William Gropp
wgropp at illinois.edu
Thu Aug 25 07:50:16 CDT 2011
Thanks, Eric.
I'll have a look at the changes; we certainly want to be consistent
with the GNU standards.
The one problem we have is that, while we used to be able to run the
tests prior to installation (something that really should be
mandatory), other changes have made that impossible. The changes I
made to the DESTDIR support were intended to provide a route to regain
that ability, along with catching various places where DESTDIR was not
supported.
Bill
On Aug 24, 2011, at 4:41 PM, Eric A. Borisch wrote:
> I'm forwarding this to the -discuss group as I see others may be
> interested....
>
> - Eric
>
> ---------- Forwarded message ----------
> From: Eric A. Borisch <eborisch at macports.org>
> Date: Thu, Aug 18, 2011 at 11:18 AM
> Subject: mpich2-1.4.1rc1 and DESTDIR behavior (in MacPorts)
> To: Pavan Balaji <balaji at mcs.anl.gov>
>
>
> Pavan,
>
> Thanks again for your (and the rest of the team's) work on mpich2! As
> you may recall I maintain the MacPorts mpich2 portfile.
>
> I believe the 1.4.1rc1 implementation of DESTDIR is overzealous -- the
> intention is not to run *in* DESTDIR, but to install a copy of the
> files [1] that will eventually be placed into prefix info
> ${DESTDIR}/${prefix} in exactly the same state as if they were
> directory (make install-ed) into prefix.
>
> Here are the changes I've had to apply with the portfile to make this
> work correctly:
>
> (1) We still need to patch createshlib.in as before [2]
>
> (2) Without this set of changes, a number of the files get placed
> into ${destroot}${destroot}${prefix} (as opposed to
> ${destroot}${prefix}) during the 'make install DESTDIR=${destroot}'
> process
>
> post-patch {
> reinplace -E "s|fix=\\\$\\\{DESTDIR\\\}|fix=|g" \
> ${worksrcpath}/Makefile.in
> reinplace -E "s|dir=\\\$\\\{DESTDIR\\\}|dir=|g" \
> ${worksrcpath}/Makefile.in
> }
>
> (3) Without these changes the DESTDIR (=$(destroot)) directory ends up
> stored in these files, as well. I haven't verified that this removal
> is required, but it seemed poor form to leave references to a
> soon-to-be-nonexistent directory. This could probably also be fixed by
> patching a Makefile.in somewhere, but this was quicker for me to
> implement.
>
> post-destroot {
> reinplace -E "s|${destroot}||g" ${destroot}/${prefix}/bin/mpicxx
> reinplace -E "s|${destroot}||g" ${destroot}/${prefix}/bin/mpicc
> reinplace -E "s|${destroot}||g" ${destroot}/${prefix}/etc/
> mpicxx.conf
> reinplace -E "s|${destroot}||g" ${destroot}/${prefix}/etc/
> mpicc.conf
> }
>
> I've attached a patchfile describing the effect of the post-patch step
> (2) above.
>
> I haven't updated the portfile in Macports yet; I'll probably wait for
> the actual release.
>
> Thanks, and let me know your thoughts
> Eric
> --
> Eric A. Borisch
>
> [1] http://www.gnu.org/prep/standards/html_node/DESTDIR.html
> [2] https://trac.macports.org/browser/trunk/dports/science/mpich2/files/patch-src-util-createshlib.in
William Gropp
Director, Parallel Computing Institute
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign
More information about the mpich-discuss
mailing list