Bug 235666

Summary: www/firefox fails to build with python-3.6
Product: Ports & Packages Reporter: Mikhail Teterin <mi>
Component: Individual Port(s)Assignee: Walter Schwarzenfeld <w.schwarzenfeld>
Status: Closed Feedback Timeout    
Severity: Affects Only Me CC: w.schwarzenfeld
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Failure-log none

Description Mikhail Teterin freebsd_committer freebsd_triage 2019-02-11 12:47:24 UTC
If I remove python=3.6 from the list of DEFAULTs, build proceeds. Otherwise, it dies at the very beginning with:

===>  Configuring for firefox-65.0_2,1
(cd /home/usr/ports/www/firefox/work/firefox-65.0 && /opt/bin/autoconf-2.13)
(cd /home/usr/ports/www/firefox/work/firefox-65.0/js/src/ && /opt/bin/autoconf-2.13)
Creating Python environment
Using base prefix '/opt'
New python executable in /home/usr/ports/www/firefox/work/.build/_virtualenvs/init/bin/python3.6
Not overwriting existing python script /home/usr/ports/www/firefox/work/.build/_virtualenvs/init/bin/python (you must use /home/usr/ports/www/firefox/work/.build/_virtualenvs/init/bin/python3.6)
Installing setuptools, pip, wheel...done.
RuntimeError: Bad magic number in .pyc file
Traceback (most recent call last):
  File "/home/usr/ports/www/firefox/work/firefox-65.0/configure.py", line 123, in <module>
    sys.exit(main(sys.argv))
  File "/home/usr/ports/www/firefox/work/firefox-65.0/configure.py", line 29, in main
    sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 424, in run
    self.include_file(path)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 415, in include_file
    exec_(code, self)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/util.py", line 59, in exec_
    exec(object, globals, locals)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/moz.configure", line 7, in <module>
    include('build/moz.configure/init.configure')
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 719, in include_impl
    self.include_file(what)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 415, in include_file
    exec_(code, self)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/util.py", line 59, in exec_
    exec(object, globals, locals)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/build/moz.configure/init.configure", line 208, in <module>
    @imports('distutils.sysconfig')
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 702, in decorator
    depends = DependsFunction(self, func, dependencies, when=when)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 121, in __init__
    sandbox._value_for(self)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 499, in _value_for
    return self._value_for_depends(obj, need_help_dependency)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/util.py", line 944, in method_call
    cache[args] = self.func(instance, *args)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 508, in _value_for_depends
    return obj.result(need_help_dependency)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/util.py", line 944, in method_call
    cache[args] = self.func(instance, *args)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 148, in result
    return self._func(*resolved_args)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/configure/__init__.py", line 1028, in wrapped
    return new_func(*args, **kwargs)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/build/moz.configure/init.configure", line 263, in virtualenv_python
    manager.build(python)
  File "/home/usr/ports/www/firefox/work/firefox-65.0/python/mozbuild/mozbuild/virtualenv.py", line 484, in build
    raise Exception('Error populating virtualenv.')
Exception: Error populating virtualenv.
===>  Script "configure" failed unexpectedly.
Please report the problem to gecko@FreeBSD.org [maintainer] and attach the
"/home/usr/ports/www/firefox/work/.build/config.log" including the output of
the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/opt/sbin/pkg-static info -g -Ea).
*** Error code 1
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-02-11 16:56:20 UTC
Provide more details. I can't reproduce: https://ptpb.pw/L8hL

(In reply to Mikhail Teterin from comment #0)
> remove python=3.6 from the list of DEFAULTs

Changing default python version without rebuilding all consumers is not supported.
https://lists.freebsd.org/pipermail/freebsd-ports/2019-January/115367.html
Comment 2 Mikhail Teterin freebsd_committer freebsd_triage 2019-02-12 04:19:30 UTC
Created attachment 201946 [details]
Failure-log

(In reply to Jan Beich from comment #1)
> Provide more details.

Attaching the log demonstrating the failure.

> I can't reproduce: https://ptpb.pw/L8hL

The log at the above link uses Python-2.7.

> Changing default python version without rebuilding all consumers is not
supported.

Which consumer should I have rebuilt? This is a new machine and I had python=3.6 set on it from the beginning. Some ports required 2.7 so I ended up with both versions.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-02-12 12:07:26 UTC
(In reply to Mikhail Teterin from comment #2)
> root@tulik:/usr/ports/www/firefox # make -V PYTHON_VERSION
> python3.6

USES=python:2.7,build in Mk/bsd.gecko.mk should force python2.7 even with DEFAULT_VERSIONS+=python=3.6. www/firefox requires both python2.7 *and* python3.6 (other 3.x may also work) but configure (mach) only supports python2.7 atm.

Sorry but the provided log is not enough. Try reproducing in poudriere and if you cannot bisect your environment.
Comment 4 Walter Schwarzenfeld freebsd_triage 2019-08-08 02:04:03 UTC
We have firefox version 68.0.1. Builds fine with python3.6. Additional (Reporter) feedback timeout.

I close here. If there are still problem, please, reopen.