Closed Bug 1569801 Opened 6 years ago Closed 6 years ago

Bootstrap fails on Windows due to long path name when extracting node

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

Desktop
Windows
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1490802

People

(Reporter: bryce, Unassigned)

Details

While bootstrapping a new machine the extraction of node step fails and kills the bootstrap due to long paths. I expect this is due to my fairly verbose name resulting in a long base path to my user directory and then node having rather verbose paths on top of that.

I think we're hamstrung by Python2 here, as to the best of my knowledge long path support is a Python 3.6+ feature.

Full output of the mach command below:

$ MOZCONFIG=.mozconfig-dbg-opt ./mach bootstrap
mach bootstrap is not fully implemented in MozillaBuild

Note on Artifact Mode:

Artifact builds download prebuilt C++ components rather than building
them locally. Artifact builds are faster!

Artifact builds are recommended for people working on Firefox or
Firefox for Android frontends, or the GeckoView Java API. They are unsuitable
for those working on C++ code. For more information see:
https://developer.mozilla.org/en-US/docs/Artifact_builds.

Please choose the version of Firefox you want to build:
  1. Firefox for Desktop Artifact Mode
  2. Firefox for Desktop
  3. GeckoView/Firefox for Android Artifact Mode
  4. GeckoView/Firefox for Android
Your choice: 2
Your version of Mercurial (5.0.2) is sufficiently modern.
Your version of Python (2.7.15) is new enough.
Your version of Rust (1.36.0) is new enough.
Rust supports i686-pc-windows-msvc, x86_64-pc-windows-msvc targets.

Mozilla recommends a number of changes to Mercurial to enhance your
experience with it.

Would you like to run a configuration wizard to ensure Mercurial is
optimally configured? (Yn): n
 0:05.08 Downloading node.tar.bz2
 0:05.09 Downloading to temporary location c:\Users\Bryce Seager Van Dyk\.mozbuild\toolchains\6300475b433579fd-node.tar.bz2
 0:05.09 Downloaded artifact to c:\Users\Bryce Seager Van Dyk\.mozbuild\toolchains\6300475b433579fd-node.tar.bz2
 0:05.19 rm tree: c:\Users\Bryce Seager Van Dyk\.mozbuild\node
 0:05.55 untarring "c:\Users\Bryce Seager Van Dyk\.mozbuild\node.tar.bz2"
Error running mach:

    ['artifact', 'toolchain', '--from-build', 'win64-node']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

WindowsError: [Error 206] The filename or extension is too long: '.\\node\\node_modules\\npm\\node_modules\\npm-profile\\node_modules\\make-fetch-happen\\node_modules\\socks-proxy-agent\\node_modules\\agent-base\\node_modules\\es6-promisify\\node_modules\\es6-promise\\lib\\es6-promise\\promise'

  File "c:\projects\mozilla\c\python/mozbuild/mozbuild/artifact_commands.py", line 432, in artifact_toolchain
    unpack_file(local)
  File "c:\projects\mozilla\c\python/mozbuild\mozbuild\action\tooltool.py", line 790, in unpack_file
    tar.extractall()
  File "c:\mozilla-build\python\lib\tarfile.py", line 2081, in extractall
    self.extract(tarinfo, path)
  File "c:\mozilla-build\python\lib\tarfile.py", line 2118, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "c:\mozilla-build\python\lib\tarfile.py", line 2196, in _extract_member
    self.makedir(tarinfo, targetpath)
  File "c:\mozilla-build\python\lib\tarfile.py", line 2224, in makedir
    os.mkdir(targetpath, 0700)
Error running mach:

    ['bootstrap']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

CalledProcessError: Command '['c:\\mozilla-build\\python\\python2.7.exe', u'c:\\projects\\mozilla\\c\\mach', u'artifact', u'toolchain', u'--from-build', u'win64-node']' returned non-zero exit status 1

  File "c:\projects\mozilla\c\python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
    bootstrapper.bootstrap()
  File "c:\projects\mozilla\c\python/mozboot\mozboot\bootstrap.py", line 497, in bootstrap
    checkout_root)
  File "c:\projects\mozilla\c\python/mozboot\mozboot\bootstrap.py", line 371, in maybe_install_private_packages_or_exit
    self.instance.ensure_node_packages(state_dir, checkout_root)
  File "c:\projects\mozilla\c\python/mozboot\mozboot\mozillabuild.py", line 125, in ensure_node_packages
    state_dir, checkout_root, node_artifact)
  File "c:\projects\mozilla\c\python/mozboot\mozboot\base.py", line 319, in install_toolchain_artifact
    subprocess.check_call(cmd, cwd=state_dir)
  File "c:\mozilla-build\python\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.