Unnecessary recompilation? #208
Labels
No Label
IMAP
JMAP
Maildir
Retired
User Experience
User Interface
bsd
bug
contacts
currently worked on
documentation
duplicate
easy
enhancement
help wanted
invalid
linux-gnu
macos
mbox
notmuch
question
security
wishlist
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: meli/meli#208
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
This threw me off a bit, is this the expected behavior?
Behavior
$ make
compiles the project.$ make install
attempts to install and obviously fails if$PREFIX
is default.# make install
attempts to recompile and install.Expected behavior
$ make
compiles the project.$ make install
attempts to install and obviously fails if$PREFIX
is default.# make install
uses binary from step 1 and install it.I wasn't able to replicate this. I did
make
make install
as non-root, failed because of default$PREFIX
make PREFIX=/tmp/ install
worked without recompilingThe problem appers when running
make install
with root permitions e.g.sudo make install
.With changing the PREFIX it works if the folder is user writeable.
Ah. Most probably you don't have the same cargo environment variables as the user and as root. So when you run with sudo, cargo rebuilds it because cargo home (usually $HOME/.cargo) is different. So it's expected behavior, because of the way cargo works and how the makefile target is defined. I think if the target was defined as the binary filename instead of a PHONY named target it wouldn't recompile it because Make would see it already exists.
Reference for cargo rebuild behavior: https://github.com/rust-lang/cargo/issues/10499