Closed
Bug 1420991
Opened 7 years ago
Closed 7 years ago
Cannot build on Windows: cannot import name _remove_dead_weakref
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1415374
People
(Reporter: tjr, Unassigned)
Details
This might be complicated.
I had an old c:/mozilla-build and c:/mozilla-central. I have cygwin64 installed. I hg strip-ed and updated central, and deleted everything in -build then reran the latest MozillaBuild.
Run start-shell.bat
Run ./mach configure. Got two errors:
> $ ./mach configure
> 0:00.69 Clobber not needed.
> 0:00.70 Adding make options from c:\mozilla-central\.mozconfig
> MOZ_OBJDIR=c:/mozilla-central/obj-i686-pc-mingw32
> OBJDIR=c:/mozilla-central/obj-i686-pc-mingw32
> FOUND_MOZCONFIG=c:/mozilla-central/.mozconfig
> export FOUND_MOZCONFIG
> 0:00.74 c:\mozilla-build\mozmake\mozmake.EXE -f client.mk -s configure
> 0:00.83 Generating c:/mozilla-central/configure
> 0:00.87 Generating c:/mozilla-central/js/src/configure
> 0:00.90 cd c:/mozilla-central/obj-i686-pc-mingw32
> 0:00.92 c:/mozilla-central/configure
> 0:01.25 Creating Python environment
> 0:09.63 New python executable in c:\mozilla-central\obj-i686-pc-mingw32\_virtualenv\Scripts\python2.7.exe
> 0:09.63 Also creating executable in c:\mozilla-central\obj-i686-pc-mingw32\_virtualenv\Scripts\python.exe
> 0:09.63 Installing setuptools, pip, wheel...done.
> 0:10.12 running build_ext
> 0:10.12
> 0:10.12 building 'psutil._psutil_windows' extension
> 0:10.12
> 0:10.12 error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
> 0:10.12
> 0:10.12
> 0:10.12 Error processing command. Ignoring because optional. (optional:setup.py:third_party/python/psutil:build_ext:--inplace)
> 0:10.12 Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
> 0:10.12 c:\mozilla-central\python\mozbuild\mozbuild\virtualenv.py:376: UserWarning: Hacking environment to allow binary Python extensions to build. You can make this warning go away by installing Visual Studio 2008. You can download the Express Edition installer from http://go.microsoft.com/?linkid=7729279
> 0:10.12 warnings.warn('Hacking environment to allow binary Python '
> 0:10.12 Reexecuting in the virtualenv
> 0:10.37 Adding configure options from c:\mozilla-central\.mozconfig
> 0:10.37 checking for vcs source checkout... hg
> 0:10.53 checking for a shell... C:/mozilla-build/msys/bin/sh.exe
> 0:10.88 checking for host system type... i686-pc-mingw32
> 0:10.88 checking for target system type... i686-pc-mingw32
> 0:10.91 checking for a shell... C:/mozilla-build/msys/bin/sh.exe
> 0:11.24 checking for host system type... i686-pc-mingw32
> 0:11.24 checking for target system type... i686-pc-mingw32
> 0:11.26 checking for vcs source checkout... hg
> 0:11.26 checking whether cross compiling... no
> 0:11.30 checking for the target C compiler... 'C:/PROGRA~2/MICROS~2.0/VC/bin/AMD64_~2/cl.exe'
> 0:11.38 checking whether the target C compiler can be used... yes
> 0:11.41 checking for Python 3... c:\mozilla-build\python3\python3.EXE (3.6.3)
> 0:11.41 checking for hg... c:/mozilla-build/python/Scripts/hg.exe
> 0:11.60 checking for Mercurial version...
> 0:11.60 DEBUG: <truncated - see config.log for full output>
> 0:11.60 DEBUG: | self._load()
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> 0:11.60 DEBUG: | mod = _hgextimport(_origimport, head, globals, locals, None, level)
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> 0:11.60 DEBUG: | return importfunc(name, globals, *args, **kwargs)
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\mercurial\win32.py", line 22, in <module>
> 0:11.60 DEBUG: | _kernel32 = ctypes.windll.kernel32
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 145, in __getattr__
> 0:11.60 DEBUG: | self._load()
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> 0:11.60 DEBUG: | mod = _hgextimport(_origimport, head, globals, locals, None, level)
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> 0:11.60 DEBUG: | return importfunc(name, globals, *args, **kwargs)
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\lib\ctypes\__init__.py", line 7, in <module>
> 0:11.60 DEBUG: | from _ctypes import Union, Structure, Array
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 268, in _demandimport
> 0:11.60 DEBUG: | mod = _hgextimport(_origimport, name, globals, locals)
> 0:11.60 DEBUG: | File "c:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> 0:11.60 DEBUG: | return importfunc(name, globals, *args, **kwargs)
> 0:11.60 DEBUG: | ImportError: DLL load failed: The specified procedure could not be found.
> 0:11.60 ERROR: Command `c:/mozilla-build/python/Scripts/hg.exe --version` failed with exit status 1.
> 0:11.63 *** Fix above errors and then restart with\
> 0:11.63 "c:/mozilla-build/mozmake/mozmake.EXE -f client.mk build"
> 0:11.64 mozmake.EXE: *** [client.mk:149: configure] Error 1>
that link to vcpython27 is broken, but I found and installed the python headers and that error went away. The other remained.
> $ which hg
> /c/mozilla-build/python/Scripts/hg
> $ hg --version
> Mercurial Distributed SCM (version 4.4.1)
> (see https://mercurial-scm.org for more information)
>
> Copyright (C) 2005-2017 Matt Mackall and others
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Strange, right? I run from a command prompt:
> C:\Users\Tom>C:\mozilla-build\python\Scripts\hg.exe
> Traceback (most recent call last):
> File "C:\mozilla-build\python\Scripts\hg", line 41, in <module>
> dispatch.run()
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 145, in __getattr__
> self._load()
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> mod = _hgextimport(_origimport, head, globals, locals, None, level)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File "C:\mozilla-build\python\Lib\site-packages\mercurial\dispatch.py", line 536, in <module>
> class lazyaliasentry(object):
> File "C:\mozilla-build\python\Lib\site-packages\mercurial\dispatch.py", line 545, in lazyaliasentry
> @util.propertycache
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 145, in __getattr__
> self._load()
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> mod = _hgextimport(_origimport, head, globals, locals, None, level)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File "C:\mozilla-build\python\Lib\site-packages\mercurial\util.py", line 97, in <module>
> stdout = platform.winstdout(stdout)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 145, in __getattr__
> self._load()
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> mod = _hgextimport(_origimport, head, globals, locals, None, level)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File "C:\mozilla-build\python\Lib\site-packages\mercurial\windows.py", line 34, in <module>
> executablepath = win32.executablepath
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 145, in __getattr__
> self._load()
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> mod = _hgextimport(_origimport, head, globals, locals, None, level)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File "C:\mozilla-build\python\Lib\site-packages\mercurial\win32.py", line 22, in <module>
> _kernel32 = ctypes.windll.kernel32
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 145, in __getattr__
> self._load()
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 90, in _load
> mod = _hgextimport(_origimport, head, globals, locals, None, level)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> File "C:\mozilla-build\python\lib\ctypes\__init__.py", line 7, in <module>
> from _ctypes import Union, Structure, Array
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 268, in _demandimport
> mod = _hgextimport(_origimport, name, globals, locals)
> File "C:\mozilla-build\python\Lib\site-packages\hgdemandimport\demandimportpy2.py", line 41, in _hgextimport
> return importfunc(name, globals, *args, **kwargs)
> ImportError: DLL load failed: The specified procedure could not be found.
>
> C:\Users\Tom>
Go back to the shell:
> $ ../mozilla-build/python/Scripts/hg.exe
> [Same DLL load failed error]
I find Bug 1185395 which gives me an idea:
> $ HGDEMANDIMPORT=disable ../mozilla-build/python/Scripts/hg.exe
> Traceback (most recent call last):
> File "c:\mozilla-build\python\Scripts\hg", line 40, in <module>
> from mercurial import dispatch
> File "c:\mozilla-build\python\Lib\site-packages\mercurial\dispatch.py", line 22, in <module>
> from .i18n import _
> File "c:\mozilla-build\python\Lib\site-packages\mercurial\i18n.py", line 10, in <module>
> import gettext as gettextmod
> File "c:\mozilla-build\python\lib\gettext.py", line 49, in <module>
> import locale, copy, os, re, struct, sys
> File "c:\mozilla-build\python\lib\copy.py", line 52, in <module>
> import weakref
> File "c:\mozilla-build\python\lib\weakref.py", line 14, in <module>
> from _weakref import (
> ImportError: cannot import name _remove_dead_weakref
Reporter | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•