Re: [mpich-devel] [mpich-discuss] MPICH make clean requires sudo and mucks with DESTDIR
Thanks. The “uninstall-local” target is where the “rm -f” should have been? — Pavan On Aug 22, 2014, at 1:14 PM, Dave Goodell (dgoodell) <[email protected]> wrote:
For whoever fixes this, this is the relevant bit of the Automake manual that talks about the "-local" targets:
http://www.gnu.org/software/automake/manual/automake.html#Extending
-Dave
Begin forwarded message:
From: "Dave Goodell (dgoodell)" <[email protected]> Subject: Re: [mpich-discuss] MPICH make clean requires sudo and mucks with DESTDIR Date: August 22, 2014 1:11:18 PM CDT To: "<[email protected]>" <[email protected]> Cc: Jed Brown <[email protected]>, Satish Balay <[email protected]>
On Aug 21, 2014, at 8:16 PM, Barry Smith <[email protected]> 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/4153c8f8680eeb09a80424f2cc787e799e8040...
This is the relevant Makefile.sm that was present at the time of the overhaul: http://git.mpich.org/mpich.git/blob/5283393cd41ab38548477ef967f4205539d8e533...
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
_______________________________________________ To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/devel
-- Pavan Balaji ✉️ http://www.mcs.anl.gov/~balaji
participants (1)
-
Balaji, Pavan