Closed
Bug 891058
Opened 13 years ago
Closed 8 months ago
check-sync-dirs.py breaks cause of python3 leaking into the build system
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: cork, Unassigned)
Details
On a system with python3 as the default python, you can since a few weeks back no longer build with with "python2 mach build".
log:
0:00.07 /usr/bin/make -f client.mk -s
0:00.21 Adding client.mk options from /home/cork/mozilla-central/.mozconfig:
0:00.21 MOZ_MAKE_FLAGS=-j9
0:00.21 MOZ_PGO=1
0:00.21 PROFILE_GEN_SCRIPT=$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py 10
0:00.25 Traceback (most recent call last):
0:00.25 File "/home/cork/mozilla-central/js/src/config/check-sync-dirs.py", line 97, in <module>
0:00.25 check(copy, original)
0:00.25 File "/home/cork/mozilla-central/js/src/config/check-sync-dirs.py", line 68, in check
0:00.25 exceptions = read_exceptions(join(dirpath, 'check-sync-exceptions'))
0:00.25 File "/home/cork/mozilla-central/js/src/config/check-sync-dirs.py", line 41, in read_exceptions
0:00.25 f = file(filename)
0:00.25 NameError: global name 'file' is not defined
0:00.25 make[2]: *** [/home/cork/mozilla-central/configure] Error 1
0:00.25 make[1]: *** [profiledbuild] Error 2
0:00.25 make: *** [build] Error 2
0:00.29 0 compiler warnings present.
Temporary workaround:
mkdir ~/legacy-bin
ln -s /usr/bin/python2 ~/legacy-bin/python
export PATH=~/legacy-bin:$PATH
python2 mach build
IRC:
[13:27:09] <ted> that's...interesting
[13:27:37] <ted> does sound like a python 3 vs. 2 issue
[13:29:07] <ted> if you have a python 2 installed you can try
[13:29:11] <Cork> so we're hardcoding "python" somewhere again?
[13:29:18] <ted> PYTHON=/path/to/python2 make -f client.mk
[13:29:24] <ted> http://mxr.mozilla.org/mozilla-central/source/client.mk#74
[13:29:34] <Cork> will do
[13:29:38] <ted> http://mxr.mozilla.org/mozilla-central/source/client.mk#281
[13:29:44] <ted> file a bug on this?
Comment 1•13 years ago
|
||
Not sure what would have broken this recently, check-sync-dirs.py certainly hasn't changed. The root cause is that we just do PYTHON?=python in client.mk, so if `which python` is python 3, we'll break.
Presumably mach could be passing down PYTHON=sys.executable when invoking make -f client.mk?
Comment 2•13 years ago
|
||
Yes, we should probably pass PYTHON into client.mk from mach.
Updated•8 years ago
|
Product: Core → Firefox Build System
Updated•4 years ago
|
Severity: normal → S3
Comment 3•8 months ago
|
||
check-sync-dirs.py no longer exists.
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•