Skip to content

Commit 92eee5b

Browse files
shr-projectotavio
authored andcommitted
firefox: layer.conf: add python and python2.7 to HOSTTOOLS
* pythonnative still doesn't seem to work and the migration to python3 seems far from complete (and might never be backported to ESR version), see: https://bugzilla.mozilla.org/show_bug.cgi?id=1598839 https://bugzilla.mozilla.org/show_bug.cgi?id=1473498 * even with pythonnative inherit and dependency on both python and python-native it tries to use target python in virtualenv and fails DEBUG: Executing shell function do_configure 0:01.20 Clobber not needed. 0:01.21 Adding make options from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/mozconfig MOZ_OBJDIR=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir OBJDIR=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir FOUND_MOZCONFIG=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/mozconfig export FOUND_MOZCONFIG 0:01.25 /OE/build/oe-core/tmp-glibc/hosttools/make -f client.mk -s configure 0:01.29 cd /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir 0:01.31 /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/configure 0:01.66 Creating Python environment 0:01.82 /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory 0:01.82 New python executable in /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init/bin/python 0:01.82 ERROR: The executable /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init/bin/python is not functioning 0:01.82 ERROR: It thinks sys.prefix is u'/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir' (should be u'/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init') 0:01.82 ERROR: virtualenv is not compatible with this system or executable 0:01.82 Traceback (most recent call last): 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/configure.py", line 132, in <module> 0:01.82 sys.exit(main(sys.argv)) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/configure.py", line 38, in main 0:01.82 sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 431, in run 0:01.82 self.include_file(path) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 422, in include_file 0:01.82 exec_(code, self) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 59, in exec_ 0:01.82 exec(object, globals, locals) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/moz.configure", line 7, in <module> 0:01.82 include('build/moz.configure/init.configure') 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 745, in include_impl 0:01.82 self.include_file(what) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 422, in include_file 0:01.82 exec_(code, self) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 59, in exec_ 0:01.82 exec(object, globals, locals) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/build/moz.configure/init.configure", line 212, in <module> 0:01.82 @imports('distutils.sysconfig') 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 728, in decorator 0:01.82 depends = DependsFunction(self, func, dependencies, when=when) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 125, in __init__ 0:01.82 sandbox._value_for(self) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 525, in _value_for 0:01.82 return self._value_for_depends(obj) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 947, in method_call 0:01.82 cache[args] = self.func(instance, *args) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 534, in _value_for_depends 0:01.82 value = obj.result() 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 947, in method_call 0:01.82 cache[args] = self.func(instance, *args) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 151, in result 0:01.82 return self._func(*resolved_args) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 1097, in wrapped 0:01.82 return new_func(*args, **kwargs) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/build/moz.configure/init.configure", line 261, in virtualenv_python 0:01.82 manager.build(python) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/virtualenv.py", line 473, in build 0:01.82 self.create(python) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/virtualenv.py", line 212, in create 0:01.82 'Failed to create virtualenv: %s' % self.virtualenv_root) 0:01.82 Exception: Failed to create virtualenv: /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init 0:01.84 *** Fix above errors and then restart with\ 0:01.84 "./mach build" 0:01.84 make: *** [client.mk:115: configure] Error 1 WARNING: exit code 2 from a shell command. ERROR: Execution of '/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/temp/run.do_configure.1558246' failed with exit code 2: 0:01.20 Clobber not needed. 0:01.21 Adding make options from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/mozconfig MOZ_OBJDIR=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir OBJDIR=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir FOUND_MOZCONFIG=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/mozconfig export FOUND_MOZCONFIG 0:01.25 /OE/build/oe-core/tmp-glibc/hosttools/make -f client.mk -s configure 0:01.29 cd /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir 0:01.31 /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/configure 0:01.66 Creating Python environment 0:01.82 /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory 0:01.82 New python executable in /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init/bin/python 0:01.82 ERROR: The executable /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init/bin/python is not functioning 0:01.82 ERROR: It thinks sys.prefix is u'/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir' (should be u'/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init') 0:01.82 ERROR: virtualenv is not compatible with this system or executable 0:01.82 Traceback (most recent call last): 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/configure.py", line 132, in <module> 0:01.82 sys.exit(main(sys.argv)) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/configure.py", line 38, in main 0:01.82 sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 431, in run 0:01.82 self.include_file(path) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 422, in include_file 0:01.82 exec_(code, self) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 59, in exec_ 0:01.82 exec(object, globals, locals) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/moz.configure", line 7, in <module> 0:01.82 include('build/moz.configure/init.configure') 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 745, in include_impl 0:01.82 self.include_file(what) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 422, in include_file 0:01.82 exec_(code, self) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 59, in exec_ 0:01.82 exec(object, globals, locals) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/build/moz.configure/init.configure", line 212, in <module> 0:01.82 @imports('distutils.sysconfig') 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 728, in decorator 0:01.82 depends = DependsFunction(self, func, dependencies, when=when) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 125, in __init__ 0:01.82 sandbox._value_for(self) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 525, in _value_for 0:01.82 return self._value_for_depends(obj) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 947, in method_call 0:01.82 cache[args] = self.func(instance, *args) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 534, in _value_for_depends 0:01.82 value = obj.result() 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/util.py", line 947, in method_call 0:01.82 cache[args] = self.func(instance, *args) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 151, in result 0:01.82 return self._func(*resolved_args) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/configure/__init__.py", line 1097, in wrapped 0:01.82 return new_func(*args, **kwargs) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/build/moz.configure/init.configure", line 261, in virtualenv_python 0:01.82 manager.build(python) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/virtualenv.py", line 473, in build 0:01.82 self.create(python) 0:01.82 File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/python/mozbuild/mozbuild/virtualenv.py", line 212, in create 0:01.82 'Failed to create virtualenv: %s' % self.virtualenv_root) 0:01.82 Exception: Failed to create virtualenv: /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.0esr-r0/firefox-68.0/firefox-build-dir/_virtualenvs/init 0:01.84 *** Fix above errors and then restart with\ 0:01.84 "./mach build" 0:01.84 make: *** [client.mk:115: configure] Error 1 WARNING: exit code 2 from a shell command. * lets use HOSTTOOLS for now, until someone steps-up as a new maintainer and upgrades firefox to some newer version (like 78 ESR or even newer). Now when it's separate layer used only by people who really need firefox it's less dangerous (as HOSTTOOLS are unfortunately global) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
1 parent b39bc71 commit 92eee5b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

meta-firefox/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ This layer depends on:
2727
- branch: master
2828
- revision: HEAD
2929

30+
* python2.7 and python on host for HOSTTOOLS
31+
- e.g. on newer ubuntu which doesn't install python2 at all by default
32+
you need to install python-is-python2 (which will pull python2-minimal/python2.7-minimal)
33+
3034
Contributing
3135
------------
3236

meta-firefox/conf/layer.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ BBPATH .= ":${LAYERDIR}"
44
# We have a recipes directory, add to BBFILES
55
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
66

7+
# this is only temporary to allow building firefox on hosts without any python2
8+
# were it would fail like this:
9+
# ERROR: firefox-68.9.0esr-r0 do_configure: Execution of '/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/firefox/68.9.0esr-r0/temp/run.do_configure.2697230' failed with exit code 127:
10+
# ./mach: 9: exec: python: not found
11+
# this should be removed when firefox is upgraded to 78 ESR or newer which contains:
12+
# https://bugzilla.mozilla.org/show_bug.cgi?id=1473498
13+
HOSTTOOLS += "python python2.7"
14+
715
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
816
firefox-addon-webconverger \
917
firefox-l10n-ach \

0 commit comments

Comments
 (0)