I'm having trouble while building

1,029 views
Skip to first unread message

apap04

unread,
Mar 30, 2019, 10:41:10 PM3/30/19
to Chromium-dev
Whenever I run `autoninja -C out\Default chrome` I get this error:
```
ninja: Entering directory `out\Default'
[3/39017] COPY ../../chrome/app/FirstRun "First Run"
FAILED: First Run
C:/Python27/python.exe ../../build/toolchain/win/tool_wrapper.py recursive-mirror ../../chrome/app/FirstRun "First Run"
Traceback (most recent call last):
File "../../build/toolchain/win/tool_wrapper.py", line 31, in <module>
import win32file # pylint: disable=import-error
ImportError: No module named win32file
[4/39017] RC obj/chrome/chrome_exe_version/chrome_exe_version.res
FAILED: obj/chrome/chrome_exe_version/chrome_exe_version.res
C:/Python27/python.exe ../../build/toolchain/win/tool_wrapper.py rc-wrapper environment.x64 rc.exe /nologo -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD "-DCR_CLANG_REVISION=\"356356-3\"" -D_HAS_NODISCARD -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_NO_AUTO_LINK -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000003 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_HAS_ITERATOR_DEBUGGING=0 -I../.. -Igen /foobj/chrome/chrome_exe_version/chrome_exe_version.res gen/chrome/chrome_exe_version.rc
Traceback (most recent call last):
File "../../build/toolchain/win/tool_wrapper.py", line 31, in <module>
import win32file # pylint: disable=import-error
ImportError: No module named win32file
[12/39017] CXX obj/chrome/file_pre_reader/file_pre_reader_win.obj
ninja: build stopped: subcommand failed.```

Daniel Bratell

unread,
Mar 31, 2019, 5:38:43 AM3/31/19
to Chromium-dev, apap04
There might be different solutions here, but what strikes me is that
you're using your own python instead of the one in depot_tools. If you
change your paths so that depot_tools takes precedence, I think that might
help.

/Daniel
--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

apap04

unread,
Apr 3, 2019, 8:13:42 AM4/3/19
to Chromium-dev
It works now. Thanks!

Pavel Seleznev

unread,
Dec 26, 2019, 7:35:10 AM12/26/19
to Chromium-dev, apa...@gmail.com, bra...@opera.com
Hello,

I have the same error with python from depot_tools, can you advice me?

\src>ninja -C out/Default chrome
ninja: Entering directory `out/Default'
[56/48809] COPY ../../chrome/app/FirstRun "First Run"
FAILED: First Run
G:/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py recursive-mirror ../../

chrome/app/FirstRun "First Run"
Traceback (most recent call last):
  File "../../build/toolchain/win/tool_wrapper.py", line 51, in <module>

    import win32file    # pylint: disable=import-error
ImportError: No module named win32file
[84/48809] CXX obj/buildtools/third_party/libc++/libc++/thread.obj



воскресенье, 31 марта 2019 г., 12:38:43 UTC+3 пользователь Daniel Bratell написал:

Daniel Bratell

unread,
Dec 26, 2019, 8:45:34 AM12/26/19
to pavel.s...@gmail.com, Chromium-dev, apa...@gmail.com, bra...@opera.com

win32 file is a custom python module and I'd expect it to be included in the bundled python. Typically my guess would be that you were using your own python instead of the one bundled in depot_tools, but it looks like you are using the depot_tools python.

So I don't really know what is going wrong.

You can try checking if your depot_tools is up-to-date. It should self-update every time you run gclient, but sometimes it gets stuck.

Or maybe regenerate the build files (gn gen out/Default) if something in the environment has changed that the self-regenerator did not notice.

But I don't really know what is wrong. I hope you can figure it out or that someone else knows.

/Daniel

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/afc45c10-ff13-480c-a51e-5dd3de3d3f6e%40chromium.org.

PhistucK

unread,
Dec 26, 2019, 10:10:45 AM12/26/19
to pavel.s...@gmail.com, Chromium-dev, apa...@gmail.com, Daniel Bratell
Are your depot_tools folder and your Chromium source folder on the same drive?
If not, maybe that is it.

PhistucK


--

Jeffrey Gilbert

unread,
Dec 29, 2019, 9:00:36 PM12/29/19
to Chromium-dev, pavel.s...@gmail.com, apa...@gmail.com, bra...@opera.com, Jamie Madill
I am also getting this while trying to build ANGLE.

One recent cset which jumped out at me was this one that mentions `pip install pywin32`, which is the package that win32file is in:

depot_tools is the first thing in my path, and this is all on the same drive. I have gclient sync'd and gn gen'd, but ninja -C is failing me.

C:\dev\angle>ninja -C out
ninja: Entering directory `out'
[4/2210] COPY ../samples/multi_texture/basemap.tga basemap.tga
FAILED: basemap.tga
C:/dev/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe ../build/toolchain/win/tool_wrapper.py recursive-mirror ../samples/multi_texture/basemap.tga basemap.tga

Traceback (most recent call last):
  File "../build/toolchain/win/tool_wrapper.py", line 31, in <module>

    import win32file    # pylint: disable=import-error
ImportError: No module named win32file


C:\dev\depot_tools>python -c "import sys; print 'sys.ex: ' + sys.executable"
sys.ex: C:\dev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\python.exe

C:\dev\depot_tools>python -m pip list
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package    Version
---------- -------
pip        19.3.1
setuptools 42.0.2
wheel      0.33.6


It seems like I should just pip install pywin32 manually, but this was working automatically before! This win32file usage was added in Feb2018, so that's not new.


On Thursday, December 26, 2019 at 7:10:45 AM UTC-8, PhistucK wrote:
Are your depot_tools folder and your Chromium source folder on the same drive?
If not, maybe that is it.

PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to chromi...@chromium.org.

Bruce Dawson

unread,
Dec 30, 2019, 2:04:42 PM12/30/19
to Chromium-dev, pavel.s...@gmail.com, apa...@gmail.com, bra...@opera.com, jma...@chromium.org
This is crbug.com/1033106.

I'm not an expert, but the gist of it is that python in depot_tools is not supposed to have pywin32 installed in it. Python was recently upgraded and that caused pywin32 to go away (it's not 100% clear why everybody had it installed previously). So, the current behavior is working-as-intended.

You can install pywin32 as a temporary fix but you will then have a non-standard depot_tools and it will break again the next time we upgrade python.

Scripts that require pywin32 are supposed to use vpython with the appropriate annotations to indicate that they need pywin32.

For this specific issue, maybe pull your repo forward to make sure you have any recently landed fixes. If that doesn't work then we'll need to fix the specific script that is failing for you. See the bug for some example fixes.
Reply all
Reply to author
Forward
0 new messages