-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: fix output directory when specified with O= #30431
Conversation
and SRCDIR is not set.
@fredrikekre does this at least fix the issue you were seeing? |
Yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would SRCDIR manage not to get set? This will not do the same task.
|
|
|
Make.inc doesn't define any rules and is never used, so it should never expand to the empty string
That is not what this PR does. If it was that easy to compute, we would have done that originally. |
I think what you're trying to say is that |
Right, defining Line 2 in eddcbd7
Edit: It does fix the problem with this diff: diff --git a/Makefile b/Makefile
index ea67778..df9eb03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
JULIAHOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
+SRCDIR := $(JULIAHOME)
include $(JULIAHOME)/Make.inc
VERSDIR := v`cut -d. -f1-2 < $(JULIAHOME)/VERSION` |
Demonstration of the problem:
|
FWIW, there also seems to be some ordering problem:
which is weird since Line 59 in eddcbd7
stdlib . I guess the unfinished jobs from the end of the output is creating those files, because calling make again works, since those file are now existing.
|
Should this be backported? |
Would #30431 (comment) be a better fix than what is on this branch now @vtjnash ? |
That's at least not an incorrect change (unlike this PR), although nobody has yet said why this is a bug. There's a repro above that shows that an ignored variable has an undefined value—but which is normal to not care what happens to the value of something that is not used. |
You don't think this is a bug: #30431 (comment) ? I would expect
and not
|
@vtjnash says this change is incorrect. It seems like there's still some confusion about that, so ideally let's figure out what the actual issue here is before triaging whether to backport it. |
@vtjnash can you explain a little more concretely why this is incorrect? |
It replaces some code that does the desired thing with code that does something else. The only claim so far seems to be that an unused variable has an undefined value. But yeah, we have many of those. |
So let's talk about the incorrect behavior that we see right now then. The fundamental issue is that running |
OK, but this can't be the only unused variable (used by some other arbitrary build script) that has a random value. As you point out, SRCDIR and SRCCACHE also don't have the correct values |
@fredrikekre I tried to re-create this and I couldn't; if you include the |
Fix
abspath
call when output directory is specified withO=
andSRCDIR
is not set.