[mpich-discuss] Fwd: mpich2-1.4.1rc1 and DESTDIR behavior (in MacPorts)

Deji Akingunola dakingun at gmail.com
Thu Aug 25 12:58:39 CDT 2011


I can see this issue made it to 1.4.1 final release. I'm having the
same problem Eric encountered while trying to build Fedora and RHEL
RPMs for mpich2-1.4.1 . I think I (and other distro builders) have to
apply similar workarounds to build packages for 1.4.1

- Deji

On Wed, Aug 24, 2011 at 5:41 PM, Eric A. Borisch <eborisch at ieee.org> 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
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>


More information about the mpich-discuss mailing list