[mpich-discuss] MPICH make clean requires sudo and mucks with DESTDIR

Balaji, Pavan balaji at anl.gov
Fri Aug 22 15:48:28 CDT 2014


Hmm.  I wonder what the right fix would be.  Should we even bother cleaning up stuff in the install directory during a “make clean” or equivalent?  Would the right fix be to simply remove the “rm -f” line?

  — Pavan

On Aug 22, 2014, at 1:11 PM, Dave Goodell (dgoodell) <dgoodell at cisco.com> wrote:

> On Aug 21, 2014, at 8:16 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>> 
>> In the root Makefile is 
>> 
>> # we can only have one clean-local, so we hook into it via conditionally
>> # defined variables in the dependencies section
>> clean-local: $(CLEAN_LOCAL_TARGETS)
>> 	rm -f ${DESTDIR}${bindir}/mpic++
> 
> I was curious if that was my fault as part of the build system rewrite, so I took a peek at his.  It looks like a bug from Pavan's commit in June 2012: http://git.mpich.org/mpich.git/commitdiff/cd88cf96
> 
> The commit he references in his commit was the build system overhaul: http://git.mpich.org/mpich.git/commit/4153c8f8680eeb09a80424f2cc787e799e8040a5
> 
> This is the relevant Makefile.sm that was present at the time of the overhaul: http://git.mpich.org/mpich.git/blob/5283393cd41ab38548477ef967f4205539d8e533:/src/env/Makefile.sm
> 
> It has this "rm -f" in a (simplemake-specific) "uninstall-postamble" target, which is rather different from a "clean-local" target.  This logic should probably be moved to an "uninstall-local" target instead.  I'm in favor adding an UNINSTALL_LOCAL_TARGETS parallel to the CLEAN_LOCAL_TARGETS pattern already in use, but that's a decision for the MPICH guys to make.
> 
>> I do not see how this could be correct, since 
>> 
>> 1) mucking with DESTDIR would require sudo for some configurations and make clean shouldn’t require sudo
>> 
>> 2) should make clean muck with DESTDIR anyways?
>> 
>> When I run make clean after a make install I do get an permissions error in trying to remove that link.
> 
> I agree, it is not correct.
> 
> -Dave
> 
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss

--
Pavan Balaji  ✉️
http://www.mcs.anl.gov/~balaji



More information about the discuss mailing list