Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 789021 - www-client/chromium: build failiure with PYTHONPATH set to python3 site-directory
Summary: www-client/chromium: build failiure with PYTHONPATH set to python3 site-direc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-09 08:09 UTC by Seong-ho Cho
Modified: 2021-05-10 20:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log of www-client/chromium-92.0.4496.0 (build.log.gz,120.79 KB, application/gzip)
2021-05-09 08:17 UTC, Seong-ho Cho
Details
emerge --info log 202105021747+0900 (same as current) (emerge_info.log,10.19 KB, text/x-log)
2021-05-09 08:18 UTC, Seong-ho Cho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seong-ho Cho 2021-05-09 08:09:45 UTC
pygments-2.9.0 only supports python3.
rolling back version of pygments would be a bad idea.
chromium should not be run python2 related code anymore.
because every python code will be changed to python2-incompatible code.

---------------build error log as below-------------------
python3.8 ../../build/util/python2_action.py ../../third_party/blink/renderer/bindings/scripts/generate_bindings.py --web_idl_database gen/third_party/blink/renderer/bindings/web_idl_database.pickle --root_src_dir ../../ --root_gen_dir gen --output_core_reldir third_party/blink/renderer/bindings/core/v8/ --output_modules_reldir third_party/blink/renderer/bindings/modules/v8/ enumeration callback_function callback_interface interface namespace typedef union
Traceback (most recent call last):
  File "../../third_party/blink/renderer/bindings/scripts/generate_bindings.py", line 12, in <module>
    import bind_gen
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/blink/renderer/bindings/scripts/bind_gen/__init__.py", line 36, in <module>
    from .callback_function import generate_callback_functions
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py", line 8, in <module>
    from .blink_v8_bridge import blink_class_name
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py", line 8, in <module>
    from .code_node import Likeliness
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py", line 13, in <module>
    from .mako_renderer import MakoRenderer
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py", line 7, in <module>
    import mako.runtime
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/mako/mako/runtime.py", line 14, in <module>
    from mako import exceptions
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/mako/mako/exceptions.py", line 305, in <module>
    _install_highlighting()
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/mako/mako/exceptions.py", line 300, in _install_highlighting
    _install_pygments()
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/mako/mako/exceptions.py", line 284, in _install_pygments
    from mako.ext.pygmentplugin import syntax_highlight  # noqa
  File "/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0/third_party/mako/mako/ext/pygmentplugin.py", line 8, in <module>
    from pygments.formatters.html import HtmlFormatter
  File "/usr/lib/python3.8/site-packages/pygments/formatters/html.py", line 626
    file=sys.stderr)
        ^
SyntaxError: invalid syntax
ninja: build stopped: subcommand failed.
 * ERROR: www-client/chromium-92.0.4496.0::gentoo failed (compile phase):
 *   ninja -v -j10 -l16 -C out/Release v8_context_snapshot_generator failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 4353:  Called eninja '-C' 'out/Release' 'v8_context_snapshot_generator'
 *   environment, line 2090:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 * 
 * If you need support, post the output of `emerge --info '=www-client/chromium-92.0.4496.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/chromium-92.0.4496.0::gentoo'`.
 * 
 * MemTotal:       24603508 kB
 * SwapTotal:      67637244 kB
 * 
 * The complete build log is located at '/var/tmp/portage/www-client/chromium-92.0.4496.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/chromium-92.0.4496.0/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0'
 * S: '/var/tmp/portage/www-client/chromium-92.0.4496.0/work/chromium-92.0.4496.0'


Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-09 08:10:21 UTC
Full build.log and emerge —-info please.
Comment 2 Seong-ho Cho 2021-05-09 08:17:30 UTC
Created attachment 706680 [details]
build.log of www-client/chromium-92.0.4496.0
Comment 3 Seong-ho Cho 2021-05-09 08:18:16 UTC
Created attachment 706683 [details]
emerge --info log 202105021747+0900 (same as current)
Comment 4 Stephan Hartmann (RETIRED) gentoo-dev 2021-05-09 10:20:35 UTC
I can't reproduce this one. generate_bindings.py runs in a python2 env, because it is not converted to python3 yet. pygments is loaded here: 

https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/third_party/mako/mako/exceptions.py#298

However, it should fail to load pygments with an ImportError and try the fallback option. In your case it loads pygments from python3.8, so somehow it switched to a python3 env again.
Comment 5 Seong-ho Cho 2021-05-09 10:49:59 UTC
(In reply to Stephan Hartmann from comment #4)
> I can't reproduce this one. generate_bindings.py runs in a python2 env,
> because it is not converted to python3 yet. pygments is loaded here: 
> 
> https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/
> third_party/mako/mako/exceptions.py#298
> 
> However, it should fail to load pygments with an ImportError and try the
> fallback option. In your case it loads pygments from python3.8, so somehow
> it switched to a python3 env again.

Thank you for letting us know that. my machine does not have python 2 

because I did totally clear python 2.7.x and no more exists.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-09 10:56:13 UTC
(In reply to Seong-ho Cho from comment #5)
> (In reply to Stephan Hartmann from comment #4)
> > I can't reproduce this one. generate_bindings.py runs in a python2 env,
> > because it is not converted to python3 yet. pygments is loaded here: 
> > 
> > https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/
> > third_party/mako/mako/exceptions.py#298
> > 
> > However, it should fail to load pygments with an ImportError and try the
> > fallback option. In your case it loads pygments from python3.8, so somehow
> > it switched to a python3 env again.
> 
> Thank you for letting us know that. my machine does not have python 2 
> 
> because I did totally clear python 2.7.x and no more exists.

That shouldn't be possible given that the ebuild depends on Python 2. Please do not use emerge -C or --unmerge if that's what you did, but instead --depclean.
Comment 7 Seong-ho Cho 2021-05-09 15:52:15 UTC
This problem is not invalid and also occurred from dev-qt/qtwebengine 

due to same causes invalid syntax produced from the latest version of pygments-2.9.0

please do not assure yourself until you find "exact error point".
Comment 8 Mike Gilbert gentoo-dev 2021-05-09 16:10:12 UTC
Are you able to reproduce the issue with dev-lang/python:2.7 installed?
Comment 9 Stephan Hartmann (RETIRED) gentoo-dev 2021-05-10 08:31:56 UTC
I see several build failures in your build.log, e.g.

In file included from ../../v8/src/builtins/builtins-array-gen.h:8,
                 from gen/v8/torque-generated/src/builtins/typed-array-tq-csa.cc:2:
../../v8/src/codegen/code-stub-assembler.h:330:80: internal compiler error: Segmentation fault
  330 |   TNode<IntPtrT> ParameterToIntPtr(TNode<Smi> value) { return SmiUntag(value); }
      |                                                                                ^
unrecognized DWARF version in .debug_info at 6
unrecognized DWARF version in .debug_info at 6

I don't know why it crashes (out-of-memory, overclocked CPU/RAM, faulty memory module), but you seem to use ebuild command to build/restart compilation of chromium. Have you checked that all dependencies are installed? ebuild command does not take care of dependencies.
Comment 10 Seong-ho Cho 2021-05-10 14:29:47 UTC
(In reply to Stephan Hartmann from comment #9)
> I see several build failures in your build.log, e.g.
> 
> In file included from ../../v8/src/builtins/builtins-array-gen.h:8,
>                  from
> gen/v8/torque-generated/src/builtins/typed-array-tq-csa.cc:2:
> ../../v8/src/codegen/code-stub-assembler.h:330:80: internal compiler error:
> Segmentation fault
>   330 |   TNode<IntPtrT> ParameterToIntPtr(TNode<Smi> value) { return
> SmiUntag(value); }
>       |                                                                     
> ^
> unrecognized DWARF version in .debug_info at 6
> unrecognized DWARF version in .debug_info at 6
> 
> I don't know why it crashes (out-of-memory, overclocked CPU/RAM, faulty
> memory module), but you seem to use ebuild command to build/restart
> compilation of chromium. Have you checked that all dependencies are
> installed? ebuild command does not take care of dependencies.

There were many process had run, 
and as you doubted, there seem to be such faulty memory module.
so Segfault is not the main problem.
this problem can be randomly caused in anytime,
It can be resolved easily within my machine.

so I used 'ebuild' command to resume compilation.
Comment 11 Mike Gilbert gentoo-dev 2021-05-10 15:26:50 UTC
I am closing this as INVALID again because based on comment 5, it seems like your system is missing dev-lang/python:2.7. This is declared as a build-time dependency in the ebuild, and is required to build the software.

If you can reproduce the issue with dev-lang/python:2.7 installed, please reopen this bug with a fresh build log that is free from unrelated build issues.
Comment 12 Seong-ho Cho 2021-05-10 16:29:26 UTC
I told you do not assure yourself until you find 'exact point of problem'.
Comment 13 Seong-ho Cho 2021-05-10 16:29:59 UTC
and I also failed even though I installed python-2.7.18_p9 today.
Comment 14 Mike Gilbert gentoo-dev 2021-05-10 17:24:10 UTC
Do not reopen this bug report. Thanks.
Comment 15 Larry the Git Cow gentoo-dev 2021-05-10 20:51:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd54effccee98ffbc1c12655fae6893ee55e6bb6

commit cd54effccee98ffbc1c12655fae6893ee55e6bb6
Author:     Stephan Hartmann <sultan@gentoo.org>
AuthorDate: 2021-05-10 20:50:40 +0000
Commit:     Stephan Hartmann <sultan@gentoo.org>
CommitDate: 2021-05-10 20:51:52 +0000

    www-client/chromium: don't inherit PYTHONPATH from environment
    
    Closes: https://bugs.gentoo.org/789021
    Package-Manager: Portage-3.0.18, Repoman-3.0.2
    Signed-off-by: Stephan Hartmann <sultan@gentoo.org>

 www-client/chromium/chromium-90.0.4430.93.ebuild | 3 ++-
 www-client/chromium/chromium-91.0.4472.38.ebuild | 3 ++-
 www-client/chromium/chromium-92.0.4496.0.ebuild  | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)