no way to properly set MOZBUILD_STATE_PATH from mozconfig?
Categories
(Firefox Build System :: Mach Core, defect, P4)
Tracking
(Not tracked)
People
(Reporter: Gankra, Unassigned)
Details
Attachments
(2 files)
The workaround for Bug 1490802 is to use MOZBUILD_STATE_PATH to untar node in a location with a very short path (for me: C:/a/
). However as a side-effect you now need to pass MOZBUILD_STATE_PATH whenever you mach build
. Ok, no problem, that's what mozconfig files are for.
Except MOZBUILD_STATE_PATH doesn't seem to work properly when set by your mozconfig:
- mach bootstrap completely ignores it, so you still need to remember that you have this hack setup whenever you want to update your tools
- mach build partially ignores it -- if I set it via
ac_add_options
orexport
, it will properly find the clang install in that location, but it won't find the node install in that location. If I pass it on the command line likeMOZCONFIG=
itself, then everything works.
Is this intended? It's a bit frustrating. Is the "right" thing to do just add it to my shell's init scripts (in the same way you add things to PATH)?
Reporter | ||
Comment 1•6 years ago
|
||
Just to be totally clear: this is on windows 10, using a pretty vanilla (as far as I can remember) install of mozillabuild.
This is only an issue on windows since it's the only platform with these long path issues plaguing random libraries.
![]() |
||
Comment 2•6 years ago
|
||
(In reply to Alexis Beingessner [:Gankro] from comment #0)
- mach build partially ignores it -- if I set it via
ac_add_options
orexport
, it will properly find the clang install in that location, but it won't find the node install in that location. If I pass it on the command line likeMOZCONFIG=
itself, then everything works.
This is kind of weird. I know that clang
is searched for in a number of directories, which already include the MOZBUILD_STATE_PATH
.:
https://searchfox.org/mozilla-central/source/build/moz.configure/toolchain.configure#725-760
At first blush, it looks like node isn't:
https://searchfox.org/mozilla-central/source/build/moz.configure/node.configure#12-20
But tracing through find_node_executable
:
https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/nodeutil.py#69-90
https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/nodeutil.py#103-104
https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/nodeutil.py#21-47
https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/util.py#13-50
suggests that we ought to be respecting MOZBUILD_STATE_PATH
there as well....? It's also not clear to me why you'd get different results depending on where your environment variable is set?
Reporter | ||
Comment 3•6 years ago
•
|
||
it looks like it might just be checking MOZBUILD_STATE_PATH too late? It seems like it's finding some other node first (the one I had installed from before I needed to use this hack?)
0:07.26 checking for nodejs... no
0:07.26 ERROR: NODEJS must point to node 8.11 or newer; found node location: c:\mozilla-build\node-v8.1.4-win-x64\node.EXE.
0:07.26 Executing `mach bootstrap --no-system-changes` should
0:07.26 install a compatible version in ~/.mozbuild on most platforms.
0:07.26 If you believe this is a bug, <https://mzl.la/2vLbXAv> is a good way
0:07.26 to file. More details: <https://bit.ly/2BbyD1E>
0:07.32 *** Fix above errors and then restart with\
0:07.32 "./mach build"
0:07.34 mozmake.EXE: *** [client.mk:115: configure] Error 1
(this specific error is from export MOZBUILD_STATE_PATH=C:/a/
)
![]() |
||
Comment 4•6 years ago
|
||
I could believe that, except I think find_node_paths
puts $MOZBUILD_STATE_PATH/node
at the beginning of the list of paths to search.
Does $OBJDIR/config.log
contain anything interesting? Or maybe dropping some log.info(...)
/print
calls around nodeutil would turn up something interesting...
Reporter | ||
Comment 5•6 years ago
|
||
![]() |
||
Comment 6•6 years ago
|
||
INFO: checking for nodejs...
INFO: no
ERROR: NODEJS must point to node 8.11 or newer; found node location: c:\mozilla-build\node-v8.1.4-win-x64\node.EXE.
Thanks a ton, uninformative build system.
Reporter | ||
Comment 7•6 years ago
|
||
doesn't look like there's anything interesting in there
don't have time at the moment to start print debugging the build system (no idea where to even start).
Reporter | ||
Comment 8•6 years ago
|
||
Just for completeness sake, this is the test mozconfig I got that log with. Nothing really interesting, though.
Reporter | ||
Comment 9•6 years ago
|
||
Good News, I got it to work!
For unrelated reasons, I had to update MozillaBuild. After following exactly the steps listed here: https://wiki.mozilla.org/MozillaBuild
export MOZBUILD_STATE_PATH
now works!
I believe bootstrap still never reads mozconfigs, though, correct?
Comment 10•6 years ago
|
||
The priority flag is not set for this bug.
:kmoir, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•6 years ago
|
Updated•5 years ago
|
Description
•