Bootstrapping on macOS causes HTTP Error 403 in unpack-sdk
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Tracking
(Not tracked)
People
(Reporter: tschuster, Unassigned)
References
(Blocks 1 open bug)
Details
When trying to run bootstrap or ./mach build I get the following error on a newly setup macOS machine:
0:00.81 Using Python 3.9.6 from /Users/mozilla/mozilla-unified/obj-aarch64-apple-darwin22.4.0/_virtualenvs/build/bin/python
0:00.81 checking for vcs source checkout... hg
0:00.84 checking for a shell... /bin/sh
0:00.85 checking for host system type... aarch64-apple-darwin22.4.0
0:00.85 checking for target system type... aarch64-apple-darwin22.4.0
0:01.05 checking whether cross compiling... no
0:01.12 checking for Python 3... /Users/mozilla/mozilla-unified/obj-aarch64-apple-darwin22.4.0/_virtualenvs/build/bin/python (3.9.6)
0:01.12 checking for hg... /Users/mozilla/Library/Python/3.9/bin/hg
0:01.21 checking for Mercurial version... 6.1.4
0:01.33 checking for sparse checkout... no
0:02.94 checking for wget... not found
0:02.94 Installing bootstrapped toolchain in /Users/mozilla/.mozbuild/MacOSX13.0.sdk
0:04.76 Traceback (most recent call last):
0:04.76 File "/Users/mozilla/mozilla-unified/taskcluster/scripts/misc/unpack-sdk.py", line 63, in <module>
0:04.76 unpack_sdk(*sys.argv[1:])
0:04.76 File "/Users/mozilla/mozilla-unified/taskcluster/scripts/misc/unpack-sdk.py", line 19, in unpack_sdk
0:04.76 with urlopen(url) as fh:
0:04.76 File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
0:04.76 return opener.open(url, data, timeout)
0:04.76 File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
0:04.76 response = meth(req, response)
0:04.76 File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
0:04.76 response = self.parent.error(
0:04.76 File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
0:04.76 return self._call_chain(*args)
0:04.76 File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
0:04.76 result = func(*args)
0:04.76 File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
0:04.76 raise HTTPError(req.full_url, code, msg, hdrs, fp)
0:04.76 urllib.error.HTTPError: HTTP Error 403: Forbidden
0:04.83 ERROR: Command '['/Users/mozilla/mozilla-unified/obj-aarch64-apple-darwin22.4.0/_virtualenvs/build/bin/python', '/Users/mozilla/mozilla-unified/mach', '--log-no-times', 'python', '--virtualenv', 'build', '/Users/mozilla/mozilla-unified/taskcluster/scripts/misc/unpack-sdk.py', 'https://swdist.apple.com/content/downloads/38/50/012-70652-A_2ZHIRHCHLN/f8b81s6tzlzrj0z67ynydjx4x1lwhr08ab/CLTools_macOSNMOS_SDK.pkg', 'XXXXXXXXremovedXXXX', 'Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk', 'MacOSX13.0.sdk']' returned non-zero exit status 1.
0:04.83 ERROR: If you can't fix the above, retry with --disable-bootstrap.
*** Fix above errors and then restart with "./mach build"
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Can you still consistently reproduce this? I'm assuming a 403 error was temporarily on Apple's end. I can download https://swdist.apple.com/content/downloads/38/50/012-70652-A_2ZHIRHCHLN/f8b81s6tzlzrj0z67ynydjx4x1lwhr08ab/CLTools_macOSNMOS_SDK.pkg just fine, can you confirm that you still cannot?
Updated•2 years ago
|
Comment 3•2 years ago
|
||
I'm still seeing this with latest mozilla-central:
0:03.08 Installing bootstrapped toolchain in /Users/jamie/.mozbuild/MacOSX13.0.sdk
0:04.61 Traceback (most recent call last):
0:04.61 File "/Users/jamie/src/gecko/taskcluster/scripts/misc/unpack-sdk.py", line 63, in <module>
0:04.61 unpack_sdk(*sys.argv[1:])
0:04.61 File "/Users/jamie/src/gecko/taskcluster/scripts/misc/unpack-sdk.py", line 19, in unpack_sdk
0:04.61 with urlopen(url) as fh:
0:04.61 File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
0:04.61 return opener.open(url, data, timeout)
0:04.61 File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
0:04.61 response = meth(req, response)
0:04.61 File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
0:04.61 response = self.parent.error(
0:04.61 File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
0:04.61 return self._call_chain(*args)
0:04.61 File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
0:04.61 result = func(*args)
0:04.61 File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
0:04.61 raise HTTPError(req.full_url, code, msg, hdrs, fp)
0:04.61 urllib.error.HTTPError: HTTP Error 403: Forbidden
0:04.66 ERROR: Command '['/Users/jamie/src/gecko/obj/_virtualenvs/build/bin/python', '/Users/jamie/src/gecko/mach', '--log-no-times', 'python', '--virtualenv', 'build', '/Users/jamie/src/gecko/taskclus
ter/scripts/misc/unpack-sdk.py', 'https://swcdn.apple.com/content/downloads/38/50/012-70652-A_2ZHIRHCHLN/f8b81s6tzlzrj0z67ynydjx4x1lwhr08ab/CLTools_macOSNMOS_SDK.pkg', '06f4a045854c456a553a5ee6acf678fbe
26c06296fc68054ae918c206134aa20', 'Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk', 'MacOSX13.0.sdk']' returned non-zero exit status 1.
0:04.66 ERROR: If you can't fix the above, retry with --disable-bootstrap.
*** Fix above errors and then restart with "./mach build"
Comment 4•2 years ago
•
|
||
Can confirm this as well, issue still persists. No I was wrong, current central works.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Still seeing this today with latest central, so I don't think this is temporary.
Comment 6•2 years ago
|
||
Is it possible the download URLs need to be different in different regions? I'm in Australia.
Comment 7•2 years ago
|
||
For now, I'm working around this with this mozconfig line:
ac_add_options --with-macos-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk
Others on my team also seem to require this.
Comment 8•2 years ago
|
||
The workaround doesn't work either. I then get a bunch of compile errors like this:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk/usr/include/c++/v1/vector:852:7: error: call to '__throw_length_error' is ambiguous
Comment 9•2 years ago
|
||
Does this work for you on central? A fix landed in bug 1831491 to change the url to the cdn instead.
Comment 10•2 years ago
|
||
(In reply to James Teh [:Jamie] from comment #8)
The workaround doesn't work either. I then get a bunch of compile errors like this:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk/usr/include/c++/v1/vector:852:7: error: call to '__throw_length_error' is ambiguous
That's bug 1832708, but note that there's also bug 1832717.
Updated•2 years ago
|
Comment 11•2 years ago
|
||
(In reply to Alex Hochheiden [:ahochheiden] from comment #9)
Does this work for you on central? A fix landed in bug 1831491 to change the url to the cdn instead.
Comment 3 shows it's using the cdn :(
Comment 12•2 years ago
|
||
No, still not fixed with latest central, as per comment 11. :(
Description
•