Virtualenv not working when trying to build Chromium 90

323 views
Skip to first unread message

Andrew Riachi

unread,
Dec 7, 2024, 11:39:19 AM12/7/24
to Chromium-dev
I am trying to build an old version of Chromium, version 90, to see what caused a bug that might be longstanding. I am running Ubuntu 16.04 in a Docker container. My chromium checkout is at commit 0e4295df240adea68aed05353be225aa97eb8b29. My depot_tools checkout is at commit a255e4064ae55e05e306aa595b12c047638e6b8c. Here is the command I run and its output:

andrew@e532b4cb0e5e:~/chromium/src$ DEPOT_TOOLS_UPDATE=0 gclient runhooks
[E2024-12-07T16:32:16.891026Z 45292 0 venv.go:994] Command (cwd=/tmp/vpython_bootstrap791279454/packages/virtualenv-16.7.10): [/home/andrew/depot_tools/boots...@3.11.8.chromium.35_bin/python3/bin/python3 -B -E -s virtualenv.py --no-download /home/andrew/.vpython-root/e48b7d]
Process output:
Could not find platform independent libraries <prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/home/andrew/.vpython-root/e48b7d/bin/python3'
  isolated = 0
  environment = 1
  user site = 0
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = '/work/out/lib/python3.11'
  sys._base_executable = '/home/andrew/.vpython-root/e48b7d/bin/python3'
  sys.base_prefix = '/work/out'
  sys.base_exec_prefix = '/home/andrew/.vpython-root/e48b7d'
  sys.platlibdir = 'lib'
  sys.executable = '/home/andrew/.vpython-root/e48b7d/bin/python3'
  sys.prefix = '/work/out'
  sys.exec_prefix = '/home/andrew/.vpython-root/e48b7d'
  sys.path = [
    '/work/out/lib/python311.zip',
    '/work/out/lib/python3.11',
    '/home/andrew/.vpython-root/e48b7d/lib/python3.11/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f67ee325780 (most recent call first):
  <no Python frame>
Using base prefix '/home/andrew/depot_tools/boots...@3.11.8.chromium.35_bin/python3'
New python executable in /home/andrew/.vpython-root/e48b7d/bin/python3
Also creating executable in /home/andrew/.vpython-root/e48b7d/bin/python
ERROR: The executable /home/andrew/.vpython-root/e48b7d/bin/python3 is not functioning
ERROR: It thinks sys.prefix is '/tmp/vpython_bootstrap791279454/packages/virtualenv-16.7.10' (should be '/home/andrew/.vpython-root/e48b7d')
ERROR: virtualenv is not compatible with this system or executable

Environment:
DEPOT_TOOLS_UPDATE=0
HOME=/tmp/vpython_bootstrap791279454
HOSTNAME=e532b4cb0e5e
LESSCLOSE=/usr/bin/lesspipe %s %s
LESSOPEN=| /usr/bin/lesspipe %s
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
PATH=/home/andrew/depot_tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/andrew/depot_tools
PIP_NO_BINARY=:none:
PIP_ONLY_BINARY=:all:
PWD=/home/andrew/chromium/src
PYTHONDONTWRITEBYTECODE=1
PYTHONNOUSERSITE=1
SHLVL=1
TERM=xterm
[E2024-12-07T16:32:16.894317Z 45292 0 annotate.go:273] original error: exit status 100

goroutine 1:
#0 go.chromium.org/luci/vpython/venv/venv.go:622 - venv.(*Env).installVirtualEnv()
  reason: failed to create VirtualEnv

#1 go.chromium.org/luci/vpython/venv/venv.go:536 - venv.(*Env).createLocked.func2()
  reason: failed to install VirtualEnv

#2 go.chromium.org/luci/common/system/filesystem/tempdir.go:55 - filesystem.(*TempDir).With()
#3 go.chromium.org/luci/vpython/venv/venv.go:103 - venv.withTempDir()
#4 go.chromium.org/luci/vpython/venv/venv.go:522 - venv.(*Env).createLocked()
#5 go.chromium.org/luci/vpython/venv/venv.go:279 - venv.(*Env).ensure.func1()
  reason: failed to create new VirtualEnv

#6 go.chromium.org/luci/vpython/venv/venv.go:1014 - venv.mustReleaseLock()
#7 go.chromium.org/luci/vpython/venv/venv.go:265 - venv.(*Env).ensure()
#8 go.chromium.org/luci/vpython/venv/venv.go:161 - venv.With()
  reason: failed to create empty probe environment

#9 go.chromium.org/luci/vpython/run.go:60 - vpython.Run()
#10 go.chromium.org/luci/vpython/application/application.go:327 - application.(*application).mainImpl()
#11 go.chromium.org/luci/vpython/application/application.go:416 - application.(*Config).Main.func1()
#12 go.chromium.org/luci/vpython/application/support.go:46 - application.run()
#13 go.chromium.org/luci/vpython/application/application.go:415 - application.(*Config).Main()
#14 vpython/main.go:112 - main.mainImpl()
#15 vpython/main.go:118 - main.main()
#16 runtime/proc.go:225 - runtime.main()
#17 runtime/asm_amd64.s:1371 - runtime.goexit()

Andrew Riachi

unread,
Dec 7, 2024, 11:49:12 AM12/7/24
to Chromium-dev, Andrew Riachi
I think perhaps the problem is that depot_tools is grabbing recent third-party dependencies when I need it to grab the versions of those dependencies from around the time of those commits. I don't know how to get it to do this, though.

Alexei Svitkine

unread,
Dec 7, 2024, 5:48:20 PM12/7/24
to andrew...@gmail.com, Chromium-dev
If the bug repros on a stock version of Chromium (i.e. as opposed to a fork you're working on), then I would suggest trying to use bisect-builds.py to find which CL it regressed with. This should be faster than doing your own builds, since it downloads prebuilt binaries.

--
--
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 visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/22dd8b64-1372-4912-95b2-a09e5c5da131n%40chromium.org.

Andrew Riachi

unread,
Jan 21, 2025, 4:57:09 PM1/21/25
to Chromium-dev, Alexei Svitkine, Chromium-dev, andrew...@gmail.com
Thank you for the reply. I tried this and I get the following error.

$ python3 tools/bisect-builds.py -a linux64 -g 48.0.2564.116 -b 131.0.6778.139 --verify-range
Traceback (most recent call last):
  File "/home/andrew/chromium/src/tools/bisect-builds.py", line 1345, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/andrew/chromium/src/tools/bisect-builds.py", line 1280, in main
    context.good_revision = GetRevision(context.good_revision)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andrew/chromium/src/tools/bisect-builds.py", line 1112, in GetRevision
    response = urllib.urlopen(OMAHA_REVISIONS_URL % revision_text)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

Is the version too old?

Andrew Riachi

unread,
Jan 21, 2025, 5:45:03 PM1/21/25
to Chromium-dev, Andrew Riachi, Alexei Svitkine, Chromium-dev
Whoops, I tried to run from an old checkout. Now the script works, but I don't have gconf because I'm on Ubuntu 24.04.
Reply all
Reply to author
Forward
0 new messages